Log In  

Cart #22146 | 2016-06-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
9

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)

P#21388 2016-05-26 08:11 ( Edited 2016-06-21 15:04)

Sweet :-)

P#21400 2016-05-26 10:57 ( Edited 2016-05-26 14:57)

This is like closing your eyes and add pressure on it (like a finger). It's fun to watch!

P#21541 2016-05-28 06:14 ( Edited 2016-05-28 10:14)

Turning both knobs up to full seems to knock the framerate down to 15, haha. Nice sim!

P#21884 2016-05-31 01:43 ( Edited 2016-05-31 05:43)

Cellular automata is love. Cellular automata is life.
Very clean presentation, I love the look of the trees and the fire!

P#21920 2016-05-31 12:20 ( Edited 2016-05-31 16:20)

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.

P#22147 2016-06-02 22:39 ( Edited 2016-06-03 02:44)

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 :)

P#23370 2016-06-21 11:04 ( Edited 2016-06-21 15:04)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 20:02:24 | 0.016s | Q:29