Log In  

9

Cart [#22146#] | Copy | Code | 2016-06-02 | Link
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)

p8jam2
P#21388 2016-05-26 08:11

::

Sweet :-)

P#21400 2016-05-26 10: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

::

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

P#21884 2016-05-31 01: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

::

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

::

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

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-11-19 12:21 | 0.182s | 1835k | Q:23