TornadoGeddon
A Unity3D game featuring scripted tornado interactions with destructible environment
This is a game my friends Cheng and Katherine and I developed for CIS568: Game Design Practicum and continued to work on after the class ended. Using Unity3D game engine, the main features include fully animated tornado using Unity Shuriken particle system, functional and realistic tornado force field and destructible game levels. The goal of the game is to destroy as many objects as possible and reach the destination before the tornado dissipates (controlled by timer). There are special objects in certain levels that allow explicit, controlled picking-up/ dropping off, as opposed to other objects in the scene, which will be torn apart and carried by the tornado once inside the influence radius of the tornado. Dropping these special objects to predefined location will result in an increase in score or an extension in tornado life.
Tornado physics was designed from the ground up by me. I referred to a number of resources, including PhD theses, that describe the current understanding of tornado dynamics and the techniques used in simulating tornado numerically. Among them, the approaches that involve solving Navier-Stokes Equations are quickly rejected considering the inevitable heavy computational costs that would essentially destroy all possibilities that the game runs at real-time. Instead, I used a so-called Rankine Vortex to simulate the tangent force exerted on affected objects. A Rankine Vortex describes a velocity field with azimuthal velocity increasing with the radius when the radius is smaller than the characteristic radius, but decreasing with the radius once the radius is larger than the characteristic radius. It can be demonstrated as follows:
Tornado physics was designed from the ground up by me. I referred to a number of resources, including PhD theses, that describe the current understanding of tornado dynamics and the techniques used in simulating tornado numerically. Among them, the approaches that involve solving Navier-Stokes Equations are quickly rejected considering the inevitable heavy computational costs that would essentially destroy all possibilities that the game runs at real-time. Instead, I used a so-called Rankine Vortex to simulate the tangent force exerted on affected objects. A Rankine Vortex describes a velocity field with azimuthal velocity increasing with the radius when the radius is smaller than the characteristic radius, but decreasing with the radius once the radius is larger than the characteristic radius. It can be demonstrated as follows:
In addition to tangent force, to mimic the way tornado interacts with objects, I also experimented with the lifting force and attraction force with different models, and finally used a force field that exponentially decreases with distance to tornado center. Combining the appropriately weighted tangent force, lifting force and attraction force, and I had a working tornado model after a week's physics model experimenting and parameter tuning. It works very well with the destructible environment Cheng later developed.
For the destructible environment, we prepared two versions of the prefab we intend to fracture with the tornado, one for the intact mesh, the other for the fragmented mesh Cheng generated in 3DS Max and imported into Unity. Once the object is within the influence radius of the tornado, it gets swapped with the fragmented version, with each piece as an child game object of the fragmented object. Those pieces then got affected by the various forces tornado exerts. Since not all fragments enter the influence radius at the same time, it creates the illusion that an object (such as a house) is getting destroyed gradually.
For the destructible environment, we prepared two versions of the prefab we intend to fracture with the tornado, one for the intact mesh, the other for the fragmented mesh Cheng generated in 3DS Max and imported into Unity. Once the object is within the influence radius of the tornado, it gets swapped with the fragmented version, with each piece as an child game object of the fragmented object. Those pieces then got affected by the various forces tornado exerts. Since not all fragments enter the influence radius at the same time, it creates the illusion that an object (such as a house) is getting destroyed gradually.
Buffs change the appearance of tornado, also change its attributes, such as speed, influence radius, ability to generate small tornadoes, firing fireballs, etc. The tornado animation itself is created by Unity Shuriken particle system, and is provided by Storm Effects package available from Asset Store.
Our ongoing efforts focuses primarily on building larger levels with more vegetation, buildings and other man-made objects. In addition to Unity Terrain we are using, we are automating the process of objects fracturing for we have to manually fracture them outside of Unity and import the fractured meshes into Unity again. This is very time consuming and inefficient. Our latest updates includes painting trees on Unity Terrain that can be individually accessed and affected by tornado, temporary use of a Unity fracturing tool (which we will eventually replace with our own) to fracture objects and more interesting gameplay.
If you have any thoughts, ideas or suggestions about our game, please don't hesitate to contact me and share them using the following form:
If you have any thoughts, ideas or suggestions about our game, please don't hesitate to contact me and share them using the following form: