flipCode - Tech File - Adam Robinson [an error occurred while processing this directive]
Adam Robinson
(aka Iok)
Click the name for some bio info

E-Mail: Iok@bigwig.net
Website: http://www.furryfoxy.freeserve.co.uk

   10/27/1999, Gone For A Burton - Or Not - Maybe.

I'm now at Warwick University studying physics. Whether this was a good idea or not is now irrelevant since I'm now stuck here. So for the [2?] people who've been waiting for this here's my next tech file update.

FPS displays:
I've seen lots of FPS counters on lots of games and most appear are very jittery. A nice way to do an fps counter that updates every frame and is fairly accurate is to keep a queue of frametimes from say the last 10 frames. Every frame you add a new frametime to the queue and drop the oldest off the end. To get an fps value just calculate 1/(average of queue).

Since I decided to use a 32bit n/z buffer in my engine this is probably the best optimisation I've made. The Z Mask buffer stops parts of the zbuffer being filled in that are not needed, it works like a cbuffer, before a frame is rendered the regions where flares / entities are are posted to the zmbuffer. When the world is rendering only the flagged regions are zfilled. This results in an average 20/30 6749007ncrease in framerate.

Procedural Land Generation:
This is where most of my effort is currently going. Since at the moment I've basically got a two man team working on my game [one programmer [me] and one artist] anything that speeds up the level building process is good. The system I'm working on at the moment allows you to place 'influence markers' [for want of a better name] on a map, for example 'big mountain' or 'crater'. The influence markers affect the land height and land texture. Certain regions of the maps [e.g. around portal engine interfaces] can be totally user generated and not be affected by the influence markers at all.

The most difficult part of this is getting real time texture blending working fast in software, I will probably try some sort of surface cache but there is the possibility of multipass rendering [unreal did 2 texture passes and at the moment I do one texture pass and a lighting pass] sort of like detail textures. [I don't think that running a dual texture pass will halve the texturing rate - for each little 4/8/16/32 pixel affine span I draw I just need to run the affine texel gathering loop twice not the whole perspective span interpolation.]

This system has a nice side effect in that I can generate huge landscapes without having to store huge maps in memory. I'm not sure yet whether I'll keep the procedural generator in the level editor / game startup or allow it to dynamically generate in gametime, it depends on how fast I can get it to go.

Scitech Display Doctor:
This program had a very weird effect on my engines performance, it may do on yours too - I'm not sure whether this is general or just my video card. When installed it dropped the frame rate of my engine by 30 When I disabled it [but left it running] it dropped the framerate by 50 I uninstalled it and the framerate went back to normal. I have no idea why this happened but if your engine is running slowly it might do you well to check if you have this program installed.

Mod Music:
I'm using mod music in my game because:
a)it can be easily dynamically modified
b)[more importantly] I've got a very good tracker [impulse tracker].
I've currently got the win32 version of midas linked to the engine and its very good - if any of you are considering 'dynamic music' I'd recommend it. [Its very fast too].


  • 04/01/2002 - Tech File Update
  • 03/08/2001 - Tech File Update
  • 02/11/2000 - Tech File Update
  • 01/06/2000 - Adsy Loves Microsoft...
  • 10/27/1999 - Gone For A Burton - Or Not - Maybe.
  • 09/14/1999 - Update 3
  • 08/23/1999 - Update 2
  • 07/23/1999 - In the Beginning

  • This document may not be reproduced in any way without explicit permission from the author and flipCode. All Rights Reserved. Best viewed at a high resolution. The views expressed in this document are the views of the author and NOT neccesarily of anyone else associated with flipCode.

    [an error occurred while processing this directive]