pygame is
Simple DirectMedia Layer is
Site Swing

pysand - 1.5

aexyl93 (aexyl93)



A falling sand game clone
Choose an element on the palette to the left and draw.
Sand changes to the color you pick on the palette
Press 'c' to clear the screen.
Press 'l' to have particles loop around screen
Press 's' to save current state
Press 'r' to load a state
Right click to erase the area under your mouse

Thanks to monkjr for getting saving and loading to work
Thanks to Khono for helping get network mode run at playable speeds.


Network mode is now faster than ever!! It's now actually playable! maybe. at the very least bandwidth has been drastically reduced.

And if the particles are too big for you, you can change the size by changing the variable 'PARTICLE_SIZE' in the constants file.


Home Page:


click to view original size


pysand - 1.5 - Mar 18, 2010
pysand - 1.4 - Mar 15, 2010
pysand - 1.2 - Mar 7, 2010
pysand - 1.1 - Mar 6, 2010
pysand - 1 - Mar 5, 2010
pysand - 0.9 - Feb 27, 2010
pysand - 0.8 - Jan 26, 2010
pysand - 0.7 - Jan 23, 2010
pysand - 0.6 - Jan 21, 2010
pysand - 0.5 - Jan 19, 2010
pysand - 0.4 - Jan 18, 2010
pysand - 0.3 - Jan 18, 2010
pysand - 0.2 - Jan 17, 2010
pysand - 0.1 - Jan 17, 2010 account Comments

If you wish to leave a comment with your account, please sign in first.

March 30, 2010 8:48am - David Khono Hackland - nickname: (khono)
Yeah, magnie, in the network people can cooperatively sandbag each other :)
March 24, 2010 12:27am - Magnie Mozios - nickname: (magnie) - 3/5
Reminds me of the Falling Sand Game, which I bet is what it's based off of. ;) But amazing! Is the network where anyone can change the sandbox?
March 18, 2010 5:57pm - Gio Di Russo - nickname: (bulbear4444)
Fire + Sand = Glass
Just an Element I came up with

Still, pwnful game!
March 11, 2010 7:11pm - Gio Di Russo - nickname: (bulbear4444)
I think there is an error with Networking, it unexpectdedly endswhen I hit "Network" Also, do you plan on bringing back "???"?
March 9, 2010 9:49pm - David Khono Hackland - nickname: (khono) - 4/5
Cool game! Based on other stuff, of course. I played something like this
many years ago, but a nice implementation!

I'd love to see some optimization and much smoother response from user input.

It'd also be cool if the currently selected button is highlighted in some way.

A quick and easy optimization would be to only refresh the play area (not the

But yeah, very nice implementation and I'm bookmarking it to see what else you do :)
March 1, 2010 3:05pm - Gio Di Russo - nickname: (bulbear4444) - 5/5
I Love it!☺
Very nice code, even better game.
January 29, 2010 4:22pm - quarkspin - nickname: (quarkspin) - 5/5
0.0 How does it run so fast???
January 27, 2010 3:12pm - James - nickname: (monkjr)
Your grass does not grow right in ver 0.8 but it does in ver 0.7
I don't know if you know this already but I thought I'd let you know.
January 26, 2010 3:48pm - James - nickname: (monkjr)
You're welcome! Ok, I changed the permissions and the name. See if that works.
So now go here:
January 25, 2010 8:35pm - aexyl93 - nickname: (aexyl93)
Thanks for helping me monkjr! I look forward to seeing what you did but unfortunately the link isn't working. If you could please fix it that would be great.
January 25, 2010 4:33pm - James - nickname: (monkjr)
I figured out how to save and load

go to: with save and
To see my version.(most of the changes are in the "grid" module)

Hope this helps!
January 21, 2010 6:29pm - aexyl93 - nickname: (aexyl93)
If you want, you can change the size of the particles yourself. Go into the particle file, then into the Particle class and then into the __init__function.
change the grid_size value to anywhere in 1 and 5. The grid will adjust to the size you specify.
January 21, 2010 6:14pm - Josh T - nickname: (mrbluesky)
I'm really looking forward to the eraser!
January 21, 2010 5:01pm - Gummbum - nickname: (gummbum)
This is coming along nicely, aexyl93. Can I have my tiny sand particles back? And I need to sprinkle them: they come out too fast now.
January 21, 2010 4:58pm - Gummbum - nickname: (gummbum)
Very nice, James! I did something similar in concept for my Gummworld Pygame project. Didn't realize someone had done it in a broader scope. Bookmarking that. Just goes to show that not only is necessity the mother of all invention. Boredom has a claim on it as well. :)
January 20, 2010 8:19am - James Mills - nickname: (prologic) - 5/5
Hi pysand developer :)

Because I was bored I tried to port your demo
to use my circuits event framework that sports
a pygame driver to source external events from.

Here's the code:

This is based on your 0.2 version of pysand.

--JamesMills (prologic)
January 18, 2010 8:54pm - Gummbum - nickname: (gummbum)
A palette of colored sands, maybe on a HUD. Then I can pick a colored sand and put the HUD away so it doesn't obscure my beautiful doodle. :) Doesn't have to be a palette, that's just what popped into my head.
January 18, 2010 1:53pm - aexyl93 - nickname: (aexyl93)
Thanks Gummbum for the suggestions and help. I'm not sure what you mean by a sand color palette though. Do you mean choosing different colors for sand or choosing an element from a palette?

And it's nice to see some competition! I'm glad that you decided to post yours.
I'd really like to see where both our games go. And thanks for the tips on the interactions.
January 18, 2010 1:14pm - Josh T - nickname: (mrbluesky)

I like how we both found very different answers to the same application; you used classes and objects for particles and I used numbers on a grid for particles.

I'm not entirely sure how you'd go about making interactions occur, but I checked all the cells around my particles and if they were full of something that my particle would interact with, it interacted. Fire might replace a nearby grass particle or grass might replace a nearby water particle. Fire also dies out randomly. I think there is like a 1/20 chance every frame of a fire particle dying.
January 18, 2010 11:21am - Josh T - nickname: (mrbluesky)
Wow lmao. I JUST made a game nearly just like this less than a week ago in python. I'll clean up my version and post it too.

It seems that you've got some competition~
January 18, 2010 1:30am - Gummbum - nickname: (gummbum)
Wish list.

I'd like to be able to: draw lines of varying thickness and color; load images into the game, and save the game surface for reloading; create sand spouts to place here and there so I don't have to keep sprinkling with the mouse; a way to selectively undo, or at least a crude eraser; and of course, a sand color palette.

And before it gets too late, could you make the sand pile up at least a little instead of leveling like liquid? If you can do this, there will be great potential to create sand paintings like you see in the southwestern US tourist shops.

Keep up the interesting work. This could become quite a fun doodling game. =)
January 18, 2010 1:20am - Gummbum - nickname: (gummbum)
Hi again. Keeping an eye on this one. :) To get v0.2 working I needed to modify a class declaration in "class Particle(object)". Python 2.6.
January 17, 2010 10:03pm - Gummbum - nickname: (gummbum)
This is pretty clever. The sand seems to find slopes even on flat surfaces. I made a little cup which took a surprisingly long time to fill. :) Makes me think of an hourglass with the potential to get extremely fancy.

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Feb 21, 2017

Jan 31, 2017

Jan 24, 2017

Jan 18, 2017

Jan 7, 2017

Dec 30, 2016

Dec 8, 2016

Nov 28, 2016

Nov 27, 2016

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)