Welcome!

Welcome to Destruction! Destruction is an open world game with buldings just waiting to be destroyed by you!

The game allows you to launch different kinds of blocks at buildings and sit back and enjoy as the blocks shatter the world into pieces. You can also attempt to climb the crumbling buildings as they crash to the ground.

Gameplay

Gameplay video showcasing normal mapping, view frustum culling, and general destruction.

Pretty Scenery

Shatter Buildings To Smithereens!

Pick Apart Buildings Piece By Piece

OSX Executable

If you have OSX, you could be in luck. OSX binary can be found here

Controls

Movement: W,A,S,D
Launch Projectile: Left Click
Change Projectile: 1-4
Quit: Q

Debug Keys:
B: Place Torus
V: Toggle Fog
C: Make Building
N: Show Wireframe
M: Release Mouse
E: Disable Fracturing

Technologies

Mesh Cutting

The core technology developed by our team is a framework for real time dynamic mesh fracturing based on collision impulse. We use
NVIDIA’s PhysX for dynamics resolution, and register a collision callback with PhysX which triggers the mesh fracturing code. Any
collision whose net impulse magnitude is above a minimum threshold notifies the objects involved, and each of these objects computes
a binary tree of triangle strip fracture surfaces which pass completely through its bounding box. Each object’s mesh then uses the
fracture surfaces at the root of this tree to cut itself into two new, water-tight meshes, and then recursively applies each of the
child fracture trees to the two resulting meshes. We then iterate through all the meshes resulting from a tree of cuts and add them
to our scene graph as new dynamic rigid bodies.

The process of cutting a mesh is itself fairly complex, we provide only a brief summary of the process here. The cut is represented
as a triangle stip, and the mesh as a set of triangles, so the first step is intersecting every triangle of the mesh with every
triangle of the fracture surface. Each triangle-triangle intersection yields a line segment, and each of these segments are then
associated with the triangles whose intersection created them. After all intersections have been evaluated, we iterate over all
triangles which were involved in at least one intersection and build a directed graph from the edges of this triangle and all
associated intersection line segments. Because all of these edges and line segments lie on the same triangle, this graph is implicitly
planar, so we are able to walk through its vertices and extract its faces. This yields a set of planar polygons for each face, which
are then triangulated with ear cutting triangulation and added to the correct resultant mesh.

Sound

Using the SDL sound mixer, we added some audio to the game. Since it would sound horrible to play a sound every time something breaks,
we only added a couple songs. A calm song (Vivaldi’s Spring) plays when nothing is breaking, and the finale of the 1812 Overture plays
when things start breaking.

View Frustum Culling

View Frustum Culling was implemented by culling everything whose bounding sphere is wholly on the outside side of the six planes that
define the view frustum.

References

Triangulation with ear clipping
Fast triangle intersection
Transform feedback particles
Fog
Normal Mapping
Sound