Objective: write an algorithm that can create a floor plan (single story) that is reasonable enough to be used as a top-down close quarter combat (CQC) game map.
I don’t know how to do it yet, so I’d study some basic floorplan design principles. The remaining of the article would be my notes watching this video.
- Size of the floorplan
- Number of stories
- Number of each type of rooms, also garage
- Thickness of external/internal walls
Features of Space/Room
Y/S/N – Yes/Semi/No
- Sqft needs (Y/S/N)
- Adjacencies (list of room references, immediate or not)
- Public access (Y/S/N)
- Daylight/Views (Y/S/N)
- Acoustical privacy (Y/S/N)
- Plumbing (Y/S/N)
- Special equipment (DW, MW, Refri…)
Macro Constraint Solving
- Fill in the features of each unary feature (anything other than adjacency) with average value + variation
- Create a few reasonble and strict requirements on adjacency
- Constraint solving on adjacency
- Generate Relationship-Diagram (9:08 in the video)
Grouping by Constraints
- Group rooms by their features. (e.g. kitchen+living room + dining room since none of them requires privacy)
- Place rooms in different directions and makes it somewhat reasonable.
Abstract Floor Plan
- Follow the grouping result, draw circles of correct scale with respect to the actual space requirement, at the approximate place we planned earlier.
- Ensure each “connected component” is pure, rather than mixed with private and non-private.
- Set daylight direction and try to satisfy lighting/view requirements.
- Resolve adjacency problems by not allowing adjacency edges to cross. (How)
Draw bubbles (fat circles just like in the abstract floor plan) and make them fit.
Growing bubbles and make them squarer. Okay to leave some space in between squares as hallways.
(How to make things align though?)
Figure out room sizes
Tip: sum of furniture area + circulation room ~= final room size
Ideas: pre-make furniture assets so save some difficulty generating furnitures.
Open Correct Doors
- Open correct doors according to the adjacency map.
- Make sure every room can be accessed
- Special restrictions for bathroom
- Keep doors away from beds, toilets, desks
- Pluming walls
- Exterior walls
- Seperating walls
- No walls (Imaginary walls that’s removed with common sense, e.g. living & dining & kitchen)
- Half walls (Shelves or anything that works as a half-separation)