Skip to content

[Feature] Stronger ordering guarantees for 2D collision events #209

@vmarcella

Description

@vmarcella

Overview

Define and, if needed, implement stronger ordering guarantees for collision
events so replay systems and deterministic gameplay code can rely on a stable
event sequence.

Current State

The current docs only promise ordering that is stable enough within one run.
Cross-backend and cross-platform deterministic ordering is not guaranteed.

Scope

Goals:

  • Decide the required ordering contract for public collision events
  • Canonicalize body-pair ordering if deterministic replay is in scope
  • Document the performance and implementation cost of stronger guarantees

Non-Goals:

  • Lockstep networking implementation
  • Backend-specific ordering leaks
  • Trigger volumes

Proposed API

No new public API is required if the stronger guarantee can be documented and
implemented within the existing collision_events() contract.

Acceptance Criteria

  • Ordering guarantees are documented precisely
  • Event collection enforces the documented order when required
  • Integration tests cover stable ordering for representative cases
  • Any remaining nondeterminism is called out explicitly in docs

Affected Crates

lambda-rs, lambda-rs-platform

Notes

  • Sorting by normalized body-pair keys is the most likely implementation
    strategy if stronger ordering is needed.
  • This work is critical for replay or rollback systems when they are planned.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestlambda-rsIssues pertaining to the core frameworklambda-rs-platformIssues pertaining to the dependency & platform wrappersphysicsAll things related to physics

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions