[Lab] Creating Procedural Maps!

Greetings once again, Survivors!
Today we're back with another Lab post to talk about how we're prototyping the new re-vamped version!
We've talked about map diversity, character diversity, and a re-vamped meta-game system as goals for our redesign, and today we're going to talk about the first of these, a Procedural Random Map Generation System that we're testing as a means of map diversity.
[h3]Design Goals and Uses for Random Maps[/h3]
With the reorganization, we're separating tactical stages into two broad categories: primary locations for story progression (hereon referred to as "Story Maps") and secondary locations for collecting resources (hereon referred to as "Resource Maps”) ...
Story maps will still be manually designed similar to the current EA version maps, while Resource maps will use a randomized map system that will allow for an endless variety of compositions.
To do this, the first goal was to answer the question, "Is it possible to randomly generate a room's interior?"
This is because our combat system is largely based around the idea of encountering enemies while uncovering a "view blocked by walls and doors," and we needed a procedural generation structure that would work for this design.

We started by creating a rule that would generate "rooms" within a simple rectangular building. The assumption was that if we split each room into "walled areas" based on random values, and then applied a rule that would generate doors close to the center of each wall, we could create building shapes similar to those we currently have in EA.
We thought we could apply random value noise to the map, placing objects in locations where the density of that noise was above a certain value, and use an algorithm to remove any blockages from doors and walls. This could give a unique layout and experience each time.

We prototyped and tested this quickly, and the feedback we got was that if we could randomize the types and locations of enemies that appeared, it would be a pretty good "Resource map".
However, aside from gameplay, after reviewing the object placement in conjunction with artwork, we decided that this logic could not be used as is.
[h3]Placing "Plausible" Objects on a Random Map[/h3]
Currently in EA, there is a narrative behind each map, such as "the Grocery" or "the Small Village", and the placement of objects in each room is something that the art team works on to "represent" that setting.
For example, in the screenshot below, in the room you can see a counter where customers were greeted and served, so the long table placed in position C serves both a gameplay role as an obstacle and a narrative purpose to make it look like a grocery store.
This led to the addition of "a bench for guests to sit and wait" (B), "corpses of looters who had barricaded themselves against the Infested with tables, crates, etc." (D, E), and the addition of secondary objects for visual balance (A).

The question was, if the farming maps were to be randomly generated, would it be possible to achieve a believable placement of objects? If the maps were to have a strong narrative, like the Stag Manor or the Aldris rescue scenario in the Monastery, then they would be story maps, but even farming maps should at least look like believable locations.
The noise-filtered object placement we tested above didn't allow us to achieve this goal, so we decided it would be better to have fixed room modules from the start, rather than having to modularize the noise filter applied to the grocery store, the noise filter applied to a living area, etc.
To address this, we asked the art team to document “Object Placement Rules” based on the EA version. Whereas up until now, the artists had placed map objects according to their sense of narrative, the goal was for the “Random Map System” to allow the algorithm to mimic this choice.
Obviously, we couldn't program/automate "exactly" the way the art team had been placing objects, but we felt that we could make some generalizations, such as the art team's preference to "fill the top walls with objects so they don’t look bare”.
So, while we kept the existing "wall/door generation algorithm", we started creating rules to "backwards infer" how the art team placed objects to the level design.

It would be too complicated to write down all those rules in this note, so I'm going to focus on screenshots of the results of randomly simulating those principles of object placement.
Once the intermediate work up to this point was shared, the "non-art" team members thought, "Yeah, that's pretty good, I guess."
Since the spatial setting of the farming map was not going to take on a narratively significant shape, the idea was that if we could get the above object placement working generally, we could make it look "different" by creating variations such as "Grocery objects", "Living area objects", "Weapon storage objects", etc.
Using the results of these experiments, we created new generation rules and verified they worked, which resulted in a random map as seen below. Gameplay-wise, it was still fun to play and also respected the art team's object placement rules.

However, this was also rejected after a review with the art team. The reasoning was that a structure generated like this wouldn’t look like a "real house" - more precisely, it would make it difficult to tell the difference between a hallway and a room, so all spaces would feel the same.

This means that the blue part of the image above should be created as a separate tile set as “Hall (Living Room)”, and the green part should be created as “Room”, so that it is more clearly recognizable and diverse.
The solution to this problem was also discussed and a new rule was created and validated. However, these rules are still in the process of being implemented, so we'll have to wait to be able to share more details and screenshots till after they’re fully organized.
Since the game is set in buildings rather than underground dungeons, it's a daunting task to meld these narrative and artwork generation methods and gameplay with procedural random map generation rules.
In fact, we tried something similar about two years ago, and found that it wasn't easy, so we switched to a hand-crafted approach.
However, unlike two years ago when even the basic rules of the game were still undergoing changes, we now have a clear set of principles for "what patterns should be followed in level design to align with the combat system", so while it's taking some time, we feel it’s an achievable goal.
We’ll be back next week with another Lab, and we’ll show you some more progress on the procedural maps we talked about today, as well as some new things we're trying out in the combat system.
As always, thanks for sticking with us!
REMORE