Add minimap. Some perforarmance tweaks especially around bread crumbs.
This commit is contained in:
@@ -17,3 +17,9 @@ There is no automated framework yet, so rely on focused manual passes. Before op
|
||||
|
||||
## Commit & Pull Request Guidelines
|
||||
Existing history favors short, descriptive subjects ("Player's position is reset when close to ghosts"). Follow that tone, keep subjects under 72 characters, and add body lines for rationale or performance numbers. Each PR should include: summary of gameplay-visible changes, configs or assets touched, reproduction steps or screenshots when visuals change, and confirmation that `make` succeeds on a clean tree. Link related issues and call out any follow-up tasks explicitly.
|
||||
|
||||
## Minimap Implementation Plan
|
||||
- Add minimap config keys in `ghostland.json` (enable flag, width/height, margin, colors). After loading `maze.txt`, cache 2D wall segments plus world bounds for quick reuse.
|
||||
- Create a lightweight 2D orthographic shader/VAO for overlay drawing; use GL_LINES for walls, triangle-fan circles for breadcrumbs/ghosts, and a small triangle for the player arrow. Disable depth test while rendering the overlay near the end of the frame.
|
||||
- Each frame convert wall endpoints and breadcrumb/ghost positions relative to the player’s X/Z so the minimap scrolls with the player centered. Clip or skip segments outside the visible minimap extents.
|
||||
- Draw order: white background quad, wall lines, breadcrumb dots, ghost dots (border then fill), red arrow rotated by player yaw. Re-enable depth test and continue with HUD text.
|
||||
|
||||
Reference in New Issue
Block a user