Newbie questions, fixed point math and destructable terrain

Started by jtsoi, August 01, 2006, 13:43:35

Previous topic - Next topic

jtsoi

Hi all,

I would like to do a simple 2d game, liero based, with some modifications.

I have two questions, in what format should the math be done, fixed point or floats or maybe doubles? What are the differences? I have noticed that the SPGL library has FPMath routines.

Secondly, destructable terrain has been on my mind for some time,
given a big bitmap, 1000x5000 pixels, what would be the best way to employ destructable terrain?

My idea has been to devide the map into 256x256 tiles, load them up as bufferImages, and draw them as Quads. But whenever any explosion erodes the terrain, the bufferedImages will be updated, and then the texture will also be updated. Practically this means that I will have a copy of all tiles in RAM and draw to them, and if any changes are done to the terrain, the OpenGL texture is also updated.

Will this method work at all?

Is there any better way of getting there?

Regards,
JT