Been lurking in this games section, seeing all the really cool stuff for a while so figured it was time to post something.
I've been having a go at making some metaballs run on playdate as a fun little experiment. I've found plenty of really great websites about the technique but these are a couple if you are unfamiliar -
I've got the main functionality of it in C and call into it from Lua. I've done some optimising but I'm sure there is more for me to squeeze out of it.
I'm using a sprite with a draw callback so I can use the addDirtyRect functionality and only redrawing areas where the balls move.
I'm using drawLine when fill is false and fillPolygon when it is true.
So far when the balls are moving and allowed to fill the whole screen I can only get a few balls before dropping below 30 which isn't great. Perf is a bit better when when they are not filled. And when I increase my resolution value (which maybe counter-intuitively makes them look worse) then I get better perf as you can see here -
My half game idea I have won't involve the balls moving all the time though so performance wise it should be fine as they only need to recalculate / redraw when they move.
Would love any feedback or optimisation ideas.