Log In  

3

Cart [#38232#] | Copy | Code | 2017-03-13 | Link
3

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.

Have fun!

simulation toy
P#38233 2017-03-13 22:44

::

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.

P#38236 2017-03-13 23:19

::

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.

P#38240 2017-03-14 01:26

Log in to post a comment

user:
password:

New User | Account Help
:: New User
X
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2017-05-27 02:23 | 0.253s | 1572k | Q:16