Repository navigation
ASCENDANT — 3D arena fighter with rollback netcode - #18
Draft
cloudygetty-ai wants to merge 3 commits into
Draft
cloudygetty-ai wants to merge 3 commits into
cloudygetty-ai wants to merge 3 commits into
Conversation
ASCENDANT is a browser 3D arena fighter fusing Street Fighter 6's Drive system and frame data, Mortal Kombat's rounds and finishers, and Dragon Ball's flight, ki, beam clashes and transformations. It lives under ascendant/ as a standalone package with its own build, tests and CI config, and shares no code with the battle royale at the repo root. This is a mirror: the project is intended to move to its own repository. - Pure deterministic 60Hz simulation; step(state, inputs) is the contract rollback netcode depends on - Deterministic trig and seeded PRNG replace Math.sin/cos/atan2 and Math.random, which are implementation-defined and desync replay - GGPO-style rollback with prediction, resimulation and desync checksums, plus a WebSocket relay that never simulates a match - Six fighters built procedurally from design tables, no art assets - 91 tests covering determinism, rollback convergence, motion recognition, collision, damage, drive burnout and the finisher flow Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017sxuEsAktMLBju5wmvGut8
Adding ascendant/ broke two of this repo's own CI steps, because both sweep the whole tree and the subproject ships a different toolchain: - npm test: jest's testRegex matched all 9 of ascendant's *.test.ts files, which are written for Vitest. Every one failed with "Cannot find module 'vitest'" (reproduced locally: 9 suites failed). - npm run lint: eslint . linted ascendant's sources against this repo's React Native + Prettier config, reporting formatting conflicts that carry no meaning across two projects with different style rules. ascendant/ has its own ESLint config, tsconfig and test runner, so the fix is to scope this repo's tooling to this repo. Type check was already safe — the root tsconfig only includes src/. Verified locally: jest 8 suites / 107 tests pass, tsc clean, and eslint reports zero problems from ascendant/. The 87 problems eslint still reports are pre-existing on main, in files this branch does not touch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017sxuEsAktMLBju5wmvGut8
The project is now ASCENDANTS, matching cloudygetty-ai/ascendants, so the mirrored directory and the ignore patterns that scope this repo's tooling follow it. Verified after the rename: jest 8 suites / 107 tests pass, tsc clean, and eslint reports zero problems from ascendants/. The 87 problems eslint still reports are pre-existing on main, in files this branch does not touch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017sxuEsAktMLBju5wmvGut8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A browser 3D arena fighter, added under
ascendant/as a self-contained subproject. It shares no code with the battle royale at the repo root.This is a mirror. The project is intended to live in its own repository — it is here so the work is not stranded while
cloudygetty-ai/ascendantdoes not yet exist.What it is
Three lineages fused:
The finisher
A match-ending blow does not kill. It leaves the loser standing and swaying while the announcer calls PUT HER UNDER. — the pronoun resolves from the loser's own character sheet, so
HER,HIMorTHEM. The winner then has 200 frames to land that character's named Erasure; let the window lapse and the match simply ends.Architecture
Dependencies flow one way and a lint rule enforces it: the engine may not import from
render,ui,net,client, orthree.Determinism
step(state, inputs, config)is pure — same state plus same inputs always produces the same next state, on every machine. That drove three constraints inside the engine:Math.sin,Math.cosandMath.atan2are banned. IEEE-754 exactly specifies+ - * /andsqrt, but the transcendental functions are implementation-defined and drift between engines and CPUs. One ULP in a facing angle desyncs a match within seconds, soengine/math/trig.tsprovides polynomial replacements.Math.randomis banned — a seeded xorshift128 lives in the state and is snapshot and restored with it.checksum()hashes floats by exact bit pattern, so a one-ULP divergence is caught on the frame it happens.Netcode
Local input applies immediately; the opponent's is predicted by repeating their last input, then corrected by rewind and resimulation when the real input contradicts it. The server is a relay that pairs players and forwards inputs — it never simulates, so it can never be the thing that desyncs a match.
Verification
tsc --noEmit(strict,noUncheckedIndexedAccess,exactOptionalPropertyTypes)eslintincl. the layering rulevitestvite buildThe decisive test: a peer running six frames of network delay lands on byte-identical state to a peer with none.
Notes for review
ascendant/; its own workflow config ships inascendant/.github/workflows/ci.ymland will only take effect once the project moves to its own repo.solarFangand Korvath's armor are the kind of numbers only real matches expose.🤖 Generated with Claude Code
https://claude.ai/code/session_017sxuEsAktMLBju5wmvGut8
Generated by Claude Code