I solved this by pre created animated destruction sequences. This method is very limited. You may use LoadAnimSeq to apply multiple destruction animations to a building. You could use 3 phases of destruction, and 3 diffrent animation groups, thats 3*3=9 animations phases, phase 2 starts where phase 1 ends etc. This way the destruction wouldn't look the same all the time.
But the creation and animation of the buildings is pretty hard and also requires to use special tricks and a higher number of polygons. In my engine I use animated objects for "walls that can be broken down by explosives": The wall was made of a lot of pieces that are building an intact wall. The animation will then explode the pieces. (Additionally I use some particle FX here)
Here's the wall in the moment of the explosion:
And here after the explosion:
I used the same method for crates of explosives that will explode when the player shoots them.
Other game engines sometimes use realtime CSG (see code archives) that is altering a mesh, using carving etc. but it turned out that this is too slow for use in Blitzbasic. The game engines that are using realtime CSG are heavily optimized on a low, cpu-near level for that purpose.
A further method is to use multiple versions of the building and simply show and hide them, depending on the destruction state of the building. If you mix this with some explosion and smoke particle FX, it may look pretty good (especially in topdown adventure and sim stuff).
|