Make the world react to the player's location. Connect physical space to game logic.
Position triggers state. When the player walks into a zone, the game state changes. This connects the 3D world to the systems we'll build in Week 3.
If in Manhattan zone → riskLevel increases. If in Camp → can bank (later). For now, console log "Danger Zone" or "Camp".
If on a lot → can build (later). If outside lots → no action. For now, console log "On Lot #3" or "Off Lot".
Define game state and check player position each frame:
Position checking inside the animation loop:
Walking into a new zone prints a message ONCE (no spam). State updates correctly.
No encounters yet. No battles. No store. Just detection. Systems come Week 3.
Logging every frame instead of only on zone change — the console fills with thousands of identical messages.
Wrong boundary coordinates — the zones from Day 9 don't match the detection boundaries.
Not storing previous zone to detect transitions — without comparing old vs new, you can't detect the moment of crossing.
This completes the 3D world foundation. After today, both kids have a walkable world with zones. Celebrate this — it's v0.2. Point out how Days 1-5 (design + text prototype) now connect to Days 6-10 (visual world). Next week, the systems merge.
Both games have a working 3D scene with camera, player movement, defined zones, and zone-based state detection. The stage is set for systems.