Spread of Eternal Fire

Was thinking about the longstanding issue of fire acting oddly when the player isn’t there to interact with it, and realized there’s a solution to the problem of keeping the map data loaded to handle the spread of fire when the player isn’t there. Jotting down the details for reference when I have time, or in case someone else decides to add it.

  1. Store a bitmap of whether each tile is flamable or not in the overmap. This would take about 2MB of memory if every map tile is loaded, but there are several measures we can take to mitigate this overhead.
    1. Only load bitmaps for map tiles that have been generated.
      1. This requires us to generate map tiles if fire spreads near them, but this should generally be pretty infrequent.
    2. Only load bitmaps for tiles that have flamable components, air, rock, river, roads, etc, as well as burned tiles don’t need to be tracked.
      1.a. Actually we only need to track bitmaps of map squares with flammable borders, if a fire can’t enter a square, we can just count the whole thing as non-flammable.
  2. Store timestamps of active fires to track the spread. For each square a fire spreads to, we just need the turn on which it caught fire.
    1. Possibly just store the timestamp of the first square that the fire spread to caught, and the bitmp of the rest.
  3. Each tick (not necessarally turn), process active fires with adjacent flammable squares and check for spread.
    1. Ideally this won’t be random, it’ll just spread to adjacent flammable tiles after a delay.
  4. When a map with a burned tile is loaded, any tiles that were on fire have the fire effect applied as of the timestamp recorded in the overmap, then fuel is consumed at the ordinary rate until the current time is reached. The expectation is that it will usually be burned out, which is really cheap to calculate.

Memory utilization might get out of control if the player explores too much. This is bounded by the number of overmaps that are loaded, probably never more than 10MB.
Processing the active fires in the background might get too expensive. This should be mitigated by only processing active fires on their appropriate tick, and fires going passive once they’ve spread to all adjacent squares.
Active and reactive entites like explosions and fire monsters will not be represented. For these to work properly they need to load the nearby map, process, then unload the map. This is possible but tricky.


you could do like rimworld and have rain just “happen” to occur whenever a fire gets too big.

Truth is, the Northeast just doesn’t burn very well. The fires in cataclysm tend to spread like today’s CA wildfires, but in the real-world NE, it is nearly impossible for fire to spread in our forests in anything but the hottest/driest summers - and even then just barely.

Now of course, the environment is changing rapidly in the post-cataclysm world, so perhaps things are getting more flammable, but for the most part NE forests aren’t prone to anything other than small brush-fires that rarely exceed a single acre in size, even if ignored.

As far as the game goes, living trees simply shouldn’t burn unless you apply a massive amount of heat to them first - like bathing them in a round or two of full flamethrower fuel, or stacking up dead-wood around them first. Brush mostly wouldn’t burn either except in particularly dry/hot conditions.

What WOULD burn more easily would be dead wood and dry brush - but those should only occur in modest clumps in NE territory, and only really during the summer months. Then you don’t have to worry about tracking massive over-world map burns, because they simply wouldn’t happen.

This is still a large fire from the games point of view, we currently have no way to handle it. Thats what this proposal is about. Also im not going to hard-code assumptions about new england into the game engine, that just means I’d have to redo the whole system if we ever wanted to do something as simple as setting the game world to be drier than the default.
Finally, we need to handle things like a player spreading accelerant around in a town in order to burn it to the ground, and medium-scale firebombing.
Players looove plalying with fire, I’m not going to prevent it from working entirely, though as you say, living trees should be fairly resilient to it.

Side issues, we already track rainfall, this can interact with fires:

1 Like