Wanted to throw something together for p8jam2, so did a spin on the forest-fire cellular automata.
Controls
Up/down: adjust probability of new fires
Left/right: adjust probability of tree growth
Button 1: reset probabilities
Button 1+2: reset map
(Warning: you could probably give yourself a seizure by cranking up the probabilities to the max.)
If you're not familiar with forest-fire, the rules are as follows:
1) A burning cell will become an empty cell
2) A tree will start to burn if at least one neighbor is burning
3) A tree ignites with probability f even if no neighbor is burning
4) An empty space fills with a tree with probability p
(from Wikipedia)
This is like closing your eyes and add pressure on it (like a finger). It's fun to watch!
Turning both knobs up to full seems to knock the framerate down to 15, haha. Nice sim!
Cellular automata is love. Cellular automata is life.
Very clean presentation, I love the look of the trees and the fire!
Thanks everybody. Threw up a new version today (1.02) that should run faster in case anyone wants to use the code as a base for other cellular automata.
Quite fun to tinker around with! I included it in my Pico-8 Jam #2 compilation video series, if you’d like to take a look :)
[Please log in to post a comment]