Skip to content

Latest commit

 

History

46 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sand Bin

2D falling sand & water simulation

CI Pages Release License

Play the web version - Latest release - All releases

logo

logo

Features

  • Multiple graphical backends
    • TUI (text user interface)
    • OpenGL
    • WebGPU
  • Sand simulation
  • Water simulation
  • Dynamic world scaling
  • Network syncronization
  • Web version

How to build

Prebuilt native binaries are available on the latest release page.

Native Build

Requires CMake 3.28+ and a C++26 compiler

cmake -S . -B build
cmake --build build
./build/sandbin

Web Build

Requires Emscripten SDK

emcmake cmake -S . -B build-web \
  -DSANDBIN_FRONTEND_WEBGPU=ON \
  -DSANDBIN_FRONTEND_TUI=OFF \
  -DSANDBIN_FRONTEND_OPENGL=OFF \
  -DSANDBIN_CLI=OFF \
  -DSANDBIN_BUILD_TESTS=OFF
cmake --build build-web
emrun build-web/index.html

WebGPU frontend must be built as the only frontend for now. CLI support is also disabled for web builds

CLI

./build/sandbin --help
./build/sandbin --frontend tui --simulation basic --ticks-per-second 60 --boundary solid_wall

Releases

Packages

Contributors

Languages