I've been slowly pushing forward with random level generation over the last few months and have finally reached a point where I can say with confidence that the concept is proven and working even better than I'd originally hoped. I opted for randomly generating levels at runtime so that the demo I release later this year can feature Survival Mode, a game mode that lacks any narrative and instead tasks the player with simply surviving the hordes of zombies as they work towards finding a cure for their infection. This would allow me to release the demo much sooner, leaving me the remaining time until release to focus on the narrative itself and fixing any bugs, etc.
In the video above, I quickly walk you through the process used for generating a level. Each city is divided into quarantine blocks separated by large doors and gates which are initially locked. Once the player finds the corresponding key, they can progress through to the next zone which is chosen at random. Quarantine blocks are constructed using a randomly selected base - made up of streets, sidewalks, and quarantine walls - which are then populated with a structure layout, again selected at random. On top of that, each structure itself - regardless of which structure layout is chosen - can have one of the numerous interior layouts selected, ensuring that each playthrough will be a unique experience for the player. Lastly, occlusion culling is baked in the editor and ready to be leveraged during runtime by essentially combining the OC data for each prefab into a single, cohesive culling system.
For Story Mode I plan to use a similar process with one exception: several of the blocks will be pre-determined and tossed in the mix at appropriate points. These particular zones will be used to advance the narrative, the remaining blocks being used as filler, thereby ensuring that I am saving myself a lot of time by skipping the level design process (almost) entirely. Coupled with the custom map editor I've built in Unity, I'm able to create new zones and structure layouts fairly quickly, and with each new zone, I expand the total number of possible combinations for each level greatly.
Work has been done on the in-game Photo Mode as well, which likely doesn't require much explanation, but I'll do a quick run-through here regardless. Photo Mode essentially freezes the entire game world and then provides the player with controls to freely move the camera anywhere they want in order to easily take screenshots at any point during gameplay. Four effects are provided for customizing the look beforehand, and all screenshots are saved to the computer for easy access later on.
Photo Mode is still in its infancy since I only focused on the basics so that I could take screenshots to share on social media more effectively. It's worked out well so far, especially as far as saving me time, but I'll certainly be giving this system some polish in the near future.