Petit Sand

General Info
Genre(s): Simulation
Contributor(s): Petrified lasagna, BlackDrag0n23
Release Date: April 30, 2014
Development Status: Stable
Version: 3.0.0
Size: 9 Kilobytes
Mode(s): Single-Player
Language(s): English

Let your creativity run free in this sandbox style game where you can build, destroy, and even set fire to whatever you want.


To change resolution change value of Q Higher value = lower res

Touch-Screen: Place particle

Up/Down button: Change selected tool

Left/Right button: Change tool particle

R: Take screen-shot

X: Clear screen

L: Set a tool to eraser

A: Toggle fountain


Version 3.0.0Edit

  • Improved the particle system. now it parses the particles in a top down fashion (e.g. prtnum-1 to 0)

Version 2.0.0Edit

  • Added more particles
  • Changed how things can catch on fire/put fire out
  • Added fountains that can be toggled on or off
  • Some particles now have explosive properties (C4 anyone!)
  • Fixed issue with screenshot not actually using inputted name

Version 1.0.0Edit

  • Initial Release

Future PlansEdit

-Add fountain particles(well, torch, etc.)

-Add YOUR particles

-Have particles create their own custom colors in DATA???

-Maybe change how liquids work so that they are different than something grainy like sand

-Shorten/Optimize code


Have a screen-shot of something awesome you made, you can put it here.


plant eating water, fire eating plant


In order of newest releases to oldest


The original game (hopefully) was found on the DAN_BALL website by BlackDrag0n23. It was their idea not mine, but I am going to try to have my own style and the style of anybody who helps out with the game added to it.


Making a game with your own custom drawing/collision engine? You should study the code in the @DRAW ; @PRTCLS ; and @PRTS . It is not the best, but it gets the job done.

Also there is a blank section to the right of the screen, that is just do to the screen being divided into perfect cubes. I chooses not fix it due to aesthetic reasons.

Finally to add your own particle follow the instructions below.

1. Increase the value of ELENUM by one or more depending on the amount of particles you want to create.

2. Create a DATA line under the @ELEMENTS label with the following setup

 name of your      1 has AI        >0 flamability    1 can explode   GRP color#
  particle         0 has no AI     <0 puts out fire     0 can not

nameofparticle,   willitdoanything,     flammability,      explosive,     color

3. If the particle is not static you have to create a gosub label with a return statement; @nameofparticle below is a list a variables and labels you can use for AI

PX/PY = location of particle

TIME = lifetime of particle

ID = type of the current particle

PDX/PDY = value offset that will be added to px/py at the end of particle AI

dim PRMX(RES)/PRMY(RES) = variables to retain particle momentum, not used by default

dim SCR(MAXX,MAXY)/PRT(RES) = for particle identification/collision. scr holds values that are pointers to particle position in the array prt. if scr(x,y) equals -1/EMPTY than it is empty. changing values in prt will change the id of that particle

dim PRTO(RES) = is used to retain old particle ID if it was changed by another particle. Used for special particle AI like in the code for fire

MAXX/MAXY = max x and y locations

@GRAV = makes the particle move down by one and to either side if possible

@PRTD = the current particle destroys itself

Any other variables are not technically used for particle AI, but certain hacks like spawning new particles will require using other variables and labels


Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.