Commit Graph

41 Commits

Author SHA1 Message Date
a494290548 fix(net): interpolate between snapshots to absorb jitter (P1-6)
netfight eased to the newest snapshot with no buffer, so a jittery
client's robot stalled then jumped. Render ~120 ms in the past between
the two bracketing snapshots instead. Dev params ?netlag/?interp/
?netprobe reproduce it; unit test for the interp math + a Playwright
lag test (tests/e2e/netlag.spec.js).
2026-11-19 19:46:54 +01:00
Benjamin Oezcan
2bf5a40ebc fix(ui): F3 overlay was always shown as an empty box and could not be closed 2026-11-19 15:28:23 +01:00
Benjamin Oezcan
90f1c9c37e build(deploy): ship tools/ so the test bot can run on the server 2026-11-19 15:14:56 +01:00
Benjamin Oezcan
c99881e63a docs: test bot and F3 network overlay 2026-11-19 14:35:05 +01:00
Benjamin Oezcan
695cf77afc feat(net): F3 network overlay - ping graph and where lag comes from (you, opponent, server) 2026-11-19 14:30:40 +01:00
Benjamin Oezcan
a8d6158384 feat(tools): dumb test bot that accepts challenges and drives a pattern (npm run bot) (P4-1) 2026-11-19 14:26:50 +01:00
Benjamin Oezcan
593d69714b feat(net): server measures every player's ping and its own step cost, sent with each snapshot
Also fixes the ping message schema (it checked the field t, which is the message type).
2026-11-19 14:25:46 +01:00
Benjamin Oezcan
3dc770e34a fix(server): tokens of deleted accounts are refused; a failing message or fight can no longer crash the server
After a database reset an old (still signed) token made economy.load insert a save for a missing user;
the FOREIGN KEY error escaped the WebSocket handler and took the process down in a restart loop.
2026-11-19 10:02:51 +01:00
Benjamin Oezcan
0ffa221e82 feat(server): DELETE /api/me deletes your account; smoke test cleans up after itself 2026-11-19 09:59:19 +01:00
Benjamin Oezcan
4535ac7d8a refactor(game): split game.js into sfx, pages, online and workshop modules (P4-5)
Modules are classic-script factories RC.Game<Part>(G); G gives live access to the shared state.
Guarded by new browser tests for every moved page and workshop tool (tests/e2e/screens.spec.js).
2026-11-19 09:58:53 +01:00
Benjamin Oezcan
fade816169 test(e2e): playwright - two browsers play online, server shop, offline campaign (P4-2) 2026-11-19 09:47:22 +01:00
Benjamin Oezcan
dd120f47f8 feat(fight): give up a live fight from the pause card 2026-11-19 09:47:22 +01:00
Benjamin Oezcan
0ee589c91e docs: record progress of phases 1-3 in the plan, new commands in CLAUDE.md 2026-11-19 02:20:53 +01:00
Benjamin Oezcan
a73d33a821 fix(net): expired or stale session while online asks to log in again 2026-11-19 02:17:54 +01:00
Benjamin Oezcan
ce7cb798ec test: smoke test against a running server (npm run smoke -- <url>) 2026-11-19 02:17:54 +01:00
Benjamin Oezcan
101dd7c44b build(deploy): release-based deploy with health check and rollback, node 24, service user (P3-1b, P3-2, P3-3) 2026-11-19 02:12:53 +01:00
Benjamin Oezcan
b587d12f37 refactor!: remove firebase leftovers, admin page on the server (P1-8)
BREAKING CHANGE: admin/cleanup.js, admin/setcoins.js and docs/firebase are gone; the admin page now runs at /admin/.
2026-11-19 02:11:13 +01:00
Benjamin Oezcan
0202a08b8d feat(server): achievements pay out server-side, snapshots carry opponent connection state 2026-11-19 02:09:12 +01:00
Benjamin Oezcan
85a19ba242 feat(net)!: client on server-run fights, websocket lobby, server economy (P1-5, P1-6, P1-7, P2-3, P2-4)
- net.js: REST + one WebSocket with reconnect; single-flight refresh shared across tabs; ?slot=N
- lobby.js / netfight.js: server owns presence, challenges and the fight; client shows snapshots
- game.js: every workshop change goes through RC.Eco via act() (server-checked online);
  results, rewards and achievements come from the server (match.end)
- ranking/live/cloudsave on the new REST endpoints; online tournament removed until P2-6

BREAKING CHANGE: needs the new server (protocol v1); old online saves are not migrated.
2026-11-19 02:09:07 +01:00
Benjamin Oezcan
4bd85f68bf fix(net): snapshot fight time no longer overwrites the message type 2026-11-19 01:52:59 +01:00
Benjamin Oezcan
dca1032ac4 feat(server)!: websocket lobby, server-run matches, server economy, new schema (P1-2, P1-4, P2-1, P2-1b, P2-5)
Replaces the Firebase-style /db facade (rtdb, rules, nodes tree) with explicit REST endpoints and a
WebSocket hub. Login by name or optional e-mail, seed accounts via npm run db:reset.

BREAKING CHANGE: old clients (lobby/netfight over /db) no longer work against this server; database is new.
2026-11-19 01:52:30 +01:00
Benjamin Oezcan
46499e354b feat(shop): shared economy rules for client and server (P2-2) 2026-11-19 01:48:20 +01:00
Benjamin Oezcan
9012bee29f feat(server): server-side match room runs the fight (P1-3) 2026-11-19 01:46:17 +01:00
Benjamin Oezcan
bbe206004a feat(net): shared wire protocol with seat mapping (P1-1) 2026-11-19 01:45:26 +01:00
Benjamin Oezcan
4a14b1de76 docs: mark host-based online notes outdated 2026-11-19 01:42:16 +01:00
Benjamin Oezcan
06b60a45d4 docs: update commands, mark firebase docs outdated, close phase 0 (P0-5, P0-6) 2026-11-19 01:42:08 +01:00
Benjamin Oezcan
1156bc68eb chore: add eslint, remove dead variables, pin line endings (P0-4) 2026-11-19 01:41:27 +01:00
Benjamin Oezcan
fa68ef620d feat(server): healthz, testable app, local dev script (P0-3) 2026-11-19 01:40:31 +01:00
Benjamin Oezcan
35348324d6 test: single npm test entry point, drop firebase live test (P0-2) 2026-11-19 01:40:30 +01:00
Benjamin Oezcan
dd85d488a8 docs: adopt conventional commits and semver 2026-11-19 01:36:03 +01:00
Benjamin Oezcan
89db76c9f7 docs: no co-author lines in commit messages 2026-11-19 01:35:01 +01:00
Benjamin Oezcan
d9b41fa1c8 docs: commit directly to main, no branch/PR workflow
Michi and Benni pair-program; main is the dev line. Branches only for
throwaway experiments. CI tests every push to main and deploys only green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 01:33:31 +01:00
Benjamin Oezcan
267507f715 docs: multiplayer refactor plan + quality rules
- docs/MULTIPLAYER-PLAN.md: analysis of the current online mode, target
  architecture (server-authoritative fights over WebSocket, Firebase removed),
  phased tasks with acceptance criteria, test strategy, deploy plan,
  later TODOs (T-1..T-4)
- CLAUDE.md: binding quality rules (test first, lint/test before done,
  server decides online), test-system note (no prod yet), Gitea remote

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 01:31:47 +01:00
347701d66f onlinemodus fix failed 2026-11-19 00:55:39 +01:00
64c5b65543 big update 2026-11-18 15:18:38 +01:00
e0496fa089 view update 2026-11-17 14:17:50 +01:00
3e565cf8c7 map change 2026-11-15 20:05:02 +01:00
319436a5f9 hughe update 2026-11-15 17:08:11 +01:00
7a69651b6d Online-Lobby, Arenen, Lackiererei, ComfyGen-Grafik, Verschleierung
Grosse Erweiterung ueber die erste spielbare Version hinaus:

- Online (Firebase ueber REST, kein SDK): Konto per E-Mail, globale Lobby
  mit Laender-Raeumen, Herausfordern, Live-PvP (Host rechnet, Gast
  interpoliert, KI-Uebernahme bei Lag). Gast kann anonym beitreten.
  net.js / lobby.js / netfight.js, Regeln in docs/firebase.
- 3 Arenen in verschiedenen Groessen (RC.ARENAS, half 8/12/16), Kamera +
  Licht + Boden skalieren; Liga skaliert die Arena mit, Setting + online
  aus Seed. Harte Rams/Wandtreffer schleudern Roboter auf den Rucken.
- Intro (3D-Kamerafahrt), Titel, Einstellungen (Kamera, Schwierigkeit,
  Steuerung, Grafik, Arena), Lackiererei (painter.js, selbst bemalen).
- Shop mit ComfyGen-Sprites (aus den 3D-Teilen erzeugt), Liga-Gegner sehen
  aus wie ihre Portraits (looks.js), kraeftigere Waffen-Modelle.
- Oekonomie: Startgeld 800, Schadensbonus, Schaukaempfe, Online-Preisgeld.
- Verschleierung: build.ps1 -Obfuscate (terser), tablet-taugliche Touch-UI.
- Tests: tests/sim.test.js, balance.js, online.test.js. Dev-Tools in tools/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-13 15:45:35 +01:00
819ee0a5c3 update images and audio 2026-11-13 01:02:55 +01:00
9bc39faffb main init 2026-11-13 00:41:54 +01:00