Skip to content

v0.31.0

Latest

Choose a tag to compare

@github-actions github-actions released this 10 Oct 14:08
c3be200

Ships with com.cuvara.netcode v0.47.0 (prediction fix + KCP/UDP-only gameplay) and
sgl-v0.7.0. Includes the never-tagged 0.30.0 below.

Added

  • LocalPredictionReference.Steering, DotsPredictionBootstrap.NoteInputSent(world, inputTick)
    and DotsPredictionBootstrap.TryGetClockSteering(world, out steering).
    Install creates a
    netcode PredictionClockSteering for the predictor (kept across a re-install with the same
    predictor). Report every input send with NoteInputSent beside RecordInput so the
    acknowledgement floor is measured; it stamps the DOTS world's Time.ElapsedTime, the clock the
    system measures snapshots and advances the predictor with.

Fixed

  • LocalPredictionSystem reconciles against the predictor's history at the right tick and steers
    its clock
    - the path the game runs (MainScene). It called the two-argument
    Reconcile(position, ack): no snapshot tick, so the history was never used, and nothing steered
    the predictor's clock, which in a deterministic harness against a server 0.7% slow ran from 0 to
    22-23 ticks ahead of the server's tick line over 55 s. Once per merged snapshot (whenever
    WorldState.Tick advances) it now feeds SetServerSpeed, then
    PredictionClockSteering.SampleTickRate + OnSnapshot (seed, measure, feed a corroborated rate
    forward, steer - the code WorldViewBinder steers with), then
    Reconcile(position, ack, worldTick, WorldState.AckAppliedTick) (the Vec3 overload, with z
    and vel_z, under the 3D motor). Position, tick, ack and ack_applied_tick all come from the
    snapshot's own WorldState entry, so they cannot describe two different snapshots; the old
    anchor-plus-new-ack rule remains only as the fallback for a local entity that is not in
    WorldState. The system's memory and the clock measurements reset on a new view generation or
    when WorldState.Tick goes backwards. Tests: LocalPredictionClockAndOffsetTests (new),
    PredictionOwnershipTests.AMergedSnapshot_IsReconciledOnce_FromWorldState_SoItCannotPairWithAStaleAnchor
    (replaces the anchor-wait test, whose pairing problem no longer exists).

  • The local player's height is reconciled on a protocol 3 server (ADR-28).
    LocalPredictionSystem reconciled only the ground plane, so a predictor running netcode's
    3D CharacterMotor never had its height or vertical velocity corrected: a missed landing or a
    server-side step-up stayed wrong for the session. When the predictor uses the motor, the
    system now reconciles with the snapshot's z and vel_z through netcode's
    LocalMovePredictor.Reconcile(Vec3, float, long). Protocol 2 servers take the unchanged
    two-dimensional path.

Changed

  • CI and README peer pins move to com.cuvara.netcode#v0.47.0 and sgl-v0.7.0 (wire
    protocol 3, and 0.47.0 for ack_applied_tick and PredictionClockSteering). Both tags are
    created by a human; CI fails until they exist.

  • Cuvara.DOTS.Netcode.Prediction (and its test assembly) now needs com.cuvara.netcode >= 0.47.0
    (versionDefines), the first version with the APIs above. Cuvara.DOTS.Netcode keeps >= 0.40.0.

  • Version 0.31.0 (package.json): new public API above.

  • CI: the netcode-present, full-stack and netcode-absent rows now test against the peers the game
    ships
    - com.cuvara.netcode v0.41.0 -> v0.45.0 and com.rpgmmo.shared-gamelogic
    sgl-v0.5.0 -> sgl-v0.6.0, the pins in IndieRPGMMOAdventure's packages-lock.json. The pins are
    part of the configuration under test (see the comment above them in ci.yml); stale ones validated
    a combination nobody uses. Compatibility checked before the bump: netcode 0.41 -> 0.45 has no
    breaking change ("nothing removed"), and sgl-v0.6.0's one breaking change (the ten-argument
    positional EntitySnapshotData constructor, rpg-mmo-server #388) has no caller here; netcode's only
    call site passes actionSeq:/changedFields: by name. The compatibility tables in README.md and
    Documentation~/SUPPORT-MATRIX.md record verified runs and are updated after this CI run is green.

  • README "Tested configurations" and the optional-package install line now name the pins CI verifies:
    com.cuvara.netcode#v0.45.0 and sgl-v0.6.0 (all six rows green on #33, full-stack run 36724841010
    attempt 2). Documentation~/SUPPORT-MATRIX.md is a dated snapshot of the source and is left as is.

  • CI pins moved together: com.cuvara.netcode v0.31.0 → v0.41.0 and
    com.rpgmmo.shared-gamelogic sgl-v0.3.0 → sgl-v0.5.0
    (five pins across three
    generated manifests). EntityPoseAndEventTests uses ResolvedGameEvent and friends,
    which do not exist before netcode v0.41.0 — every test row failed with no
    ScriptAssemblies directory at all, which reads as a broken harness rather than a
    missing dependency.

    Both pins move in the same commit deliberately. This file's own header comments record
    the last time they did not: a manifest on sgl-v0.1.6 while the feature it needed
    shipped in sgl-v0.1.8, and the failure surfaced inside com.cuvara.netcode rather
    than pointing at the pin. netcode v0.41.0 requires sgl-v0.5.0.

Fixed

  • Samples~/AnimationAndEvents looked broken in a BUILD while working in the Editor. Two
    defects, both found by looking at a screenshot of the built player rather than at a test
    result — neither throws, so nothing in the suite could have caught either.

    • Magenta capsules. GameObject.CreatePrimitive assigns the built-in default material,
      whose shader is not included in a URP player. The provider now builds its own material from
      a fallback chain ending in Sprites/Default, which Unity always includes.
    • Unstyled UI. The UXML linked its stylesheet correctly and then used class names from a
      different one, so every element rendered with no styling. The sibling showcase files carry a
      comment warning about the near-miss version of this (a UXML with no Style element at all);
      this is the same failure reached from the other side, and the comment now says so.