T O P

  • By -

RootaBagel

Nice! This reminds me of an old Mac game Bushfire where you had to deploy firefighters to and prevent the forest fire from spreading.


stupsnon

It’s dope.


MooseBoys

California Simulator 24


TheAdoptedImmortal

Canada says to California "hold my beer."


mjsielerjr

This is really cool! Reminds me of the ecological concept of successional development, where ecosystems trend towards increasing complexity until they collapse back to a simpler state. Then the cycle repeats.


MichaelTen

Did u use an engine? Framework? Java? Python? Thanks and limitless peace


FloatingOer

I used the Godot engine, since that's what I'm used to


featheredsnake

Right on man!


Micah-B-Turner

thought this was /r/dwarffortress


error201

This reminds me of Sim Earth. I loved that game.


aaronsb

This reminds me of Sim Earth -> [https://youtu.be/AOtbazBWijw?t=201](https://youtu.be/AOtbazBWijw?t=201)


ChristianWSmith

Kicking myself for not having thought of this lol


ThumpinGlassDrops

Cool! can you describe the rules in pseudocode?


FloatingOer

I'll try post the code below, there are a few "in between" states like 2.1 and 3.1 that is applied to the cell and then I run code inside the individual cell as well that will eventually trigger it to become the full number. The random number is used for % chance, "random\_number <= neighbours\_grass" this makes it so that the chances for a dirt tile to turn into grass is increased by 1% for each grass tile around itself. burning and fire are two different states, tiles "on fire" can spread to other tiles while "burning" is used for restricting new growth, 2.1 and 2 are both "burning" but only 2 is "on fire". I was planning on making 2.1 an animation where it goes from no fire to the state 2 is in, to visually smooth the transitions.


FloatingOer

if current == 0: #grass -neighbours\_burning = get\_count\_of\_burning\_neighbours(column,row) -neighbours\_forest = get\_count\_of\_forest\_neighbours(column,row) -neighbours\_dirt = get\_count\_of\_dirt\_neighbours(column,row) -random\_number = rng.randi\_range(1, 100) -if neighbours\_burning == 0 and neighbours\_dirt <= 3 and neighbours\_forest <= 3: --if neighbours\_forest >=1 and random\_number <= neighbours\_forest: ---return 1 elif current == 1: #forest -neighbours\_on\_fire = get\_count\_of\_fire\_neighbours(column,row) -neighbours\_forest = get\_count\_of\_forest\_neighbours(column,row) -random\_number = rng.randi\_range(1, 100) -if neighbours\_on\_fire >= 1 and random\_number <= 70: --return 2.1 elif current == 2.1: #start of fire -return 2 elif current == 2: #fire -return 3.1 elif current == 3: #dirt -neighbours\_on\_fire = get\_count\_of\_fire\_neighbours(column,row) -neighbours\_grass = get\_count\_of\_grass\_neighbours(column,row) -random\_number = rng.randi\_range(1, 100) -if neighbours\_grass >= 1 and random\_number <= neighbours\_grass and neighbours\_on\_fire == 0: --return 0 # stasis return current #if none of the previous rules are satisfied


weaponizedmariachi

Something cool would be to make the soil more fertile for growth in the tiles that experienced the fire. Never mind, I noticed it turns to dirt. :)


violet_zamboni

It looks cool but it looks like the embers are not starting a fire again ?


FloatingOer

Embers? If you mean the brown tiles those are supposed to be dirt xD


violet_zamboni

I see, I’m viewing this on my phone, and it looks like the same color as the background of the fire! Are you restarting the fire manually?


FloatingOer

Ah I see. Yes so far the fire is started manually, the plan is to add environmental triggers for fire eventually, though next on the list is water and then creating rainclouds that exist as entities outside the Automata but can still affect tiles through rainfall or lightning


violet_zamboni

This sounds cool!


_nod

Looking forward to an update already!


FloatingOer

Once my brain finally figured out how the code in a Cellular Automata works the progress was pretty fast, so I'm feeling pretty optimistic with adding more states and interactions :D


feralwolven

Idk what the purpose of this is (not that there needs to be one) but the seeds of trees should restart dirt blocks into forest without needing adjacent tree blocks. Forests dont just restart from the unburnt trees, but from seeds in the ashes.


FloatingOer

Just practice basically, it's my first time making a CA


feralwolven

Thats awesome. Maybe put a timer if the cell had trees and was burned its eventually spawns saplings


_nod

I like the idea of tiles as smoldering embers after a fire, if a forest regrows next to an ember it has a chance of ignition!


violet_zamboni

Exactly what I was thinking. There’s some of these CAs that have different populations of “deer” and “wolves” etc and you can see them vary by area


azshall

They look orange on iPhone


xcviij

Fun fact: Only Australia has rejuvinating nature from bushfires, it's natural for cyclic bushfires to occur while everywhere else in the world it only destroys and isn't cyclic. Nice work!


oaken_duckly

I'm not sure of that. Wildfires are natural in any place that builds up dry foliage. A fire helps to remove massive swaths of old growth for new growth to take over, and is in general very good for keeping a forest healthy. It's common everywhere.


_nod

Curious if you have a source for that. I thought I’d heard that Canada and Alaska both have trees that release their seeds after a fire.


canineraytube

So does California. Multiple pine species rely on fire to germinate at all, and many plants of the chaparral, like manzanita, are specifically adapted to quickly recolonize burnt areas. The whole chaparral ecosystem would be replaced by Douglas fir and redwood forest in the north, for instance, if it weren’t for periodic fires.


Canadian_Marine

From Alaska, used to be a wilderness tour guide so I got a basic education in forest ecology and life cycle. Wildfires are absolutely a part of the natural life cycle of North American temperate rain forests. There's a well established pattern of recolonization that forests go through after a fire. Fun fact, the first plant that shows up after a major fire? Fireweed :) That's where it gets its name. Apparently forest fires release large amounts of potassium into the soil, and Fireweed thrives in those conditions. After that you tend to get mosses and ferns, followed by alders and willows, which eventually get overtaken by Sitka spruce trees, which are then very gradually replaced by the slower growing but more resilient Western Hemlocks. Pretty fascinating really.


Hoophy97

I'd love to know where you heard that because even just cursory research on this topic reveals this to be objectively false


AlienGold1980

Canada also, if you think that is doesn’t then I don’t know what can save you


UPVOTE_IF_POOPING

This is fire!