tow-game/index.html
Erich Blume 41efdecd93 Initial prototype: TOW trailer-reversing trainer
Browser game teaching how to reverse a car with a trailer. Vanilla JS,
no build step, runs from file:// in Safari.

- Bicycle-model car kinematics + trailer articulation (jackknife behavior)
- WASD controls with steering input smoothing; rendered steering wheel and
  rig-angle HUD
- Tron-style vector rendering, OBB/SAT collision
- Four hand-built maps (dock, lot, roadside, driveway) plus a validated
  procedurally-generated 5th map

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 18:39:03 -07:00

54 lines
1.6 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TOW — trailer reversing trainer</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="shell">
<header class="topbar">
<div class="title">
<span class="logo">TOW</span>
<span class="sub">trailer reversing trainer</span>
</div>
<div id="mapTabs" class="tabs"></div>
</header>
<div class="stage">
<canvas id="game"></canvas>
<div id="winOverlay" class="overlay">
<div class="card">
<h1>PARKED.</h1>
<p>Nicely backed in.</p>
<div class="btns">
<button id="btnRetry" class="ghost">Retry (R)</button>
<button id="btnNext" class="primary">Next map (N)</button>
</div>
</div>
</div>
</div>
<footer class="bottombar">
<div class="mapinfo">
<span id="mapName" class="mname"></span>
<span id="mapHint" class="mhint"></span>
</div>
<div class="keys">
<kbd>W</kbd><kbd>A</kbd><kbd>S</kbd><kbd>D</kbd> drive ·
hold <kbd>A</kbd>/<kbd>D</kbd> to turn the wheel ·
<kbd>R</kbd> reset · <kbd>N</kbd> next · <kbd>1</kbd><kbd>5</kbd> maps (5 = random)
</div>
</footer>
</div>
<script src="js/physics.js"></script>
<script src="js/maps.js"></script>
<script src="js/input.js"></script>
<script src="js/render.js"></script>
<script src="js/hud.js"></script>
<script src="js/game.js"></script>
</body>
</html>