Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -866,3 +866,10 @@ reference even when the Stat Kind is unknown.
Enchantment IDs 7745 and 7748 are authored compatibility entries, with +3 Strength and +3 Stamina.
They preserve existing stored item meanings. They are not rows from the build 5875 client
catalogue. The importer refuses a client catalogue that collides with either ID.

### GameObject collision

**GameObject Collider**:
Derived registration of a DOOR or BUTTON mesh for one GameObject in one map and instance.
A closed, live GameObject blocks sight and collision rays. Its registration remains while open.
Static geometry retains its separate active-generation rule.
2 changes: 1 addition & 1 deletion crates/lyracore-shared/src/vmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ fn dot3(a: [f32; 3], b: [f32; 3]) -> f32 {

/// Möller–Trumbore, no backface culling (both winding orders block), segment-clamped (`t` in
/// `0..=1`, not an infinite ray). Returns the hit parameter along `a -> b`, or `None`.
fn segment_tri_hit(a: [f32; 3], b: [f32; 3], tri: [[f32; 3]; 3]) -> Option<f32> {
pub fn segment_tri_hit(a: [f32; 3], b: [f32; 3], tri: [[f32; 3]; 3]) -> Option<f32> {
let dir = sub3(b, a);
let e1 = sub3(tri[1], tri[0]);
let e2 = sub3(tri[2], tri[0]);
Expand Down
32 changes: 30 additions & 2 deletions docs/vmap-rollout.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ checking generations. A successful import is data-plane evidence, not permission
## Geometry-probe readiness

Issue #184 requires ray and floor evidence before exact-vmap consumption is enabled. The current
`debug_vmap_ray` and `debug_floor_probe` reducers read the active generation directly and do not
require `vmap_enabled`; use them while the gameplay gate remains off. Do not use a temporary
`debug_vmap_ray` and `debug_floor_probe` reducers read active static geometry and registered doors.
They do not require `vmap_enabled`; use them while the gameplay Gate remains off. Do not use a temporary
`debug_set_vmap_enabled true` change as a substitute: it already enables the behavior this checklist
is meant to accept.

Expand Down Expand Up @@ -129,3 +129,31 @@ Nearby movement and line-of-sight observation:
Verdict: PASS / FAIL / INCONCLUSIVE
Links to raw importer output and server/client evidence:
```

## Instance doors

DOOR and BUTTON models also participate in sight and collision rays when `vmap_enabled` is on.
They use `game_go_collider` rows indexed by map and instance. Map 36 needs no static generation
for these rays. Static geometry retains the active-generation requirement; the navigation grid
still supplies the fallback on maps without one. Area and indoor queries stay static.

GameObject imports, model imports, pool activation, debug spawns and instance creation register eligible doors.
Gameobjects Package Delta apply and replay reconcile after all spawn and template changes finish.
Model imports rebuild the registry so either import order works. `rebuild_go_colliders` is an
Operator reconciliation for existing rows after a publish. Open doors keep their registration;
rays check their current state. Despawn and instance reap remove registration.

Collision scale and triangles come from `game_go_model`. A Package that changes a template's
size or display requires an explicitly matching model artifact. This path does not regenerate
meshes from Package Claims; a routine model import does not establish that those Claims match.

Before imported Deadmines acceptance, import approved DOOR/BUTTON models on the named development
Shard and run `rebuild_go_colliders`. Use `debug_vmap_ray_instance` with the instance id as its
final argument. The original `debug_vmap_ray` command still probes instance 0. Record the Factory
Door hit while closed, the clear ray after `debug_encounter_open_door`, and a closed sibling instance.
These probes also calibrate the
imported model axes and spawn quaternion. Synthetic tests do not establish imported-client parity.

Retain `debug_bench_collision_gate` and `debug_bench_los` evidence on the imported canonical box
before enabling gameplay consumption. Those performance and real-client checks remain Operator
acceptance; the private durable fixture proves geometry and lifecycle behavior.
62 changes: 62 additions & 0 deletions gateway/src/stdb/bindings/debug_assert_go_collision_reducer.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.

#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};

#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub(super) struct DebugAssertGoCollisionArgs {}

impl From<DebugAssertGoCollisionArgs> for super::Reducer {
fn from(args: DebugAssertGoCollisionArgs) -> Self {
Self::DebugAssertGoCollision
}
}

impl __sdk::InModule for DebugAssertGoCollisionArgs {
type Module = super::RemoteModule;
}

#[allow(non_camel_case_types)]
/// Extension trait for access to the reducer `debug_assert_go_collision`.
///
/// Implemented for [`super::RemoteReducers`].
pub trait debug_assert_go_collision {
/// Request that the remote module invoke the reducer `debug_assert_go_collision` to run as soon as possible.
///
/// This method returns immediately, and errors only if we are unable to send the request.
/// The reducer will run asynchronously in the future,
/// and this method provides no way to listen for its completion status.
/// /// Use [`debug_assert_go_collision:debug_assert_go_collision_then`] to run a callback after the reducer completes.
fn debug_assert_go_collision(&self) -> __sdk::Result<()> {
self.debug_assert_go_collision_then(|_, _| {})
}

/// Request that the remote module invoke the reducer `debug_assert_go_collision` to run as soon as possible,
/// registering `callback` to run when we are notified that the reducer completed.
///
/// This method returns immediately, and errors only if we are unable to send the request.
/// The reducer will run asynchronously in the future,
/// and its status can be observed with the `callback`.
fn debug_assert_go_collision_then(
&self,

callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}

impl debug_assert_go_collision for super::RemoteReducers {
fn debug_assert_go_collision_then(
&self,

callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp
.invoke_reducer_with_callback(DebugAssertGoCollisionArgs {}, callback)
}
}
117 changes: 117 additions & 0 deletions gateway/src/stdb/bindings/debug_vmap_ray_instance_reducer.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.

#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};

#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub(super) struct DebugVmapRayInstanceArgs {
pub map: u32,
pub x_0: f32,
pub y_0: f32,
pub z_0: f32,
pub x_1: f32,
pub y_1: f32,
pub z_1: f32,
pub instance_id: u64,
}

impl From<DebugVmapRayInstanceArgs> for super::Reducer {
fn from(args: DebugVmapRayInstanceArgs) -> Self {
Self::DebugVmapRayInstance {
map: args.map,
x_0: args.x_0,
y_0: args.y_0,
z_0: args.z_0,
x_1: args.x_1,
y_1: args.y_1,
z_1: args.z_1,
instance_id: args.instance_id,
}
}
}

impl __sdk::InModule for DebugVmapRayInstanceArgs {
type Module = super::RemoteModule;
}

#[allow(non_camel_case_types)]
/// Extension trait for access to the reducer `debug_vmap_ray_instance`.
///
/// Implemented for [`super::RemoteReducers`].
pub trait debug_vmap_ray_instance {
/// Request that the remote module invoke the reducer `debug_vmap_ray_instance` to run as soon as possible.
///
/// This method returns immediately, and errors only if we are unable to send the request.
/// The reducer will run asynchronously in the future,
/// and this method provides no way to listen for its completion status.
/// /// Use [`debug_vmap_ray_instance:debug_vmap_ray_instance_then`] to run a callback after the reducer completes.
fn debug_vmap_ray_instance(
&self,
map: u32,
x_0: f32,
y_0: f32,
z_0: f32,
x_1: f32,
y_1: f32,
z_1: f32,
instance_id: u64,
) -> __sdk::Result<()> {
self.debug_vmap_ray_instance_then(map, x_0, y_0, z_0, x_1, y_1, z_1, instance_id, |_, _| {})
}

/// Request that the remote module invoke the reducer `debug_vmap_ray_instance` to run as soon as possible,
/// registering `callback` to run when we are notified that the reducer completed.
///
/// This method returns immediately, and errors only if we are unable to send the request.
/// The reducer will run asynchronously in the future,
/// and its status can be observed with the `callback`.
fn debug_vmap_ray_instance_then(
&self,
map: u32,
x_0: f32,
y_0: f32,
z_0: f32,
x_1: f32,
y_1: f32,
z_1: f32,
instance_id: u64,

callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}

impl debug_vmap_ray_instance for super::RemoteReducers {
fn debug_vmap_ray_instance_then(
&self,
map: u32,
x_0: f32,
y_0: f32,
z_0: f32,
x_1: f32,
y_1: f32,
z_1: f32,
instance_id: u64,

callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp.invoke_reducer_with_callback(
DebugVmapRayInstanceArgs {
map,
x_0,
y_0,
z_0,
x_1,
y_1,
z_1,
instance_id,
},
callback,
)
}
}
Loading