Zombie Update 1

I’ve decided to start sharing change logs! This is just a compilation of the most recent notable changes. I’ll make proper full change logs that detail every single thing in the future once its released. For now, though, you only need the essentials! The current goal right now (and probably for the foreseeable future) is to get a basic zombie apocalypse simulator up and running. I’ll add the fancy stuff once the foundation is up!

  • Zombies now chase survivors. They’re not very good at navigating complex spaces as expected. Move intelligently and you can lose them!
  • Zombies randomly lose interest in targets they cant detect anymore. Leave their line of sight and they’ll eventually stop following you.
  • Zombies have better pathfinding now that results in them surrounding targets. Move carefully or you’ll find yourself in the middle of a horde.
  • Zombies can now attack and kill survivors.
  • Survivors will rise as a zombie after a few turns if killed by one.
  • Zombies eat fresh corpses and most will ravenously swarm it.
  • Zombies will ignore most distractions while eating. Take advantage of this to escape or alternately put a few easy zombies into the ground. Or, if you’re a real meanie, kill someone to really distract them with a fresh meal.
  • Zombies use rects for target selection instead of fov calculations. This is less realistic but dramatically more performance friendly.
  • Improved tile drawing speed by only processing the bare minimum. This means only tiles that are both visible and within the camera viewport.
  • The game now starts with no zombies. Instead, a few survivors begin as infected. They randomly succumb after a few turns and turn into zombies.
  • More survivors spawn at a random location if there’s too few of them.
  • If there’s no zombies left then a few random survivors are artificiality infected to give the apocalypse a reboot.
  • I added a zombie spawn limit since it was getting to a ridiculous point where almost every single tile was filled with them in really long games.
  • Greyops random event has been added. They’re a squad of elite zombie slaying special forces that enter from a random map edge and carve a path of destruction to random waypoints. They prioritize zombies but will engage survivors that get too close. They have some special anti zombie items and high end military gear.

The undead masses

I implemented a swarming behavior today for zombies! They now actively surround targets. If you’re not careful then you’ll end up in the middle of a ravenous horde. You can actually see this happen to several survivors here.

The zombies ignore me so just pay attention to the yellow S’s in game or the yellow squares on the minimap. This is a natural result of how their pathfinding works so its still very performance friendly as there’s no need for flanking calculations or other frame devouring non-sense.

Previously, they would just form a nice and orderly line due to how their pathfinding worked. It’s like they’re patiently waiting for their turn to get a bite. You could sit their for a million turns and those zombies would never move. It just looked wrong and doesn’t seem very zombie like to me. They’re stupid, sure, but they’re also hungry! In media zombies will usually bunch up together in tightly crowded packs or even climb over one another. They never just patiently form a orderly que when fresh brains are present.

This is happening due to how the zombies move. They path by searching their neighboring tiles to find which one is closest to their target. Then they move to it! That’s literally it. They ignore walls and other movement blocking terrain when analyzing these neighbors. However, if said tile is occupied by a fellow zombie then they don’t move. That’s where the problem came from! I shouldn’t really call this pathfinding since there’s no real thinking involved but I don’t know what other term to use.

I had to give them a form of pathfinding that was not only believably stupid but also capable of somewhat trailing a target. It also had to be performance friendly since there’s potentially hundreds if not thousands of zombies active at once depending on the map size. If you look at this example again and look in the corner you’ll notice a counter displaying how many zeds are present. It would of been easier to just give them astar or dij-whateverthefuck but then they would of been too smart.

The way I made this possible is actually pretty simple. If the tile a zombie wants to move to is occupied by another zombie they will choose a new random neighbor and move to it instead of waiting in line like gentlemen. This clears up traffic jams which enables the swarming behavior as a result.