Water Simulation In Games

Water simulation techniques

The level of the optimisation undeniably depends on wanted result. The most common techniques include:

  • Wave-based system - There are multiple points going up and down, representing the water surface to make it look like waves. Easy yet effective, unless the water is supposed to leave its initial position.

  • Grid system (Only works in tile-based games) - Water spreads to adjacent tiles using preset animations. The quality correlates to the amount of the animations, and for the most part will satisfy your desires.

  • Particle system - The most complex but quality-rewarding of them all. Loads of tiny parcticles with static image, each assigned basic gravity and collisions simulate the water. The result again depends on the amount of particles created, but if the physics values are tweaked just enough, it ends up being amazing.

Visual effects

After finally attaining a working prototype of water physics, we can achieve a look even more convincing by adding special effects. Some developers prefer the use of shaders, textures and animations to simulate reflexions, ripples, refractions, splashes etc. on the water surface. This results in an illusion of the water moving without requiring complex calculations.