/yafsg

Yet Another Falling Sand Game

Primary LanguageGoMIT LicenseMIT

YAFSG

Yet Another Falling Sand Game.


This project is a work in progress and mostly to have fun messing around with implementing a falling sand simulation.


Demo

Click on the image to go to the demo video on Youtube. Early YASFG Demo Video on YouTube

Todos

  • Add gravity rules for particle acceleration when falling.
  • Add particle interaction rules, i.e. solids falls through liquids.
  • Add fixed solids.
  • fancy rendering with shaders:
    • Sand shader.
    • Water shader.
    • Bloom.
  • Add dirty rectangles to control which areas need updates.
  • Add multi-threading.

Bugs

  • Water has left bias when falling.
  • Sand has right bias when falling.

Controls

  • Left Mouse - Place a particle.
  • Right Mouse [Hold] - Pan the camera.
  • Mouse Wheel - Zoom in/out.
  • Space - Step the simulation if paused.
  • P - Pause the simulation.
  • D - Toggle debug mode.

Building

This project uses raylib-go as the rendering backend. Please ensure you have a 64-bit c compiler set for use in your go build toolchain (e.g.: export CC=<path-to-64bit-compiler>).