Finally got my #playdate! After some serious #optimization, my #fallingsand demo now updates 8 times per frame at 50 FPS. That's >400 times per second!
The trick: Instead of iterating over each pixel (bit) individually, I'm doing a bunch of bitwise operations per byte. #indiedev #gamedev

Thanks to a suggestion by @thomastc, I switched to iterating over the framebuffer in 32bit words. Took me a while to get the bitwise operations right and takes a lot more of them, but got me to nearly a 2x speed up. This is 800 grid updates per second. Still more potential for optimization but that's enough bit pushing for a weekend.

#playdate #indiedev #gamedev

@qgi @thomastc so are you updating the entire framebuffer at a higher frame rate but then still rendering at 50fps?
@qgi It might go even faster if you do it per uint32 since that is the native size of the Playdate's Cortex M7 CPU, or even uint64 as that is the width of its memory bus.