pdParticles - Playdate particle system


Hey! I was bored today so I decided to start making a Playdate particle system called pdParticles
Currently it only suports drawing circles but I'm hoping to expand to rectangles, polygons, and images.
Just thought I should post it here since PD devs are the demographic for PD libraries

1 Like

added other shapes

1 Like

Looks good so far. I'm interested to see how this evolves over time.

1 Like

added image particles
giving it an imagetable makes each particle pick a random image from it

How fast is this running on device? Looks great.

There are some really quick and easy optimisations, by local aliasing the maths calls outside the loop & function and only using the alias inside the loop.

This reduces calls to the global math from many to one and is 30% faster.

local <const> random = math.random
for ...
    a = random(b,c)

I'd love to know your before/after figures.

1 Like

ooh didn't know that helped, I don't have numbers right now but I can take some sometime soon

1 Like