A simple particle editor for all your projects!
Play with it until you find a particle you like. Use up/down to pick an entry, then type a number or use up/down to change it. A live preview runs on the right.
When you’re happy, copy the whole 1st tab of code, outside any function. Call updparts() in _update and drawparts() in _draw. To spawn a particle, call addp(x,y,"..."), where the string is copied to your clipboard when you press Z in the editor. Just paste it in. A full particle in under 2 minutes!
THE NAMES
A guide to what each variable does.
shap - the shape: 1 is a filled circle, 2 a circle outline, 3 a filled square, 4 a square outline.
num - how many tries to make a particle each time addp is called. About 1 in 10 works, so 20 gives you about 2.
life - how long a particle lasts, in frames (60=1 second).
ldel - random extra life, from 0 up to this many frames.
ang - the direction it flies, using pico-8 unit circle (0-1)
angd - how far the direction can wander either way. 0 is a straight line and 0.5 is anywhere.
spd - how fast it moves, linearly
spdd - random speed range, similar to other deltas.
size - radius in pixels (half the width for squares).
sizd - random extra size, so size 3 and sizd 5 gives 3 to 8.
fric - drag. 0 is none and 1 halves its speed every frame.
offx - width of the spawn area, centered on the point you give addp.
offy - height of the spawn area.
grav - downward pull each frame. Negative goes up.
xacc - sideways push each frame. Negative goes left.
col1 - the beggining fade color
col2 - the ending fade color
[Please log in to post a comment]




