-
Notifications
You must be signed in to change notification settings - Fork 2
[Feature] Simulation tick metadata on 2D collision events #208
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestlambda-rsIssues pertaining to the core frameworkIssues pertaining to the core frameworklambda-rs-platformIssues pertaining to the dependency & platform wrappersIssues pertaining to the dependency & platform wrappersphysicsAll things related to physicsAll things related to physics
Description
Overview
Add simulation tick or step metadata to collision events so consumers can
correlate events with deterministic game logic, replay systems, and debugging
tools.
Current State
Collision events do not currently report which simulation step produced them.
Consumers that need frame or step correlation must invent their own wrapper
state outside PhysicsWorld2D.
Scope
Goals:
- Add step or tick metadata to collision and query debug outputs
- Define whether the metadata refers to world steps, substeps, or both
- Keep event timestamps deterministic within the simulation layer
Non-Goals:
- Wall-clock timestamps
- Networking or replay systems themselves
- Full profiling instrumentation
Proposed API
pub struct CollisionEvent {
pub kind: CollisionEventKind,
pub body_a: RigidBody2D,
pub body_b: RigidBody2D,
pub simulation_step: u64,
pub substep_count: u32,
}Acceptance Criteria
- Collision events include stable simulation step metadata
- Semantics of step vs. substep are documented clearly
- Tests verify monotonically increasing step metadata
- Demo or logging examples show how to use the metadata
- The implementation remains backend-agnostic
Affected Crates
lambda-rs, lambda-rs-platform
Notes
- This is most valuable if deterministic replay or rollback work is expected.
- The public API should not depend on the backend’s internal event queue
numbering.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestlambda-rsIssues pertaining to the core frameworkIssues pertaining to the core frameworklambda-rs-platformIssues pertaining to the dependency & platform wrappersIssues pertaining to the dependency & platform wrappersphysicsAll things related to physicsAll things related to physics