Deprecated: Function get_magic_quotes_gpc() is deprecated in /home1/aaronbol/public_html/textpattern/lib/constants.php on line 149
Building destruction | Aaron Bolyard's portfolio

Building destruction

A fun week-long attempt at building destruction in a video game. In the demo, you are able to shoot a Godzilla-like beam (though sadly without sound) and blast holes through buildings, eventually causing them to collapse from the pull of gravity.

The buildings themselves are made from small blocks. Each block is chosen from a giant list of possible configurations generated at run time with various fractures. The actual fracture algorithm operates on a collection of ‘boundary planes’ and ‘intersection planes’ to build the final shape (blocks in this case). I was able to get it to work with columns and pyramids and other such shapes as well, but they are not featured here.

(In the above screenshot, a Gyarados unleashes a painful hyper beam as we view the destruction from a safe distance).

The fracture algorithm can benefit from a sturdier triangulation algorithm. Currently, I use a brute force approach resulting in O(N^3) time. This can be a problem depending on how many unique combinations you want (and the quantity of fractures).

content