The Falling Sand game has been around a long time, but I didn't see a Pico-8 port.
The reason for that is: it's really hard to get a decent-sized grid to run at full speed on the Pico. This implementation runs a little slower than 15FPS (when running the simulation) on my machine, so it isn't quite as smooth as I'd like, but still pretty playable. In the future, I'd love to post a faster version, but I've hit a bit of a wall with the Lua optimizations I'm already aware of.
If you're not familiar with Falling Sand, the basic idea is that you're simulating a bunch of elements in a grid, where different elements react in different ways - oil floats on water, fire burns wood, plants grow when watered, and so on. It's fun to play around and build things, but there's no goals or progression, really.
a tradeoff i used for mine (which isn't as complete as i'd like) was to use the sprite sheet to represent where everything was, and then draw everything using sspr, which is much faster. unfortunately, the way i did it limited me to a maximum of eight materials (though i ran out of time to implement even that many before my submission date), and i see you have more.
Yours is quite fast - I'm pretty impressed! I liked the UI, too.
I couldn't determine if any of your elements react or decay - I think that's where most of my time is spent, as opposed to drawing.
Some of my inner loops are tight enough that the change from calling a custom function to aliasing peek/poke to local variables and calling them with the simplest possible pointer arithmetic was the largest savings, and accounted for half of the CPU time in early testing.
Log in to post a comment