A sandbox that lets you interact with some of the fundamental forces of the universe.

Feedback welcome! I have no idea how to turn this into a complete game, or how this would become part of a larger game.

Technical details:

  • 2d
  • Incompressible
  • 96x96 square mesh
  • Staggered grid
  • Fixed time step integration
  • Hybrid density advection
    • Switches between conservative flux method and semi-Lagrangian based on cell Courant number
  • Pressure projection solved via Gauss-Seidel iteration
  • Gravitational potential solved via Gauss-Seidel iteration
    • Fixed BC with φ = 0
    • Note: ∇²φ = –4πGρ
  • Velocity dampening of low density cells for stability
  • Default open boundaries with toggleable no-slip
  • Bilinear interpolation post processing
  • Written in C++ using SDL2
Published 6 hours ago
StatusReleased
PlatformsHTML5
Authordestrodox
Made withSDL
Tags2D, Black and White, cfd, Sandbox
Average sessionA few seconds
InputsKeyboard, Mouse

Leave a comment

Log in with itch.io to leave a comment.