3d falling sand
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
gl3w
lua
res
tgl @ c8d9f9d
.gitmodules
CMakeLists.txt
LICENSE
README
board.c
board.h
cam.c
cam.h
cursor.c
cursor.h
draw.c
draw.h
list.c
list.h
lualink.c
lualink.h
main.c
matrix.c
matrix.h
panic.c
panic.h
registry.c
registry.h
screen.c
screen.h
tick.c
tick.h
vec4.c
vec4.h

README

3D FALLING SAND

INSTALLATION

None required, simply unzip everything to a nice clean folder, and run
build/sandish.exe

COMPILATION

Because of the crazy build setup and prerequisites, it's probably better to
look at the source and enjoy the precompiled binary I'm providing. If you
really want to compile the code, you'll need CMake. I used MinGW to compile.
You'll need to have Lua, GLFW, and GL3W compiled and ready to go in order to
build this project.  Assuming you have all prerequisites, cd to the project
source directory and run:

  rm -rf build/*
  cd build
  cmake ..
  make

RUNNING

I tested on Windows 7, with an ATI Radeon HD4850. It is /not/ portable to other
operating systems.

To run, simply run build/sandish.exe. If all resources are located properly, it
should work. One problem I've come across is that on some computers, it seems
to have trouble locating main.lua. I was unable to determine why this would
happen (works fine on many computers, the files were present, etc etc). Also
due to some differences in OpenGL implementations, I saw some issues running on
Nvidia cards. I think all of those issues have been resolved.

Once the program starts, you should see a floor. This marks the bottom of the
cube. Use the WASD keys to move the camera. Use the mouse to look around. If
you move closer to the cube, you should see a floating cube appear. This is
your cursor. When you click, cubes will be added to the simulation at the
cursor.

By default, you'll add sand. To change the current cube type, press the keys
1-4.

  1 sand
  2 water
  3 concrete
  4 worker