Skip to content

elvnh/sandfall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

135 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sandfall

Building

For now, the game can only be built on Linux. Building for Windows is planned in the future.

Dependencies

  • GLEW
  • glfw
  • freetype
  • X11

Compiling

mkdir build && cd build
cmake ..
cd ..
cmake --build build -j

Running

./build/falling-sand

The dimensions of the gameboard can be specified as an integer:

./build/falling-sand 256

This would cause the board to be 256x256 cells large. If no dimensions are supplied, it defaults to 128.

Controls

  • Move the cursor using the mouse
  • Draw with the selected material using left click
  • Change brush material by hovering over the selected material in the top right corner and then clicking the desired material
  • Change between square and circle brush using the spacebar
  • Change brush size by scrolling up and down on the scroll wheel

Debug controls

  • Press w to toggle between single-step mode and normal mode
  • When in single-step mode, press r to advance the simulation by a single step
  • Press Shift+f1 to create a savestate
  • Press F1 to load the currently stored savestate if one exists
  • Press f to generate the prologue for a Catch2 test case setting up the current world state and copy it to the clipboard. This should only be used for small worlds as otherwise the setup code becomes very long.
  • Press g to enable or disable the debug overlay

About

A falling sand simulation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors