maniator / maniator/verticopolis

[P3] The figure-overlap guard cannot see occupants drawn as non-figure sprites

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

Nobody has claimed this yet.

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

Description

Deferred from the second gds-code-review of the room occupant seats fix (PR #831).

roomContainment.test.ts's "figures stand beside each other" guard locates figures by the contact-shadow literal rgba(0,0,0,0.24) that personFigure stamps. Occupants NOT drawn as the shared person build carry no such shadow and are therefore invisible to it: a daycare's children (daycare.ts child(), a 3px silhouette) and a spa guest on a massage table (a fold of shaded linen). Counting the comparisons the sweep actually performs, five swept kinds do zero of them: daycare, spa, and the Weight Floor / Boxing Gym / Climbing Wall fitness looks.

The daycare is the one that matters, because its places row is one of the rows this PR rewired. Measured: at 60-117px the last child (3px wide) collides with the caregiver's torso. That is BELOW the daycare's shipped widths (120px catalog and up) and the child paints over the caregiver rather than under, so nothing visible is wrong today, but the guard would not catch it if a width moved.

Fix: teach the guard to locate non-figure occupants too (each has its own stable literal), so coverage follows the occupant rather than the sprite build.

Related, smaller: the guard groups by exact foot baseline, so a future pair of figures 1px apart in y would be skipped silently.

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 roomContainment.test.ts, then inspect daycare.ts child() and the shared personFigure build to understand how occupants are located. Run the room containment tests and trace the sweep for daycare, spa, and the three fitness looks. Done means non-figure occupants are covered by stable literals and the exact-foot grouping no longer silently skips the described 1px case.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
game-dev, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.