Testing Guide for Overlay Rendering Fix
How to Test the Fix
Prerequisites
- Build the project with the latest changes
- Load an isometric level (e.g.,
isometric_quest_solo.tmj) - Have the game running with a player entity spawned
Test Steps
1. Enable Grid Overlays
Press TAB key to toggle grid overlays on/off.
2. Verify Navigation Overlay
- Expected: Green/translucent overlay on all navigable tiles
- Before fix: No tiles rendered (0 displayed despite 3177 loaded)
- After fix: All 3177 navigable tiles should be visible
3. Verify Collision Overlay
- Expected: Red/purple overlay on blocked tiles
- Before fix: No tiles rendered
- After fix: All blocked tiles should be visible with purple circles
4. Check Debug Logs
Look for these log entries in olympe.log or console output:
During Level Loading:
[1/2] Processing tile layers for navigation...
Processing navigation from layer: graphicmap_ground (184x128, data size: 23552)
DEBUG: Set navigable at tile (0,0), tileId=XXX in layer 'graphicmap_ground'
DEBUG: Set navigable at tile (1,0), tileId=XXX in layer 'graphicmap_ground'
...
-> Marked 3177 navigable tiles in this layer
-> Processed tile layers: 3177 navigable tiles
DEBUG: Verifying tile data can be read back...
-> Sample navigable tile at (0,0)
-> Sample navigable tile at (1,0)
-> Sample navigable tile at (2,0)
-> In first 10x10 grid: XX navigable, XX blocked
During Rendering (First 3 Frames):
[GridSystem] RenderNavigationOverlay call #0
World bounds: x=XXX, y=XXX, w=XXX, h=XXX
Corner grid coords: TL(X,Y) TR(X,Y) BL(X,Y) BR(X,Y)
Grid range: (minX,minY) to (maxX,maxY)
Tiles to scan: XXXX
DEBUG: Test tile (67,39): navigable=YES, blocked=NO
DEBUG: Test tile world coords: (810.XXX,1441.XXX)
DEBUG: Is in grid scan range? YES
-> Navigable tile #1 at grid (X,Y)
World coords: (XXX,XXX)
-> Navigable tile #2 at grid (X,Y)
World coords: (XXX,XXX)
...
-> Scanned XXXX tiles, found XXXX navigable tiles
5. Verify Specific Expectations
Player Spawn Tile Test:
- Tile (67, 39) should be:
- Marked as navigable:
navigable=YES - Not blocked:
blocked=NO - In the viewport scan range when player is visible
- Rendered with navigation overlay
- Marked as navigable:
Tile Count Match:
- Tiles found during rendering should match loading count
- Loading:
3177 navigable tiles - Rendering:
found 3177 navigable tiles(across all frames showing tiles)
Corner Coordinates:
- All 4 corners should have different grid coordinates for isometric maps
- Example for isometric:
- TL and BR will have similar Y values (vertical extent)
- TR and BL define the X extent (horizontal extent in diamond)
Visual Verification
Navigation Overlay Appearance
Viewport (Screen Space) Grid Overlay (Isometric)
┌───────────────────┐ ╱╲
│ │ ╱ ╲
│ [Game View] │ → ╱ ○○ ╲
│ │ ╱ ○○○○ ╲
│ │ │ ○○○○○○ │ ← Navigable tiles
└───────────────────┘ ╲ ○○○○ ╱
╲ ○○ ╱
╲╱
Each ○ represents a navigable tile rendered with the overlay color.
Expected Behavior
- Movement: Overlay should move smoothly with camera
- Zoom: Overlay tiles should scale with zoom level
- Coverage: All walkable areas should have overlay (no gaps)
- Performance: No noticeable frame rate drop
Troubleshooting
If No Tiles Render:
- Check
olympe.logfor initialization errors - Verify collision map dimensions: should be
184x128 - Confirm tiles are being loaded: check for "Marked 3177 navigable tiles"
- Ensure overlay is enabled: check
showNavigationOverlayflag
If Partial Rendering:
- Check corner coordinates in logs - all 4 should be different
- Verify grid range includes expected tiles
- Check if
tilesScannedmatches expected viewport coverage
If Wrong Colors:
- Check overlay color configuration in grid settings
- Verify layer index matches expected collision layer
- Navigation: typically green/cyan (configurable)
- Collision: typically red/purple (configurable)
Performance Benchmarks
Before Fix:
- Tiles scanned per frame: 0 (incorrect viewport bounds)
- Tiles rendered: 0
- Grid range: Very small or empty
After Fix (Expected):
- Tiles scanned per frame: ~500-2000 (depends on zoom and viewport size)
- Tiles rendered: Matches tiles found (all navigable in viewport)
- Grid range: Diamond-shaped area covering full viewport
Performance Impact:
- Additional overhead: ~2 extra WorldToGrid() calls per frame
- Negligible impact: <0.1ms on modern hardware
- Memory: No additional allocations (uses existing tile data)
Success Criteria
✅ All criteria must pass:
- Navigation overlay displays tiles (count > 0)
- Navigable tile count matches loading (3177 tiles total)
- Player spawn tile (67, 39) confirmed navigable and visible
- No performance regression (FPS remains stable)
- Overlay moves smoothly with camera
- Debug logs show all 4 corners being checked
- Grid range forms a diamond shape for isometric maps
Additional Tests
Camera Movement Test
- Move camera around the map
- Verify overlay updates correctly
- Tiles should appear/disappear at viewport edges smoothly
Zoom Test
- Zoom in: Tiles should become larger
- Zoom out: Tiles should become smaller
- Verify no tiles disappear unexpectedly
Layer Switch Test
- If multiple collision layers exist, switch between them
- Verify overlay updates to show correct layer's tiles
- Check layer index in debug logs matches selected layer