Repository navigation
The inklib standard, the template and the compliance tables - #1
Merged
Merged
Conversation
SPEC.md: naming, the core C API shape, units (native + shared), collision callbacks and surface bits, determinism and the shared replay format, camera, provenance, data rules, packaging, optional modules. TEMPLATE/: a copyable lib with prefix tpl_ (rename.sh). Core (netstandard2.1, provenance attributes and tests), NativeAOT exports, tpl.h, tpl.def, C test, example host, replays, CI, CLAUDE.md and Docs stubs. All template numbers are UNVERIFIED placeholders. COMPLIANCE.md: libfc (from its description) and libray3 (from its repo). Licence left as a TODO for octo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011dFkrWqBVAw1kojJ7PN58H
NativeAOT sets a relative install name, so the C test could not load libtpl.dylib on osx-arm64. Set it to @rpath and re-sign. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011dFkrWqBVAw1kojJ7PN58H
SPEC.md: - Section 6 (new): state_size, save_state, load_state, state_hash are required in every lib, free unless called. Snapshots are complete, little-endian and checked (magic, format, tuning hash). Events carry an id that is stable under resimulation, plus their tick. Sticks are quantised to steps of 1/127. - Section 5: same bits on every machine, by integer maths or strict float rules (doubles, DetMath, no platform maths, no FMA or SIMD). Replays store the state hash. - Section 13 (new): inklib-net, GGPO-style rollback as a separate add-on (spec only). Later sections are renumbered. TEMPLATE: DetMath, snapshot and hash, event ids, stick quantisation, RollbackTests and DeterminismTests (forbidden-call scan, golden bits), hash lines in the replays (also checked through the C API), and dotnet test on macOS arm64 in CI. COMPLIANCE.md: rollback rows for libfc and libray3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011dFkrWqBVAw1kojJ7PN58H
- Tuning.TickSeconds / TPL_TICK_SECONDS: the game time one tick simulates, separate from TPL_TICK_RATE (how often the host calls). Shared-unit velocities use it. - Tuning.InputDelayTicks / TPL_INPUT_DELAY_TICKS (template: 1): the game reads the pad late, as the original does; TPL_CHAR_NO_INPUT_DELAY turns it off per character. Delayed inputs are in the snapshot. - TPL_SIM_BITS (64 here): the real type the simulation computes in. - tpl_units_info gains tick_seconds, input_delay_ticks, sim_bits. - Regression replays recorded again (the delay moves them), new hash in the C test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011dFkrWqBVAw1kojJ7PN58H
… state - Section 5: closeness to the original first. TICK_RATE (host pacing) and TICK_SECONDS (the game's real step, e.g. Rayman 3 PC 16 ms at 60 Hz) are separate. The game's input delay is reproduced by default; a char flag turns it off. - Strict float rules allow float32 when the game used it (SIM_BITS in the header), with the same determinism rules. - Section 6: a lib may own world state of its character's rules behind a store interface with a default store (in the snapshot) or a host store (host rolls it back); big state may be stored as deltas. - COMPLIANCE.md: libray3's measured time model and its 13 platform-maths call sites at 79f17a3; libfc tick/delay row. - CLAUDE.md (new) with the Next list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011dFkrWqBVAw1kojJ7PN58H
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.
What this adds
state_size,save_state,load_state,state_hashidandticktpl_(rename.sh <prefix> <Name>).Unitsconversion layer,DetMath(deterministic sin, cos, atan2 and sqrt), snapshot code.tpl.h,tpl.def, a C test and a minimal example host.DetMathhash:484385e..github/workflows/template.yml):dotnet teston Linux x64, Windows x64 and macOS arm64, so the replay hashes must match on all threeChecked locally (Linux)
dotnet test: 47/47 pass.native/build_and_test.sh: the C test passes, including the snapshot round trip and the cross-check of the replay hash.rename.sh demo Demobuilds and passes too.Provenance
Not decided
🤖 Generated with Claude Code
https://claude.ai/code/session_011dFkrWqBVAw1kojJ7PN58H