September is a time for a large section of the population to organise themselves for another year of study and hard work. For me, it signifies the end of a quiet moment to myself at breakfast, to be replaced by long periods of reflection whilst sat in traffic jams.
For my parents, it's time to reflect on forty fantastic years together as they celebrate their Ruby Wedding Anniversary - congratulations Mr & Mrs Vink! I've helped them reminisce with a thirty page book, spanning their childhood to the present day with their grandchildren. Fortunately I have a fantastic catalogue of photographs on my PC, catalogued by date, place, event and people. I can search several thousand photos effortlessly to find just what I need.
My organisation of code and programming resources leaves a little more to be desired. I follow a similar routine to that outlined by Lee Bamber later in the newsletter, so I am comforted by the fact that everything is safe; but finding it is a different matter altogether. I know that I could improve my rate of output significantly, if I could locate the right code snippet, model or texture at the right moment. I'm sure there are tools out there, and people out there that can recommend such a tool. So please let me know if these tools exist, and I'll share them with the community in a future newsletter.
As well as Lee's advice on backing up your valuable creations this month, we have a new initiative to identify the Best of the Best in the FPSC arena, more X10 updates, stills and video, two tutorials, the NVIDIA competition downloads and more of the usual news and views.
Until next time,
(1) FPSC X10 (2) Convention (3) FPSC News (4) BOTB (5) DBPro (7) DBPro Fundamentals (8) Lee's Tip of the Month (9) Tutorial - Full Game (10) Toolbox (11) PlayBasic (12) Job Opportunity (13) From the Forums (14) Submissions (15) Winner (16) Outro
This month has been a constant and never ending stream of tweaks to the graphics engine and game play. In addition to regular bug fixing, I can report some of the more interesting items that have been implemented since the last update.
We have stepped up to the June 2007 version of the DirectX 10 SDK which is the last version before the 10.1 preview. We have not decided whether to go further than this version for the first X10 release, but we will take a closer look at DirectX 10.1 when we have completed our current run of tasks.
The great news is that we have multiplayer working again in X10, running under Vista and playing every bit as good as the X9 version. We also found a really cool trick in creating a level in X9, building it in X10 and then setting up an arena game with one player running on XP and another on Vista. We will be looking to make this process a little easier as we expect end users to have Vista, who also have friends who are still on XP and still want to play arena matches.
Allies and enemies are now behaving like true soldiers. Allies hold position when you command them to, follow you into the jaws of battle and break away to think for themselves when they get the order to charge. Enemies no longer run aimlessly into a field of death. If three of their comrades are lying in a pile on the floor, they have the presence of mind not to make it a fourth. We could work on AI for the next ten years, but for the first release we are happy that our characters have enough marbles to stay alive.
This month we added dedicated melee attack code to the engine so characters without weapons can run right up to the player and start hitting them. At the moment the player cannot hit back, which might seem a little unfair, but one of the existing FPSC model packs has a great knuckleduster weapon which will slot right in for anyone wishing to make an open-air boxing game. We also have characters with some secret melee combat animation waiting to be integrated, such as the zombie who grabs the players head and attempts to eat his brain.
Another cool upgrade was the complete promotion of all sci-fi media to X10 using their full complement of textures. This means they will all have bump mapping as standard and, where provided, specular and illumination details. We discovered a good DX10 card can handle full scene bump mapping very well, and does not cause a significant performance drop. We are currently working on improving the sci-fi media as well, to ensure we get the best visuals from existing art. The cool trick here is that you can load in your old levels which use sci-fi segments, and get a visual boost simply by building it in X10. We have also added some new segments, which are even better!
To aid in our constant pursuit of faster frame rates, the X10 effects menu which is presented during the test game session now has the power to completely deactivate parts of the rendering cycle. For example, if the reflectivity value is set to zero, the engine knows that there is no need to even render a reflection, so this part of the sequence is skipped. The upshot is that on a per level basis, you can deactivate features you are not using to help performance. For example, if you created a sky city you could switch off water and shadows to give you more performance for more geometry. Alternatively you could switch off refraction if you know your level does not depend on refractive window and water effects.
Next month we are going to extend the above work even further by combining the refraction render with the main scene render, saving two whole scene renders per game frame. This should yield a significant performance boost, especially for high polygon scenes, without losing any of the effects. The work even provides two new benefits of being able to see refracting/reflecting water through a refracting window. This is still at the planning stage, so watch this space to see if we succeed in this ambitious approach to multi-level refraction.
We made some significant performance gains during the test and build game process, which increased the speed of segment cloning by about a thousand percent. We also improved overall rendering which in one test took a level from a crawling 12fps to a whopping 100fps.
In general, the betas are getting more polished each day, and more fun. A few days ago we created a large room, filled it with over a hundred skeletons holding WW2 grenades and armed the player with 50,000 health. We then placed the player right in the middle of the room and watched the carnage. No game, just the thrill of watching what happens.
There is a preview video available, demonstrating some of the new features and latest additions. Take a look at refractive windows, GPU instancing, team commands, designing the look and feel in real time and ragdoll bodies falling from towers.
Preview on Google Video - http://video.google.co.uk/videoplay?docid=1736433651486827575
The Time: October 27 & 28, 2007
The Place: Hinsley Hall conference centre, Leeds, UK
With less than 2 months to go, now is the time to place your booking if you want to secure a place at the convention. There is so much happening behind the scenes at TGC right now, that the convention will be the place to be if you want to know what the future holds. You'll also get the chance to talk directly to Rick, Lee and the other developers and creative contributors.
Convention Day Rate - £29.50 per day (£59.00)
Full Weekend Rate - £170
Most of the accommodation is en-suite, but it is advisable to book as soon as possible to guarantee your room. Other parties will also be using the facilities, and rooms on the campus may be unavailable nearer the time.
You can download the booking form here, and return it with a small deposit to reserve your place. You can pay online, simply email email@example.com for the details. We are very excited about this event, and hope that you will take advantage of this unique opportunity. Find more details and join in the discussions on the forums.
Two new model packs are immediately available from the FPS Creator site, dedicated to arming your characters with the ultimate in weaponry. Both packs include 15 brand new weapons, including 2 melee attacks.
For full details, images of each weapon and in-game shots, as well as ordering instructions, visit the Model Pack 9 page.
For full details, images of each weapon and in-game shots, as well as ordering instructions, visit the Model Pack 10 page.
As mentioned in the DarkBASIC Professional section, the NVIDIA FPSC entries are also available for download. Again, the games with aspects that caught the attention of the judges have been highlighted for your convenience.
Fire in the House
Lost Soul in Space
Curse of the Jolly Roger
Quest for Murgore
The Commander Josh Chronicles
The Hazardous Escape
KeithC, your friendly neighbourhood FPSC Mod, has created a new initiative to recognise the most distinguished FPSC developers. Best Of The Best is the name - and badge - that will be given to those that are leading the way with innovative FPSC games.
So what classifies a contributor as Best Of The Best? As the name suggests, there are many good games out there, a lot of people being very creative and identifying those at the pinnacle of the FPSC realm is tough. "Two of the criteria that I use to decide who makes the cut", says Keith, "is both the originality and the type of game produced."
"For example, Beyond Life is a great showing of what a single person can do with time and custom media. Anderson is a prime example that an FPSC-made title can appear on store shelves. Umbra shows what can be achieved with a great imagination and less focus on the 'run and gun' aspect of most First Person Shooters."
"I don't look for games that are simply finished; I look for games that exhibit something special. Whether it's exceptional custom media/scripts, an interesting story, great puzzle elements, or even just an extremely well put together 'run and gun' game."
So if you've finished your Masterpiece (or even just the demo) and you think it's good enough, contact one of the FPSC Mods...if they don't contact you first. Very soon, you will see the BOTB badge displayed alongside posts in the forums. Until then, you can peruse the dedicated thread in the FPSC forums.
The Game Creators Server is now heaving at it's virtual seams with the NVIDIA competition entries. In this first batch, you will find all of the DarkBASIC Professional entries. Alongside, you will also find a quick icon-based reference to some of the games that were identified as being worthy of merit. You can find the FPSC entries later in the newsletter.
Call of the Dragon
Final Exodus - Competition Winner
Illusion of the Tower
Nox is an open source FPS engine. The author, Oliver Batley, has written this comprehensive piece of work in DarkBASIC Professional, and included a huge array of features:
Nox is also directly compatible with 3D World Studio, allowing you to load your entities from the design environment into the game. The demo provides a simple but effective example of vehicle use, a feature lacking in many triple-A titles. A storyboard, through the use of notes found throughout the game, is a nice implementation of a game help system.
The only issue I found whilst playing the demo was the ability of enemy characters to attack through closed doors. But Oliver is responding regularly to the forum feedback, and as it's also open source, cases of stray code can be quickly rectified.
Go Fish is the result of a personal challenge. David Daudelin decided to see whether it was possible to make a decent-quality game with DarkBASIC Professional in only a week. As it turned out, he finished the first version of the game in only five days, including time spent getting/making the media for it. With two days to spare, he produced a second version with powerups, bug fixes, and an improved backdrop.
The result is a very playable game with nice, simple graphics. Given the timescale, it has a reasonable number of additional features through the powerup system. It could benefit from a little more work to improve performance and perhaps polish up the peripheral scenery. But at the end of the day, it's great to see what can be done in such a small timeframe, and force oneself to concentrate on the gameplay.
You can download and play the game at http://www.treksoftware.org/
Unlike the real world, a virtual world can pass entities around the system and share them amongst multiple items. This brief section illustrates this concept and ensures that the potential behind this simple methodology is understood.
One texture can be used on many models. You may want to use this technique for building a group of identical objects, such as houses or an army of soldiers.
Run the code! (Download the Project Files)
Example 1 creates 4 objects and applies the same texture to each one.
Again, the same model can be reused. This was explained in detail last month, with regard to cloning and instancing. Using these techniques can improve loading times, and memory usage in your game, and should always be considered. Remember that for objects with similar appearances and textures, instancing is the most effective method.
Finally, consider the scenario where you require 2 teams of players in different team colours. There are various ways to implement the objects and textures, of which this is probably the most efficient:
Run the code! (Download the Project Files)
The second example shows this in action. The result is 2 teams of objects, each with their own emblems but also optimised through instancing. We load just one model and clone it; this facilitates 2 models with distinct characteristics. The two models are then instanced several times; the team members have shared characteristics. Just two images are used to texture all twenty objects.
This final tutorial in the series has utilised many of the lessons learned, and also introduced the concept of streamlining your development. Loading and creating objects, moving, turning, texturing and animating are all possible. Along the way, various coding concepts have been introduced which can now be investigated further through the relevant tutorials, if you haven't done so already. Here is a recap of the tutorials from this series over the last few months:
If you have been coding games long enough, you will have experienced the pure horror of watching your computer delete your source code. Worse still, is the slow realisation that you have no way to get it back, and that your code is gone forever.
Having spent over twenty years programming a computer, you can imagine how much work I have lost to the celestial trashcan in the sky. The computer presents many opportunities for you to accidentally delete your work, and also has a few tricks of its own to surprise you from time to time.
I have had a lot of backup plans, and most of them did not work well. Usually because they are time consuming or interrupt the normal flow of development. I have gone through everything from hideously slow tape streamers to monster hard drives that can die at any moment. I have experimented with super-safe RAID systems which make a complete mirror copy of your files, only to find out it has copied over all your corrupted files too. Whatever the solution, there will always be a downside.
The system I employ these days is pretty paranoid, but it has saved me about five times in the last seven months, and has the grace of being quick and painless.
I have two automated systems running all the time. First, a background task which makes a copy of selected folders every night at 3AM (easily deactivated if I am working late). The second is an online service which copies a larger field of critical files to a protected offsite server. Even if the whole office exploded, I would still have the work I did that day safely stored away.
I also have two manual systems which are far more useful and are usually the ones I use to retrieve lost files. The first is the tried and tested method of burning a DVD with your files. I have ensured my entire development area stays under 4GB, so that code changes are within that area only. I can then copy four folders to a blank DVD nightly and leave it burning overnight. In the morning I have a DVD of the night before, and a frozen moment in time in case I need to look back on old source code. The second manual method is like RAID without the corrupted files problem. I have installed an exact duplicate of the main hard drive in my computer. At the end of each week, I perform a complete hard drive copy from the main drive to the duplicate drive. This ensures that if the main operating system ever suffered a total failure, I can simply deactivate the failed drive and boot from it's duplicate and restore the development files from DVD or from the online server.
Here is some advice on RAID systems. Do not strip drives unless you have a non-stripped backup of your important files, otherwise you may find recovering files very messy. Mirror drives are fine, but they mirror everything, good files and bad. If you take advice from someone who has tried RAID three times, add a non-RAID backup system to your important files, and ensure you have the very best RAID controller!
Of all the methods available, my favourite is a pile of blank DVDs and a fast DVD writer. As a developer, I find the most important files are source code and email, everything else is to some degree replaceable. Don't pity the guy who loses a days work, pity the guy who loses his entire project!
Last month we talked about keeping track of object numbers and learned how a code template can get a project off to a flying start. This month we will take that template and fill it out to create a simple but fun game called Ballz.
So, now we know how our game is going to play, we need to add some code to our template to make it work (you can find the template in last month's newsletter).
The first thing to do is define a User Defined Type (UDT) for the ball objects (see issue 28 of the newsletter for info about UDTs). So, under the REM statement ‘Define Types' we can add this code:
`Define Types Type tObj Obj as float x as float y as float z as float Angle as float Speed as float Endtype
That should cover everything we need to know about our objects. We have the Object Number (Obj), the x, y and z co-ordinates, the angle it is travelling and the speed. So from there we can set our Player, Enemy and Target variables as the new type tObj.
`Assign Types Global Player as tObj
`Arrays Dim Enemy(50) as tObj Dim Target(5) as tObj
This is a very simple game and is only using DBP primitive spheres so we don't need to load any objects but we will still need to create some. So, in the place we have set aside for assigning object numbers we can add this code:
`Objects Global oPlayer as integer = 1 Global oEnemy as integer = 2 `to 52 Global oTarget as integer = 53 `to 58
OK, we've set aside 1 number for our player object, 50 numbers for our enemy objects and 5 for our target objects. We only need to make one of each though because we are going to instance the others.
Skipping ahead a little, we can look at our main loop:
do GetUserInput() MoveBalls() CollisionDetection() UpDateDisplay() if Timer() > EnemySpawnTime + 5000 then IncreaseNumberOfEnemies() _DeBug() sync loop
It could be argued that our entire game is there, just those few lines. It isn't of course, there is more to it than that but reading through the loop, it is easy to see what needs to be done.
GetUserInput() is pretty straight forward. It is where we read what keys the user has pressed and act accordingly.
MoveBalls() The first of our new functions moves all the balls in the correct direction and at the correct speed.
CollisionDetection() The second new function checks to see if the player has collided with any other ball and act upon it.
UpdateDisplay() Perhaps the easiest function of them all. Simply position the balls in their new locations and update the score.
The next line in the main loop adds a new enemy every 5 seconds (or 5000 milliseconds).
_DeBug() This is a handy function to have during testing and you can use it to display on screen any info you are currently interested in. When the game is finished you don't want the user to see this info, so keeping it all in one place like this, makes it easy to delete it all.
In the MoveBalls() function there is this code:
`Move Player if Player.x > 125 then Player.x = -125 if Player.x < -125 then Player.x = 125 if Player.z > 95 then Player.z = -95 if Player.z < -95 then Player.z = 95
This ensures that if the player goes off the edge of the screen, he will appear again at the opposite side. To get the numbers needed, the _DeBug() function came in handy. Simply print to screen the x and z co-ordinates of the player and take a note of what they read when at the edge of the screen.
The objective of this tutorial isn't to explain every line of code but instead, to show how to use last month's template to create a game. So, why not download the complete code and have a look at it? It is heavily commented, completing the finer details of this tutorial.
The game is actually very inefficient; there are several loops through the object numbers - one to move them, one more to check for collision, another to re-position them etc. It has been done this way to make it easy to read although for a project this size it really shouldn't matter. Perhaps you would enjoy the challenge of making it more efficient and doing everything in a single loop?
Ballz was made simple for this tutorial but it turned out to be a lot of fun to play. There are, however, many ways it could be improved. Why not have a go and see what you can do? Here are some suggestions:
As you can see, there are many things that could be done to turn this into a complete game and hopefully using the new template it will be easy to insert additional code without getting it all jumbled up and that was of course, our main objective.
I look forward to seeing new and improved versions of Ballz.
Until then ... happy coding.
Download the source code for this tutorial here, with further comments on the functionality.
Jing is a simple way to capture screenshots, record computer activity and instantly share it online. The reason for featuring this service is because it's something many of us already do, but not in such a streamlined way.
Imagine trying to explain a problem over Instant Messaging, or describe a concept, design or process. In the past, I have recorded the screen activity to video, and uploaded it to YouTube, making it available in anything up to an hour. Jing does the same thing, but it's seamless. You click the Jing button, do your stuff, and when you're done it copies the address to your clipboard. Then, you just mail it or paste it in your messaging window.
As the site will tell you, this is a "project", and is subject to changes through feedback and public demand. For now, it's a great free tool. http://www.jingproject.com/
by Kevin Picone
This month things have been pretty low key on the development front. Whilst there is a new PB update available, most of the time has been invested in other things, such as rounding up the Ballistic Blasters competition, and issuing our newsletter, as well as updating various demos/examples for compatibility.
Last month, just as the August newsletter was flying out into inboxes all over the globe, contestants in our Ballistic Blasters competition were submitting their work for evaluation. Here are the results, with scores.
First Place - Super Nova by Phillip Burke [73.0]
Second Place - Leviathan by Indigo [67.6]
Third Place - Cafe Fuego by Phillip Burke [59.6]
Fourth Place - Aquarius by Trevor Dunbar [37.0]
The Technical Achievement Award has been awarded to Leviathan by Indigo
This release adds support for accessing array fields from User Defined Type pointers as well as addresses, and a few well hidden chestnuts with recursion, string comparisons and string splitting differences found in the VM2 runtime when compared to the original VM. The result is a very fast and stable development environment. Go to the full announcement for more details of this release. TGC customers can download the V1.63m from their Order history.
It's been a few months since PB 1.70 (Direct3D) has been our focus. The reason for this is due to having to play catch up with the some older chores. But now that those are out of the way, full time work can finally continue! Previously we'd been working on some new mapping techniques, and so getting those into the next beta will the first objective. Everything else is basically functional, other than sprite collision.
Sprite collision in PB1.70 presents a range of new hurdles due to the graphic engine changes. While all the pixel perfect collision systems will be intact and faster than ever, there's new combinations that we need to support with the introduction of the sprite entity system. Since entities can be 2D or 3D, this is going to make detecting collisions interesting. But I'm sure we'll get there.
The list of new PB features can be found here.
In keeping with our current rebuilding phase of old demos, TwinTrix is our current WIP. If you're wondering why, it's simple. Without any help from us, the game consistently continues to pull in healthy traffic every month. Considering the number of block games & Tetris clones on the web, it does very well. While there's nothing really wrong with current version, it was built way back in 2004 with a very early edition of PB. So it's slower and would no doubt suffer from compatibility issues with newer operating systems - more than enough reason to give it a once over. Like all good plans the initial idea was just to give it a quick makeover, recompile and upload it. This was soon superceded with a growing list of extra features, most of which have been included to make the game easier to set up. Visually it vastly improved also with KaZooWee Entertainment giving the game some tantalizing new pixel art. Performance wise, the update is built with PB v1.63m (Direct X3) and runs about 2 to 3 times faster than the old version on my six year old Duron system. Therefore, we can assure fallback compatibility with even old clunkers.
Twin Trix V1.08 is available to download now.
Until next time, Over & Out
Sansoft is a fast-growing independent game company located in Sweden, developing three unique game titles for the PC platform. One of these games is an RTS coded in DarkBASIC Professional. Right now, they are looking for a programmer with knowledge and experience of the language. As a programmer with Sansoft, you will be working under a lead programmer in a team and against a deadline. The company expects to be demonstrating the game at a large exhibition in Sweden within a month, and consequently are very serious about the deadline. You will be expected to be online daily, work by your own incentive, and have in-depth knowledge of DarkBASIC Professional.
For Sansoft, DarkBASIC professional is an irreplaceable tool allowing easy realisation of their game concepts and designs.
To apply, email Nils Carlén with your CV and portfolio - firstname.lastname@example.org.
The forums are displaying the usual mix of raw talent...
Visigoth has been busy generating terrains from real-world data. The results are astounding, and his work continues. See the latest improvements and take a walk around the Grand Canyon.
Still a Work in Progress, Influx is nicely presented with a cartoon feel, including a lead character modelled in the style of Rayman. This looks like it has great potential, and is getting some nice feedback.
Lucy is perfecting the art of vehicle creation and powerslides. The source code is available, alongside a compiled version if you simply want to check the results.
Jimpo has released a retro-styled space shoot 'em up named Shooter. Nice easy controls, powerup system and a whole host of baddies.
We are always pleased to receive submissions for the newsletter. In fact, we encourage you to do so. To ensure you can quality-check your own work, there is a set of guidelines which you should read and use to complete your news item. You might find, after reading them, that you already have something worth publishing.
If your game is complete, please consider the following points:
1. Is it a published product? The community is always inspired by developers who have found a publisher or found significant success in the public domain.
2. Have you had positive feedback on the forums? If not, you should post your game there to gauge the response, or work on the feedback you have received to ensure your application is of a standard that encourages people to be positive about your accomplishments.
3. What is your USP (Unique Selling Point)? Readers will only tolerate a remake of Pong so many times! We want to see innovation, or something noteworthy to bring to the attention of the community.
4. Is it developed using products sold by TGC? As much as we are encouraged and inspired by the many developments in the indie game world, the newsletter is naturally dedicated to our own product range. There are other outlets for applications developed using alternative products.
Generally speaking, a WIP would need to be of exceptional quality and/or content to be considered. Again, the feedback from the forum is a good gauge of just how newsworthy a WIP is. At the very least, it would need to have a public beta to show that it was capable of being completed at a later date.
Products for sale (rather than games and applications created using TGC applications) are included at the discretion of TGC. They must primarily be of benefit to the community we serve, and add value to the environment our customers work in.
Please include as much information as possible when submitting articles for inclusion: Name, location and age. We will only publish a general location, and age is only necessary to ensure nothing is made public that would be considered inappropriate. "18+" is enough to let us know that you are not a minor. Also consider:
Please include screenshots, links to videos, website, forum thread(s) and if possible access to the game / product / service itself. Ensure all files are fully virus-checked. Expect a large bandwidth increase when the Newsletter is published. If you cannot cope with this then TGC might be able to host the zipped file for you.
Each month we pluck one lucky subscriber from the newsletter mailing list and award them a free copy of DarkBASIC Professional. The email address of this month's winner is: frogchucker1@?????.com If this is you then send us an email to claim your prize.
If you have something you'd like featured in a future issue then please get in touch and include as much information as possible (including where applicable: screen shots, URLs and zip files).
Issue 57 deadline - September 27th.