maniator / maniator/verticopolis

[P2] Rooms draw fewer occupants than they hold at the 10px tile

Open
#813 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Found by the adversarial review on PR #811.

Furniture pitches inside room layouts are fixed pixel literals while unit widths shrank 9% with the scale change. Measured maximum figures drawn across all geo variants at full population, old 11x44 against shipped 10x45:

  • office (pop 6, 9 tiles): 5 -> 4 (meeting layout: tw = min(round(w*0.6), 60) 59 -> 54, chairs = floor(tw/11) 5 -> 4, src/render/pixelSprites/residential.ts:174-176)
  • amusements (pop 25, 12 tiles): 7 -> 6
  • boutiqueBay (pop 22, 12 tiles): 18 -> 16

The "occupancy is honest, no ghost people" guard in residential.test.ts only asserts min(occupants, seats) for three occupants, so it cannot see the seat count falling. Under-drawing is the opposite failure from the one that suite was built to catch: workers who are present but invisible.

Two assertions in that suite are currently pinned to the reduced behavior with a TODO pointing here, after the test was corrected to use real widths (it had been asserting against stale 66/121 literals from the old tile, so it exercised geometry the renderer never produces).

A first attempt at deriving the pitches from TILE (slot = 2 * TILE, floor(tw / TILE)) did NOT restore the counts, so the cause is not only those two literals. Diagnose before changing art.

Fix goes through the room-design approval gate in the visual-parity GDD.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/render/pixelSprites/residential.ts around lines 174-176 and residential.test.ts, reproducing the reduced occupant counts with the real room widths. Trace the geometry and layout assumptions beyond the two cited literals, then update the behavior and assertions so full-population rooms draw all available occupants without ghosts. Validate the visual-parity GDD room-design approval gate.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.