[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: My Game



On Mon, Sep 10, 2001 at 10:43:32PM +0200, Mads Bondo Dydensborg wrote:

> On Mon, 10 Sep 2001, Chris Purnell wrote:

> > I've just gotten around to putting up an initial release of what may
> > become a game.  I wonder if it would be too much to ask for people
> > to have a look at it and tell me what they think?

> I think the landscape/terrain rendering is very speedy, and I might steal
> it, if it can be dynamically changed.

I don't do anything fancy such as LOD or anything.  I simply divided the
landscape up into a grid.  I store that grid in a multi-dimensional array.
And only draw the geometry that is within the blocks of the grid that you
can see.

The cleaver bit is the first level culling.  What I do is cull to the world
space aligned bounding box of the view volume.  Because the grid is stored in
an array I can do this in constant time.  It also gets it down to only about
twice as many blocks as you can see.

> I was a bit taken back, that in 4684 lines of code, you have 17 comments
> (if you ignore the copyright). I think that may be the lowest comment/kloc
> ratio I have ever experienced.

As many as 17?

> With respect to making the scripting engine framerate independent - I
> would have assumed that it would be similar to having the animation be
> framerate independent?

Not similar, the same.  Animation is usually controlled by the scripting
engine.  That is the way I do it.  I have the scripting invoked 10 times
a second.  The scipts then control all the dynamic aspects of the game.
So that they are automatically framerate independent.  The only other
thing is that the rendering engine needs to know enough to correctly
interpolate the intermediate frames.

> Will there be any particular goal to this game?

Beyond get to the end?  I don't know yet.
I have a few ideas but none of them are well formed.

-- 
Christopher John Purnell  | I thought I'd found a reason to live
http://www.lost.org.uk/   | Just like before when I was a child
--------------------------| Only to find that dreams made of sand
What gods do you pray to? | Would just fall apart and slip through my hands