###Escape
Escape is the arcade game with Fluids simulation and smart AI.
Video
MonoGame Framework is used.
###Fluids Escape uses 2D Fluid Simulation on GPU with Vorticity Confinement and MacCormak Advection scheme based on Navier-Stokes equations for incompressible flow. To solve them numerical methods are used.
-
Because of the large amount of parallelism in graphics hardware, the simulation runs significantly faster on the GPU than on the CPU. Implementation is based on HLSL shaders, samplers and render to texture technique.
-
To achieve higher-order accuracy, Escape uses a MacCormack scheme that performs two intermediate semi-Lagrangian advection steps.
-
Also there are arbitrary boundaries conditions around obstacles implemented. In 3D realization, the Fluid is rendered by Ray-Casting technique.
Fluid integration into gameplay mechanics performed on CPU is shown on the diagram below:
###Game Objects model
It is based on the Composition design pattern. It provides uniform interface to handle either single Object
or entire Objects
hierarchy:
###Drawing
Drawing of game objects is performed by the Drawable
class. It is included into Object
through composition.