summaryrefslogtreecommitdiff
path: root/serve/RACE_NOTES.md
diff options
context:
space:
mode:
authorprospanclaudebot <[email protected]>2026-07-10 22:10:29 +0000
committerprospanclaudebot <[email protected]>2026-07-10 22:10:29 +0000
commit61c14c061c896a93f3300f5ed59b43c8e9b45190 (patch)
treedb56fad5a58514766bd2576179f3ec98c00f916a /serve/RACE_NOTES.md
downloadplaneta-zhopa-61c14c061c896a93f3300f5ed59b43c8e9b45190.tar.gz
planeta-zhopa-61c14c061c896a93f3300f5ed59b43c8e9b45190.zip
initial import: planeta-zhopa
Diffstat (limited to 'serve/RACE_NOTES.md')
-rw-r--r--serve/RACE_NOTES.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/serve/RACE_NOTES.md b/serve/RACE_NOTES.md
new file mode 100644
index 0000000..c2cfab9
--- /dev/null
+++ b/serve/RACE_NOTES.md
@@ -0,0 +1,19 @@
+# ЖОПО-СВО: ЗАБЕГ — race mode (added 2026-07-10)
+
+SERVER (mp_server.py): authoritative race.
+- init_race(): NCP=8 checkpoints in a ring, snapped to land, y=groundH+~30.
+- FSM race["st"]: idle -> countdown(4s) -> racing -> done(14s) -> idle. Auto-starts when >=1 posed player.
+- race_loop() @10Hz judges passes: horizontal <CP_R(28) & |dy|<CP_VR(60) -> advance cp; NCP*LAPS -> finish+time.
+- Broadcasts {t:'race', st,cd,clock,laps,ncp,cps,stand,results}. Sends full snapshot to new joiner.
+- Stores player dy (altitude) from state msg. LAPS=2, TIME_LIMIT=240.
+
+CLIENT (serve/index.html, in the game <script> block):
+- rcBuild/rcUpdate/rcTick + rcHud DOM. Gates = torus rings, g.lookAt(next) so you fly through.
+ Active (next) gate = green pulsing. HUD: countdown / РУБЕЖ x/8·круг·место·дист / СВОДКА С ФРОНТА.
+- hooks: onmessage +welcome(rcMyId) +race(rcUpdate); tick() calls rcTick().
+
+VERIFIED headless: test_race.py flies a mock drone through all gates x2 laps -> done+results PASSED.
+Client logic run against real server msgs (vm+stubs): 8 gates built, all 3 HUD states render.
+
+RUN: python3 mp_server.py -> http://127.0.0.1:8790
+TODO next (war hazards over the skeleton): залп sweep section, herd as chicane, eruption = arty strike + updraft.