Editorial - February 2009

Issue 73 cover

This issue marks two years for me as Editor of The Game Creators Newsletter. It is so full of new products, model packs, great new games from the community and news about a plethora of other subjects that I barely have time to ponder life and ramble about my thoughts for this month. I could blame it on Tax Self-assessment forms and other less interesting but time-consuming activities, but it sounds far less poetic.

Instead, I look through the offerings for this month and realise just how much is out there to claw back some precious time. We have three new Model Packs created by authors skilled enough in their field to make professional yet affordable game content; updates to DarkBASIC Professional and FPS Creator speed up the development pipeline; Tree Party makes population of landscapes with varied foliage a breeze; competition results provide a wealth of fresh new ideas from the community; and there's a great deal more source code, tips and resources to make coding life that little bit easier.

Before you disappear into the main content this month, The Game Creators are making a call to anyone who has used or is using TGC products in a professional capacity. We want to hear from anyone who is using DarkBASIC Professional or DarkGDK for simple prototypes, up to complete applications. We'd love to know just how our products are being utilised out there! Email Rick Vanner with any information you have or are aware of - many thanks.

contents

(1) DarkBASIC Pro (2) Evochron Legends (3) Tree Party (5) PureGDK 1.1 (6) Dream (7) FPSC News (8) New Model Packs (9) TGC Store (10) FPSC Compo (11) DarkGDK / Dark Physics (12) Tip Of The Month (13) From the Forums (14) PlayBasic (15) Winner (16) Outro

DarkBASIC Professional News

DarkBASIC Professional

Dark Basic Professional U71

DarkBASIC Professional, Upgrade 7.1It took months of development and it was worth it. Thanks to a huge effort from a great number of community luminaries, we were able to release the U71 upgrade to Dark Basic Pro in the last month of 2008. The story of U71 started life during the last TGC Convention 2008. Lee works away during the TGC ConventionTo be more specific, it started life the night before when Lee Bamber, head developer, took advantage of a slightly drunk and happy group of forum members and gave them all some homework before they collapsed. The homework was to write down their three favourite bugs and over the course of the two day event, Lee would attempt to fix them. It transpired that some bugs were easy to fix, and others where wild and wonderful feature requests that had that 'fly to the moon' feel about them, but time passed since the convention and little things grow into big things. The path ahead also involved some serious development work in the FPS Creator X10 camp too, so we wanted to make sure a significant upgrade was produced before we switched tracks in 2009.

There is more to come in the land of Dark Basic Pro however, including the release of a new interface for the language. Anyone who has purchased the new Dark Game Studio product will know about the enhancements we made, and they are coming to you as a free update soon. Not only is the interface a marked improvement over the current official editor, we have also integrated the Game Creator Store so you can instantly obtain media and use them directly in your game project without ever leaving the editor. The store now holds close to two thousand items, and almost all of them are DBPro ready, including many free objects to get you started. Additionally, over the next few months we will be expanding the store to include media that is specifically intended for Dark Basic Pro users, starting with items from the DarkMATTER collection. If you cannot wait to see what the new interface is like, you can download the latest demo version of Dark Basic pro from the Dark Game Studio downloads section.

How? Where? Here,now!

Mike Inel has produce two mini-games, combining artistic elegance with gameplay. The games are extremely simple to play and come with very little instruction, leaving you to interpret the games in order to complete each one.

How


How by Mike Inel
The first to be released was How, in which you collect balls and drop them down a well. Yes, it really is that simple. There are a couple of other features to assist your plight, but like me you will probably spend most of your time wondering if you are playing the game how it was designed and if there is an alternative way to better yourself. And that, I suppose, is the ingenuity behind it.

"It's been my dream to create a big game, if possible, alone", says Mike. "Unfortunately, years have passed (with plenty of discontinued projects) and I never managed achieve it. So I decided to create something small and calming instead. That's where I started with How. My aim here is to have a simple game with calm atmosphere and deep meanings behind.

"I tried remaking How with better animations and gameplay, but the content became too much and lost track on aiming to make a "simple" game. So I discontinued it and worked on Where instead."

Where 

Where by Mike Inel
The second title - Where - extends into the 3D world, but retains a very stylish approach to presentation. Again, the instructions are virtually non-existent and will leave you questioning your own approach to beating the game. I would be tempted to rename this game What If, which is the question I keep repeating everytime I need to make a decision.

"In this short-game, I had an opportunity to apply various soft colors, soothing particles, music, and a simpler concept and meaning. It was also a remake of a game I tried to make back in 2004.

"I have ideas for my next short-game which will be named When, but I still have no plans on when I'm going to make it."

Gameplay over Shock-value 

Mike has changed direction recently in his game-making ventures. "In my earlier games I tried to 'improve' them using shocking content and hoping to appeal to an audience that would appreciate this. These latest short games focus on quality content and interesting gameplay. Taking both approaches, I realise now that it is more rewarding personally to be recognised for the latter, and of course the potential market for your games is far greater. If  anyone learns anything from my experiences so far, I hope this is it."

Radon: Front Lines

Radon: Front LinesThis is a simple but addictive game from Trek Software. Terrorists have taken over a city in the US with a fleet of autonomous robots. They are now working on assembling a Nuclear Bomb to completely destroy the city and make it permanently uninhabitable. As a Robot Operations Specialist, you are in command of the Radon - a remote control countermeasure to the terrorist threat. Your mission is to combat fire with fire and eliminate the unwanted intruders.

Using the arrow-keys and spacebar, you can move and launch weapons from the Radon. You can also switch to different weapons using the number keys 1-4 depending on what level you are currently tackling (every other level, you gain a new weapon). Also, if you collect all the money and intelligence papers scattered throughout each level, a special secret weapon is unlocked.

Front Lines uses Nuclear Glory as the collision method, along with the animated sprite pack for effects. The game utilises a home-brewed spark engine which can also be used to apply power-up effects, bullet casings and other projectile motions.

Trek Software WebsiteMore information and the free download is available from the website. You will also find a number of useful beginners programming tutorials on the same site.

Evochron Legends - The latest episode from StarWraith

Evochron legends 

Evochron Legends is an advanced freeform 3D Space Combat, Trading, Racing, Exploration, and Mercenary Simulation. This is the new sequel in the long-running series, programmed in DarkBASIC Classic by StarWraith.

In the game, you control your destiny in true freeform gameplay with a variety of activities and objectives to complete. Customize the look, functionality, and performance of your ship with the component-based shipyard. Design your ship for the role you want to play.


Evochron legends Trailer
Explore a 'seamless' universe without required jump gates or trade lanes to limit your movement, use optional gates to save time and fuel. Master devastating new weapons and technology. Pilot Alliance military ships into battle to defend Evochron.

Keep the ship, upgrades, equipment, money, weapons, crew, and commodities you acquire in the game for use in both single player and multiplayer. Join forces with other players in multiplayer to complete more challenging cooperative objectives that can offer much better pay.

At the time of writing, Evochron Legends has reached Candidate testing and will be ready for the public in early February. In the meantime, take a look at some of the screenshots from the game, and the video trailer.

Evochron Legends, written in DarkBASIC Classic

Evochron legends by StarWraith

Evochron Legends, a DB Classic Creation

Play Evochron Legends by StarWraith

StarWraith WebsiteMore information, screenshots, wallpapers and details on ordering and downloading Evochron Legends is available on the StarWraith website.

 

Tree Party comes to DarkBASIC Professional

Tree Party is a Dark Basic Pro library application that allows the developer to include highly detailed, realistically animated 3D mesh trees in their Dark Basic Pro applications with little effort. This system was designed to closely match the native functions of Dark Basic Pro - so adapting the library to your projects is a snap! This version of Tree Party is not a port of the original Tree Party - it's a complete re-write from the ground up to allow for the more advanced features of Dark Basic Pro, including shaders and mesh deformation. A lot of additional time has been spent with this release to ensure the end-developer the most realistic yet practical tree system possible. We are confident you will appreciate the extra effort put into this product.

Features

Tree Party PageTree Party is available now from The Game Creators website. You will also find more detailed information on the applications accompanying this impressive solution for your games.

PureGDK Beta 1.1 for DarkBASIC Professional

PureGDK for DarkBASIC Professional

The latest version of PureGDK is now in Beta stage, and available for download. It is a merging of PureBasic 4.30 and DarkBASIC Professional 7.1. The Beta can be used by anyone owning DarkBASIC Professional and PureBasic - you do not need to own an earlier version of PureGDK. The Beta is fully functional but time-limited.

There are several bug fixes, a new error handler, full support for automatic multi-threading thread safety and a much improved compiler.

PureGDK Forum ThreadYou can read the full list of changes in the PureGDK forum thread.

Download PureGDK BetaThe Beta can be downloaded here.

Download PureGDK demosThere is also a 75 Megabyte examples pack, full of demo applications.

What is PureGDK?

PureGDK is an intermediary compiler and a set of command libraries that interfaces the DarkBasic Professional and PureBasic language at compile-time. This allows DarkBasic Professional commands to be compiled to an executable and debugged right out of the PureBasic IDE. It also brings a powerful new command set to both PureBasic and DarkBasic users alike. Both DarkBASIC Professional and PureBasic are required to compile.

Dream Demo by Bizar Guy


Dream Puzzle Game - Demo

Dream is the latest creation by Forum regular Bizar Guy. This is the follow-up to BlockVerse featured way back in 2005. This follows in the same style, with great graphics and addictive puzzle-solving gameplay. The game also has the addition of a storyline-based progression, as you try to escape from a surreal dream world.

Ben has taken an art-based approach to Dream, and it certainly shows in the carefully crafted presentation of the game. Everything from the title sequence to background effects and stylised weather add to the cartoon-like environment.

Each level presents a block-based puzzle, in which you must collect a key and then escape through the portal. The solutions look simple, although I often found myself making fundamental mistakes and having to restart the level.

Dream Forum ThreadDream looks very promising, and we hope to see the full version appearing soon. You can keep up with the development on the forums, and provide valuable feedback to ensure the final product meets the expectations of its fanbase.

News from the World of FPS Creator

FPS Creator News

FPS Creator X9

FPSC x9Just before Christmas we took the decision to spend some time on a number of FPS Creator X10 issues that had surfaced since the last update in early 2008. The community there had been extremely patient, and it was only fair that we take on board what the community had to say and run with it. We decided to postpone the migration work for a few months and give X10 some attention. As scheduled this work started in 2009 and is proceeding well, and a few weeks later we completed the beta phase of V114 and released a new update for FPS Creator X9 users.

The plan is still to move towards the migration version, but not at the cost of leaving the X9 and X10 communities without the tools they need to create the games they want. The V114 update is an example of this commitment and includes a few improvements not least of which is a bug fix which allows large levels to be chained together to form very large games, a scenario that sometimes caused a crash on some systems.

Another cool new addition in V114 is the basic support of hard-coded XBOX 360 controller input to the FPS Creator standalone game levels. In the migration version you will be able to customise these controls further to provide full controller support of standalone games using player defined layouts. The plan for X9 long-term is to migrate all X-Box control for FPSCfeatures, and those of X10 into a new engine which provides the best of both worlds, and allows the user to decide whether they want to build a DirectX 9 game or a DirectX 10 game.

The development bods at TGC want the migration version to happen sooner rather than later because we can add more features quicker with one source code base, as opposed to the two separate systems we maintain at the moment. That said, we will not rush headlong into a migration project until we get the green light from the communities that this is what you want to see and are willing to have us redirect development energies from separate X9 and X10 work into the new version.

FPSC Free with Trialpay

FPS Creator X10

FPSC X10After a flurry of activity from the X10 camp prior to 2009, the wheels for the development of V109 are well in motion and are already yielding some great results. Model pack after model pack are now working seamlessly under the improved compatibility code and TGC will not stop until all the model packs are fully compatible. We will even go further and integrate the Game Creator Store so that all the media from there, almost two thousand items, will download and work in X10 without any further modification.

Although the big headlines are about improved backwards compatibility for entities and segments, there is also a number of other fixes that you will enjoy. Now you can have more than one particle based entity in your level, bullets that hit surfaces align properly to the object they hit and a slew of at least six other major fixes are due to be part of V109.

Perhaps the most significant improvements to FPS Creator X10 have been the fixes to improve compatibility with the range of ATI cards that support DirectX 10.0. Whether you are a fan of the green team or support the other guys, you will now find FPS Creator X10 is a playground for pretty much any DirectX 10.0 hardware you might have. It is important however to realise that the power of the card significantly affects performance and you are highly encouraged to check out the thread on the X10 forum that provides information on card compatibility and the performance demonstrated by each. You may not find thread updates in respect of the V109 beta as yet, but early testing has shown the V109 update to be an extremely handy patch if you own an ATI graphics card.

Progress continues at full steam, and X10 is now top of the proverbial list for the time being, so if you are an X10 user and want to help shape V109, download the beta and let us know what you think so far!

Model Pack 20 - Medieval Merriment

Medieval Model Pack for 3D Games 

Everything you need to make a medieval setting is included in this pack:

FPSC Model Pack 21This pack is available to order now for just £10.99 ($19.99 USD, €12.99 EUR). Visit the FPS Creator website for full details.

Add Character to your Game - Model Packs 21 and 22

Model Pack 21 for FPS Creator

Model Pack 21, released last month, contains 17 variations of character for your First Person Shooter games. This collection of brand new fantasy characters for your FPS Creator levels will make your fantasy worlds magical with these living, breathing monsters, villians and generally unpleasant types including:

FPSC Model Pack 21This pack is available to order now for just £10.99 ($19.99 USD, €12.99 EUR). Visit the FPS Creator website for full details.

Model Pack 22 for FPS Creator

Model Pack 22 - Freaks, Abominations, and Gore. It's time to bring some of the scariest characters around into your levels:

FPSC Model Pack 22This pack is available to order now for just £10.99 ($19.99 USD, €12.99 EUR). Visit the FPS Creator website for full details. You will also find a video showing the fantastic animations and finishing move on the Chainsaw Guy (contains mature content).

The Game Creator Store - New Additions

The Game Creator Store 

Did you know that The Game Creator Store includes not just FPSC Entities and segments, but also music, sky boxes, applicatons, models and photos? The Game Creator Store - free downloadEach month the Game Creator Store grows as our approved artists upload their latest offerings. Start up your store (through FPS Creator or the standalone version) to see these and many more.

 

Tactical Shotgun Low Poly ModelJSCS14 TACTICAL SHOTGUN

This modern, autoloading shotgun is an M1014 with a 14 inch barrel for breaching doors and close quarter combat. It includes VWEAP and pickup weapon and ammo entities. It also includes iron sights animations. Ironsights work automatically in AirMod 0.6 or later. In unmodded FPSC, iron sights view can be set by editing the animation ranges in gunspec.txt. Segmented reload animations load as many shells as are needed to top off the magazine.

 

 

Low Poly 3D model - Wooden GatesWooden Gates

These Wooden gates were originally designed for the tunnel pack, but work well with any appropriately themed environment. With an opening motion swinging in both directions, these heavy doors also include an animated wooden bar to secure them on closing.

 

Aluminium Ladders

This ladder will look great with any work shop or industrial scene. Placed well, it can be used to walk up to higher levels, place yourself well for oncoming enemies, find hidden items and so forth. Play the video to see the ladder being used in this fashion.

 

 

Garage Model for 3D GamesGarage

Larger than your average prop, this garage makes an ideal item to break up courtyards, provide cover when running across open ground, or even apply a little grafitti to personalise your game!

 

 

 

The Shroudling Horror Character Model for 3D GamesThe Shroudling

This is a melee horror character, great for a scary game.   Includes a melee script with sound effects.  Will moan in agony, then follow after the player and attack with his blade when close.  Uses a 1024x1024 diffuse texture.

All of the above models are available to purchase and download through the inbuilt Game Creator Store in FPS Creator, and also using the standalone store for other game-making tools.

The BIG FPSC Christmas Competition

FPSC Christmas Competition 1008 

FPS Creator For freeBefore giving Nickydude the honour of announcing the competition results, we would like to express our thanks for organising the competition. We extend this gratitude to Thraxas and KeithC, who judged the competition alongside NickyDude. Organising and judging a competition is no small task.

The Results - by Nickydude

Final judgement has been passed and we have winners! Firstly I'd like to thank all those who've entered and those who judged. Also a big thanks to BiggAdd for the amazing banner and all those who are supplying prizes. The prize stack will be distributed amongst the winners, and includes Model Packs, characters and other media including music and voices, all donated by their creators. In addition there are thousands of Game Creator Store points to top up with models and media of the winners' choosing.

Without further ado, here are the winners:

 


1st Place : The Castle Tomb by SamHH

Comments from the Judges 

"The puzzle element and the overall look reminded me slightly of the Tomb Raiders, especially shooting the key from the eye and having to hack open tombs to find a key which I though was a nice touch. I never got past the open pit with the zombie in, I did shoot the ceiling above the pit, from which boxes then fell but I couldn't stack them enough to climb out (if indeed that's what you do)."

"This is my personal favourite entry. If you ask me why, though, I couldn't really tell you. It just has that 'X-Factor' for me. I like the setting, I like most of the puzzles and as a whole it just clicked for me.

"There are two things that could be improved. I worked out one of the puzzles easily enough but the first 3 times I tried to do it I missed the key even though the gunshot looked like it was hitting it. Because I couldn't save the game I had to restart when the 12 bullets were gone. Building the tower of blocks was frustrating, as the stone Zombie kept knocking it over while I was climbing it. Again, the problem was having to restart the game on failure. If these 2 things were fixed and fully customised menus had been used I would have given this a perfect score."

2nd Place : Puzzle Game by PMCDude

Comments from the judges 

"The puzzles in this game are well-designed in terms of increasing difficulty, from simply stacking boxes to the final, ingenious challenge in the fifth room. The fourth room had me spending ages stacking boxes to reach (as I found out) a cleverly placed misdirection. It took me a while to find the true way."

"The first 3 puzzle rooms were fairly simple to work out and I thought room 4 was going to be the same. I was wrong, I don't want to spoil it for anyone who hasn't played it yet but PMCDude got me good!

"I thought I was never going to solve room 4 and then I had a moment where I thought 'I wonder if...' and I solved it. I enjoyed the idea behind room 5 and would have liked to have seen more stuff like this in the competition."


3rd Place : Red Light by Deca / Blazor X

Comments from the judges

"I liked this one, the overall concept was put together well and using the level itself was a novel idea. This was a different twist on the puzzle idea that did away with 'stacking boxes' and 'flicking switches'. It reminded me of the level inside the Citadel in Half Life 2 and would have been better if it was longer and had an 'Inside Citadel' type skybox to make it look as though you were actually inside somewhere. Overall a well thought out idea."

"What this game lacked in difficulty it certainly made up for in presentation. This was definitely the best presented game. It had a theme which ran though all the menus and was even applied to the menu cursor. It has an excellent atmosphere and is enjoyable even if it is over quickly."

Thanks to The Game Creators, we also have additonal fourth and fifth place prizes of 500 store points:

4th Place : The Artifact by Robert F

"The first thing that struck me about this game was that it looks good. It was obvious that a lot of effort had been put into layout of the game too, the whole game flowed really well from room to room. The use of the flashlight was also a nice touch.
I did feel, however, that the puzzles were all very similar. Pull a lever, stack some boxes... stack some boxes, pull a lever. What I would have liked to see more of was a puzzle like in the 4th room, it had me genuinely stumped."

5th Place : Puzzle Entry by Screaming Head Games

"There was lots of fun to be had in this game, although some of the puzzles didn't really feel logical. "

"There was a lot of trial and error solving but I did enjoy playing through this one."

 

In Conclusion... 

Overall the standard of puzzles was good. I would have liked to have seen more diverse puzzles than the standard 'stack these boxes, flick those switches' but there were a few surprises and a few of you did put effort into the overall design. Here are a few things to think about when creating your puzzles...

1. Try not to annoy the player, there's nothing worse than spending quite a lot of time getting through a particular puzzle, only to make a mess of it at the end and having to struggle through the entire puzzle again. If it's a long or difficult puzzle perhaps place way points so the player doesn't feel frustrated.

2. Get your games beta-tested. You know exactly what you need to do for your puzzles and it might seem blatantly obvious, but those who've never played it before will struggle.

3. Never let your player get into a situation where the only option is to restart the entire game. Getting your player stuck in a pit because he needed something before he jumped in, or having the player run out of bullets before he needed to shoot something in order to continue will get the player frustrated, especially when they've got quite far and didn't think they needed to save the game at that point.

4. Don't let the puzzles get repetitive, stacking boxes and flicking switches is fun for only so long.

5. 'Trial and Error' puzzles will annoy the player. Being killed time and again because the player has to test every little thing might soon have the player reaching for the quit button."

Congratulations to all the winners, and thanks for taking part! We are sure the discussions are only just beginning on the forums - use this as an opportunity to make your future games better still.

Free Screen Saver with Source Code

Dark PhysicsDarkGDKTowards the end of last year The Game Creators collaborated with NVIDIA to produce a screensaver based on the PhysX technology, and thanks to generous nature of all concerned we have decided to release the full source code to the project for you to use as you see fit. With the code, you should be able to re-engineer it to make your very own screen saver, complete with 3D simulation, physics simulation, settings dialog for properties and all the handling for Windows XP and Vista.

The project began mid-2008 when NVIDIA approached TGC to produce a simple screen saver to replace an earlier saver which had become dated. The saver was reproduced faithfully by Mike, who then proceeded to add shaders and effects such as reflective water and eye candy. This first version was then stripped back down to a simpler saver which closer resembled the original screensaver produced by the previous owners of the PhysX technology. It soon become apparent that NVIDIA wanted to take the screen saver further with the addition of carefully selected shaders and more PhysX features such as fluids, soft bodies and cloth. It took several months but we managed to implement everything requested, including the ability for the saver to raid your My Pictures folder and use the images found there to repaint the sky and cloth images within the simulation. With the addition of some smoothing effects and final testing on various operating systems we launched the screen saver as part of the NVIDIA Graphics Power Pack where it currently sits demonstrating the power of PhysX to NVIDIA end users.

At the end of the project, it was decided that releasing the source code to the saver was a great way to show just how easy it was to implement PhysX applications in DarkGDK, and so you can now find the download available from the DarkGDK website. We found the availability of up to date source code and information on screen saver authoring was thin on the ground, and so we hope this code will help you along if you are thinking about creating your own screensaver. You will also find other little gems in there such as scanning folders to collect image files, writing and reading to the registry to store application data across machine reboots and lots of code to show just how easy it is to set-up and run GPU accelerated physics in DarkGDK.

DarkGDKYou can download the source code from the DarkGDK pages, along with the NVIDIA Power Pack containing the compiled version, and details on how to use and modify the source.

Lee's Tip of the Month - How To Render Ten Thousand Trees

More tips from Lee Bamber

My last tip on rendering seemingly impossible numbers of trees was more about the technique of prototyping than the trees themselves. This time, we'll break down a practical solution to this big challenge. 

I am sure the question of tree rendering keeps you awake at night, but fear not for I am here to point you in the right direction and ensure those pesky trees make no further intrusions into your dreams. It is a pickle, but really, how DO you render over ten thousand trees in your game without your performance crashing to screenshot speed?

The normal thinking when constructing your 3D game environments is to make as much of your scene static, and have a few dynamic objects moving around for the mechanics of your gameplay. Simple enough. Trees however defy this simple division as gamers expect their trees to move these days, which makes them dynamic, and you simply cannot render thousands of dynamic objects at a hundred or thousand polygons per tree, your game would slow to a crawl!

Previously I expounded on the benefits of Level Of Detail (LOD), which had the sensible job of taking more distant objects and rendering them smaller thus reducing the overall load on the system. Normally this works well if you have a decent machine and you are looking at a few hundred trees, but when you start to clock thousands of them, even traditional LOD breaks your game eventually.

The solution is what you might consider the ultimate level of LOD. A new level of detail that ensures that not only does your game remain fast with thousands of trees, but as a bonus ensures you will be able to see those trees from 'anywhere'. That's right, no hiding them after a certain range, or fading them out. You get to keep the tree, even when it is so far away it is a mere pixel on the horizon. The technique when explained is pretty simple, but it takes a few clever little commands in DBPro to make it happen.

Lots of trees

To explain the technique, you need to understand that a quad is a plane made up of two triangles, forming something like a flat sheet of paper onto which you can draw a tree image. Now imagine having a single object mesh made up of quad planes, stacked back to back and stretching into the distance like a huge domino chain. Each of these quads represents a single tree. A fully loaded vertex buffer can hold a lot of them. To keep the technique simple, we will use a vertex only mesh and ignore index buffers for now as we can still store over 10,000 quads in a vertex only mesh. For the modern GPU rendering this 30,000 vertex mesh is practically instantaneous.

The next step is to move the quads from their stacked positions to the locations of the trees in your game level. Some people might think 10,000 trees does not sound a lot for a large world, but do some prototypes and just see how many of them you can see. Trust me you have plenty of trees for most types of game you have in mind! We avoid resizing the vertex mesh as this would incur overhead we don't need to spend. To remove a tree from the game level, you simply provide the quad a new position well outside of the field of view of the player. By combining this technique with some graceful LOD to handle the actual 3D tree object, you can produce a tree that starts off as a detailed polygon model when close and down to a single pixel when viewed from the opposite end of the game world.

The code required to create this special vertex mesh is relatively short, but does require some understanding of vertex data, so we will take it one block at a time:

 make object plain 1,100,100
 make mesh from object 2,1
 lock vertexdata for limb 1,0
  for t=2 to 10000
   add mesh to vertexdata 2
  next t
 unlock vertexdata

The above code creates a plane object and makes a mesh from the object which looks like the plane. The plane is actually made up of six vertices. Three vertices to make the first triangle and three to make the second triangle. Together these triangles are arranged so they form a perfect square. The command to ADD MESH TO VERTEXDATA adds copies of this plane shape which we later call a 'quad' and fill up object one with 10,000 of them so when the time comes we can use them to make lots of trees.

The next section of code is called in your main loop and is responsible for changing object one so that only those trees that are in the distance should be positioned for rendering and the rest should be far far away where they cannot be rendered:

 lock vertexdata for limb 1,0
 basevertex=0
 for t=1 to 10000
  y0#=100
  y1#=100
  y2#=0
  y3#=100
  y4#=0
  y5#=0
  if tree(t).nearplayer=1
   y#=-50000
  else
   y#=0
  endif
  x#=get vertexdata position x(basevertex+0) : z#=get vertexdata position z(basevertex+0)
  set vertexdata position basevertex+0,x#,y#+y0#,z#
  set vertexdata position basevertex+1,x#,y#+y1#,z#
  set vertexdata position basevertex+2,x#,y#+y2#,z#
  set vertexdata position basevertex+3,x#,y#+y3#,z#
  set vertexdata position basevertex+4,x#,y#+y4#,z#
  set vertexdata position basevertex+5,x#,y#+y5#,z#
  inc basevertex,6
 next t
 unlock vertexdata
Probably a lot of code to digest perhaps, but really that is the extent of the technique. A simple loop that goes through each quad and if the tree is near the player it is positioned so far down the scene that the camera will never render it. The reason the trees 'closest' to the player are hidden is because we are not rendering the real 3D trees here, we are rendering those distant trees that make up about 95% of your scene.

"During my various development missions, I discovered that rendering ten thousand plane objects really hurts performance and is a pain to manage to boot. Having a single object to hold them all might introduce a new command or two, but the benefits cannot be ignored, especially if you want to render in the thousands and get away with it."

Those six SET VERTEXDATA POSITION commands each specify a single vertex of the polygons that define the shape of the quad, and the one to watch is the Y# variable which controls whether the tree is going to be visible in your game level or positioned well away from any opportunity to render.

I can already hear the cries from the hard-core coders amongst you weeping at the wasteful use of two redundant vertices, and you would be absolutely right. You can make the technique even faster, render more trees and reduce the memory footprint with the use of an index buffer. Fortunately, index buffer creation has been covered in past newsletters and there are a number of examples in the DarkSOURCE collection if you want to explore more about this great way to originate your own mesh data.

During my various development missions, I discovered that rendering ten thousand plane objects really hurts performance and is a pain to manage to boot. Having a single object to hold them all might introduce a new command or two, but the benefits cannot be ignored, especially if you want to render in the thousands and get away with it. This technique and others will be built into a new spin-off product currently being developed so watch this space for more information and if you find your game needs thousands of bullet holes, debris, insects, birds, rainfall, lasers or perhaps trees then congratulations, you're one step closer.

From the Forums

Forum Updates

The last month has seen a few changes in the forum, many of which will be transparent to the majority of users. One or two of the more eagle-eyed members have seen the appearance of the new badges, which will be explained in a moment.

The main reason for the changes is the sheer size of the TGC community. As the products become more popular, our customer base widens and initatives such as the Microsoft / DarkGDK package take hold, the number of people travelling through the forums has followed suit. As a result we have had to give our moderators a few more tools to manage this busy hub of activity, and ensure it is a pleasant place for all.

Firstly, we need to make sure everybody gets a fair chance to ask the questions that are stopping their creativity from flowing. No matter what their level, each developer can expect respect and courtesy across the forums. This is the foundation of the community, and so anyone stepping out from this rule can expect to find their posts moderated for a short time.

Likewise, we want to make sure that newcomers understand the environment they are entering. In a forum based on technical questions, we need to ensure the boards become an archive of useful information. There will be gentle reminders issued in regard to useful subjects and staying on topic. To aid this cause, the moderators are now armed with a set of default responses. They can now help you by quickly letting you know when things are going astray.

Member Badges

The Game Creators and Moderators would like to recognise members of the community when they see an outstanding contribution combined with a presence on the forums that is something to aspire to. Over the coming months, you will see these appearing alongside member avatars. Those of you that participate actively in the shaders discussion may have already seen this new feature.

Green Gandalf, Valued Member 

Valued MemberWhen discussing who should kickstart the process, one name stood out above all others. We are pleased to award Green Gandalf with the Valued Member badge for his longstanding contribution to the use of shaders in DarkBASIC Professional. This award does not just recognise the technical contribution, but the assistance given to anyone and everyone who wants to know more on the topic. Congratulations!

 

Free Tech Books

This great link opens up a world of free technical articles and online books, covering just about everything you may have a fleeting interest in. It includes 15 entries for computer gaming amongst the vast library.

The Free Games Thread

If you are looking for some freebies to waste a few hours of downtime, there are a growing number of games being listed here. It also includes links to DarkBASIC-developed game sites, and titles such as StarWraith IV

.

NaGaCreMo 09

It's all over bar the shouting, and the fat lady has already sung. Now is the time to find out if all of the developers who pledged to make a game in the first 30 days of 2009 lived up to their promises.

Learning to write Shaders

As Green Gandalf receives his award, it is only right that we draw your attention to his most popular haunt - the long-running shaders thread. If it isn't referred to here, it isn't a shader or it just isn't hip anymore.

.

PlayBasic News

Playbasic News  

by Kevin Picone

Being Australian, January normally represents one thing, lots of long hot days baking under the sun. In recent years though, the weather has been somewhat milder throughout the whole year. So when summer began, many were soon questioning if we'd see any real mercury busters this season. Of course this was just the calm before the storm! 8 weeks into summer and our region is now sweltering through the series of 40+ degree days, apparently breaking a 100 year old record. What does this have to do with PlayBasic? Well not much, other than it's just too damn hot to code at the moment. So the next release (PlayBasic V1.64I) will no doubt be at least a week later than I'd originally hoped.

PlayBasic V1.64i - Introducing Play Fonts

Earlier this month we released the PlayBasic V1.64H update on our site. This release includes a number of improvements, such as better alpha-channel support, and a brand new image-loading engine. There was one thing missing though, and that was some improvements to the font rendering engine. While PlayBasic has supported various font types for years (i.e. Windows GDI and Bitmap), what we wanted was to expand upon these with our own font solution; something that could replicate the functionality of both, without the limitations of either. Windows Fonts (true type) can't be drawn to PlayBasic FX surfaces, and Bitmap fonts can't be coloured real time and were susceptible to performance issues, particularly when hardware accelerated. So the solution was obvious, we needed to build our own font engine, which we've called PlayFont; no surprises there.

The PlayFont engine is effectively a bitmap font engine under the hood, but with one subtle difference. The rendering is designed to use a compressed version of the font pixel data. Through this compression, we gain not only extra rendering performance, but we can save memory and disk space too. As with any compression system though the results are variable, but with the range of fonts that we've been testing, we've consistently been seeing memory savings of 40->60% compared to the regular bitmap font. Render speed is not also faster by about 20->25% but it also includes per pixel Alpha Channel, Variable Alpha Blending and Tint (coloured text) support. So it's doing more and faster, can't complain about that.

The V1.64I update doesn't just include the new font engine though, there's of course the regular round of tweaks and new handy command additions. At the current rate of progress, the update should be available sometime around the first or second week of February - if the heat wave desists.

The Free PlayBasic Initiative

Beginning March 2009 we'll officially be announcing the PlayBasic Game Makers initiative. What's that? The initiative is designed to give users of the Free Learning Edition of PlayBasic a way to upgrading to the retail edition, without paying a cent for it. What's the catch? There isn't one, just make a game and submit it. There will be some demand & quality control limitations placed upon submissions, but apart from that, it's basically an easy way for you get the full retail edition of PlayBasic, completely free. Don't have the time to write a complete game? We'll also make other options available to score yourself a freebie. But we'll go into those next month :)

Over And Out.

Well that's it for this month, so before I pass out from heat exhaustion, I bid farewell.

This month's Winner

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: josh.f****@talk****.net We have emailed the lucky winner, congratulations!

Outro

Share your news with over 20,000 active games developers!

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 72 deadline - February 24th 2009.

I think that I shall never see
A billboard lovely as a tree.
Perhaps, unless the billboards fall,
I'll never see a tree at all.

Written by Ogden Nash, 1933. Realised by Tree Party, 2009.