CleverRaven / CleverRaven/Cataclysm-DDA
City plazas no longer exist
- Dominant language
- C++
- Stars
- 13.1k
- Forks
- 4.6k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 200
Description
### Describe the bug
A city plaza is defined as a 2x2 or larger rectangle of adjacent 4-way intersections. Prior to early 2016 it was just any adjacent 4-way intersections. In 2016 when I rewrote the road mapgen code, they appeared occasionally in cities. At some point since then, the overmap generation seems to have stopped ever creating that arrangement of road tiles, which makes the code paths for them in mapgen_road() dead and obsolete.
### Steps to reproduce
1. Start a game
2. Debug reveal the overmap
3. Search the map for any rectangle of adjacent 4-way intersections
4. Teleport to another overmap
5. Repeat from 2
### Expected behavior
Find occasional plazas
### Screenshots
_No response_
### Versions and configuration
- OS: Linux
- OS Version: LSB Version: n/a; Distributor ID: ManjaroLinux; Description: Manjaro Linux; Release: 22.0.0; Codename: Sikaris;
- Game Version: 0.C-73761-gea1e28fdbc [64-bit]
- Graphics Version: Tiles
- Game Language: English [en]
- Mods loaded: [
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
No Fungal Growth [no_fungal_growth],
Bionic Professions [package_bionic_professions]
]
### Additional context
For anyone who never saw them generated, a city plaza has a one lane road around a big area of sidewalk in the middle, with trees and benches, occasionally small round shallow water meant to be a large park fountain, etc. https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/mapgen_functions.cpp#L801-L829
I suspect this behavior was lost around https://github.com/CleverRaven/Cataclysm-DDA/commit/3c7d0943fef5dc8308ad7360e3fb13a89e96e21e but I haven't bisected to confirm. @codemime or @Coolthulhu might be able to weigh in, if they are still around.
This is relevant today because I'm working on replacing most of mapgen_road() with json-based mapgens that will be easier to edit and customize.
With the new city block overmap generation, a viable path might be to replace some whole city blocks, possibly only in larger cities, with roads. Or to just explicitly and intentionally abandon this functionality.
Contributor guide
Research direction
Start with mapgen_road() and the city-plaza code in src/mapgen_functions.cpp around lines 801-829. Reproduce the issue by revealing overmaps and searching for rectangles of adjacent 4-way intersections, then inspect commit 3c7d0943fef5dc8308ad7360e3fb13a89e96e21e for the suspected regression. Done means determining whether plazas should be restored or intentionally abandoned, with the affected paths reflecting that decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100