Skip to content

Tron visual overhaul: fog, TronWall shader, HUD, minimap#3

Merged
AndrewAltimit merged 2 commits intomainfrom
tron-aesthetics-improvement
Feb 17, 2026
Merged

Tron visual overhaul: fog, TronWall shader, HUD, minimap#3
AndrewAltimit merged 2 commits intomainfrom
tron-aesthetics-improvement

Conversation

@AndrewAltimit
Copy link
Owner

Summary

  • Distance fog: objects beyond 50 units fade to black, creating Armagetron-style atmosphere (disabled for non-Tron games)
  • TronWall shader: new fragment shader with dim body + bright top-edge highlight for trail walls and arena boundaries
  • Camera tuning: lower (6 units), closer (12 behind), wider FOV (70deg), longer look-ahead (30 units)
  • Player name labels: 3D-to-screen projected names floating above each cycle with neon glow
  • Minimap: bottom-center 2D canvas showing wall segments and cycle positions
  • Speed/rubber/brake gauges: bottom-left bars for local player
  • Grid lines: hair-thin (0.08) semi-transparent Unlit material instead of thick Glow
  • Cycle sizing: smaller, sleeker bodies (0.8x1.5x2.0 vs 1.2x2.5x3.0)

Files changed (15)

  • 5 GLSL shaders modified + 1 new (tronwall.frag)
  • 6 Rust files (app.rs, bridge.rs, camera_gl.rs, tron_render.rs, renderer.rs, scene.rs)
  • 3 web files (index.html, style.css, ui.js)

Test plan

  • cargo fmt --all -- --check passes
  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test --workspace passes (527 tests)
  • wasm-pack build succeeds
  • Visual test: create Tron room, verify fog fades distant objects to black
  • Visual test: trail walls show bright top-edge highlight
  • Visual test: player names float above cycles
  • Visual test: minimap renders at bottom-center with wall lines and cycle dots
  • Visual test: speed/rubber/brake gauges appear for local player
  • Regression: non-Tron games unaffected (fog_density=0)

Generated with Claude Code

AI Agent Bot and others added 2 commits February 16, 2026 12:34
- Pure black background (clear color override for Tron)
- Subtle dark grey grid lines instead of bright teal
- Trail walls use gradient material: bright base fading upward
- Own walls short (cycle-height) and solid; enemy walls tall and fading
- Thinner trail walls (0.3) for cleaner look
- Boundary walls taller with gradient fade
- Oriented cycle bodies with arrow-like nose piece
- Grinding spark effect when speed-boosting near walls
- Lower, more dramatic chase camera (Armagetron-style POV)
- Faster base speed (50), higher max speed (150), snappier turns
- Vivid neon player color palette on black

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add distance fog (fades to black beyond 50 units), new TronWall fragment
shader with bright top-edge highlight, player name labels projected from
3D to screen space, a 2D minimap canvas, and speed/rubber/brake gauges.

Shader changes:
- Vertex shader outputs v_fog_factor from camera distance
- All 5 fragment shaders apply fog mixing to final color
- New tronwall.frag: 55% body brightness with smoothstep top edge

Renderer:
- Cache u_camera_pos and u_fog_density uniforms across all programs
- Add world_to_screen() for 3D-to-CSS projection
- draw() takes fog_density parameter (1.0 for Tron, 0.0 otherwise)

Camera (TronFollow mode):
- Lower (10→6), closer (16→12), wider look-ahead (20→30)
- FOV widened to 70 degrees for Tron games

Tron scene:
- Trail walls use TronWall shader (own: h=3 i=2.0, enemy: h=5 i=1.5)
- Boundary walls use TronWall (h=8, dim color)
- Grid lines: hair-thin (0.08), Unlit material, semi-transparent
- Cycle bodies shrunk for sleeker look

JS overlay (bridge → ui.js):
- Floating player names with neon glow text-shadow
- Bottom-center minimap showing walls and cycle dots
- Speed/rubber/brake gauge bars for local player

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@AndrewAltimit AndrewAltimit merged commit 70bc2bc into main Feb 17, 2026
8 checks passed
@AndrewAltimit AndrewAltimit deleted the tron-aesthetics-improvement branch February 17, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant