Large scale fortifications

hmmm… I’m actually wondering now if we’re over thinking this whole thing. If we can hoist “just enough” data up to the overmap level, then hordes can just interact with just those obstacles in a really direct way, and we don’t need to worry about all of this designation or flood-fill stuff.
I had outlined a similar approach for fire in Spread of Eternal Fire, but if we do the same thing for obstacles, we can treat hordes the same way, interacting with obstacles even when they’re “off-map”, and applying the results of those interactions once the affected map tiles are loaded again.

Quick sketch of how this applies to monsters:

  • Each square is represented by a tiny number, roughly speaking 0 for no obstacle, and increasing values indicating how hard the obstacle is to destroy. This number might be as small as 4 bits, giving 15 levels of toughness, which is a pretty wide range. Even for a whole overmap that’s just a MB or so.
  • When hordes are processed, they move around and potentially smash obstacles in their way.
  • If an obstacle is smashed, it gets set to 0, or possibly a special number that means “smashed”. When that map area is loaded, the map is edited to destroy the corresponding tiles.
  • If they can’t smash an obstacle, they will tend to wander “around” the obstacle, because they would do the same “stumbling” behaviour that they do when loaded on the map.
  • They only persistently smash at an obstacle if they get stuck trying to get to something, and even then they eventually lose interest and go back to wandering.
  • Defenses like traps and turrets might also get hoisted to the overmap so that monsters can interact with them. This is something that’s going to tend to make your base “sticky”, because most effective defenses are going to be a bit noisy and keep attracting monsters.