Hi all,
I have looked at the falling sand game here http://chir.ag/stuff/sand/ and I was wondering how on earth you would code something like this?

I want to start simple and only make particles fall and be constrained by walls like in this game, but I wouldn't know where to start...

Anyone have any ideas?

EDIT:

I did find these links after some more googling:

http://www.piettes.com/fallingsandgame/index.html - C++ Falling sand game
clone
http://www.piettes.com/fallingsandgame/download.html - sources and binaries for C++ falling sand game clone.

Cheers,
Paul.