Guarantee a flat landing site for the colony rocket #163
Labels
No labels
assets
bug
duplicate
enhancement
help wanted
invalid
question
testing
ui
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
liamjd/UntitledColonyBuilder#163
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Milestone 2, item 2 ("we must ensure that there are flat 3x3 spaces for the rocket at the very least, on all maps").
Problem
The colony rocket is a 3×3 footprint, and placement accepts no level spread (
placement_controller.max_level_spread = 0). Today a seed can produce a map with nowhere to land: 9 of 10 islands at 32, 3 of 10 craters at 16, 1 of 10 plains at 16. With the rocket meant to be the first thing placed (#90), that is an unplayable run.#159, #160 and #161 make flat land common. This ticket makes it guaranteed.
Proposal
A post-generation pass, after #162's ramps and before painting:
max_step_levels, and the pad stays connected to the main region.TerrainGrid.landing_site() -> Vector2i, the pad's centre cell. That gives the future rocket-first flow (#90) and the camera something to target.Make the pad size a parameter (
landing_footprint, default 3×3) rather than a literal 3. Bigger first buildings are already on the cards; the milestone mentions "some building sizes and shapes".Use the same flatness test
PlacementRules.evaluate()applies (in bounds, walkable, spread ≤max_level_spread), ideally by calling it rather than copying it. That way, when the rule changes, the guarantee still means "the rocket can actually be placed here".Acceptance criteria
PlacementRules.evaluate()returns VALID for the colony rocket's footprint atlanding_site(). This should be a unit test: it is the milestone's headline guarantee.Depends on
#162. The pad must sit in the main region, and the ramp pass changes which region that is. #159, #160 and #161 are not hard dependencies, but without them this pass does all the work, and the result looks like it.