Commit Graph

43 Commits (4236d1ec00a8938d48be2ec8a016674528e2df50)

Author SHA1 Message Date
VinPropane 361a6800d2 NEO-32: cooldown snapshot API, on_cooldown deny, client HUD sync 2026-04-30 21:19:32 -04:00
VinPropane 7de8e7ecfd NEO-28: cast target authority, HUD feedback, tests + docs 2026-04-27 21:03:04 -04:00
VinPropane ce54fcc44f NEO-25: world interactables GET, registry rows, fetch-driven Godot props + glow 2026-04-24 20:36:15 -04:00
VinPropane e31cd2df68 NEO-24: freshen server position before target-select + surface divergence on HUD
Fix "Tab says denied even though I'm in range of beta": root cause is the
race between the 20 Hz move-stream sampler and the target-select POST. A
Tab press right after the capsule stops can be validated against the
server's last sampled position, which trails the visible capsule by
several meters.

Client-side fixes (server contract unchanged):

- TargetSelectionClient.set_freshness_kick(authority, player): before each
  POST /target/select, submit a move-stream with the current player
  position so the server's stored snapshot is as fresh as possible when
  the range check runs. Wired in main.gd; optional so tests without the
  wiring still pass (regression-covered).
- PlayerPositionLabel now shows a "srv: (x,y,z) Δ=<d>m age=<ms>" line
  populated from PositionAuthorityClient.authoritative_ack, so any
  residual client/server divergence is visible in the HUD and future
  reports can point at it directly.
- Two new tests: select POST kicks exactly one freshness stream with the
  current player position before POSTing, and the kick is a no-op when
  the wiring is absent.

Docs: plan Decision 5, review follow-up #2, manual QA section 5 and
section 1, and client README updated to describe the new behaviors.
2026-04-21 23:21:16 -04:00
VinPropane 71ae829482 NEO-24: add visible target-anchor markers + HUD distance lines
Players reported targeting "feels inconsistent" because the server
PrototypeTargetRegistry anchors (alpha (-5,-5) r=8, beta (8,8) r=4) have
no visible meshes — the only console visible in the scene is the NEO-9
PrototypeTerminal at origin, which is unrelated to NEO-23/24 targeting.

Adds a display-only mirror of the server registry:

- client/scripts/prototype_target_markers.gd spawns a colored mast +
  translucent flat radius ring per anchor so the lock radius is
  visible in-world.
- client/scripts/prototype_target_constants.gd gains ANCHORS with
  position/radius/color, matching PrototypeTargetRegistry.cs. Marked
  display-only; server remains authoritative for validity.
- TargetLockLabel now renders a per-anchor distance line each physics
  tick ("<id>: <d> m / <radius> (in|out)") so players can see the
  relationship between the visible capsule and the lock radius and
  immediately spot client/server position drift.

Also updates README, plan (Decision 4), manual QA (Section 1 boot +
Section 4 locomotion), and the review file's follow-up section to
describe the UX fix.
2026-04-21 23:04:03 -04:00
VinPropane 33ebfc31c4 NEO-24: fix HUD overlap between PlayerPositionLabel and TargetLockLabel
PlayerPositionLabel's 3 lines at font_size=15 + outline=6 overran its
64 px rect, so TargetLockLabel (offset_top=82) rendered the `Target:`
row on top of the `z:` row. Bump position-label bottom to 88 and push
target-label top to 104 for clean separation; widen target-label rect to
320x120 so the optional 4th `Denied: <reasonCode>` line fits without
clipping.
2026-04-21 22:44:25 -04:00
VinPropane ee572e3661 NEO-24: client tab-target + lock HUD synced to server
Adds `TargetSelectionClient` (Godot, HTTP to NEO-23 targeting endpoints):
- Tab cycles ids in ascending order matching `PrototypeTargetRegistry`
  (`prototype_target_alpha`, `prototype_target_beta`) and wraps.
- Esc clears by POSTing with `targetId` omitted.
- UI always paints from the server's authoritative `targetState`
  (success and denials alike); `UICanvas/TargetLockLabel` shows
  `lockedTargetId`, `validity`, `sequence`, and (on deny) `reasonCode`.
- Movement-triggered refresh: while a lock is held, subsequent
  `authoritative_position_received` snaps fire a throttled GET
  (~250 ms cooldown) so `validity` flips to `out_of_range` after
  locomotion without duplicating server radius math on the client.

Registers `target_tab` (Tab) / `target_clear` (Esc) in `project.godot`;
documents bindings + manual QA in `client/README.md`.

Tests: `target_selection_client_test.gd` covers GET parse, tab ordering
from empty/alpha/wrap, POST body shape, denial preserves server state,
clear omits targetId, movement refresh fires only while locked, cooldown
collapses bursts to one GET, and `apply_as_snap=false` is ignored.
All 85 client GdUnit cases pass; gdlint and gdformat clean.

See `docs/plans/NEO-24-implementation-plan.md`.
2026-04-21 22:14:16 -04:00
VinPropane a4095cb9bf NEO-22: Remove click-to-move client and legacy move POST/verify
Delete ground_pick and GroundPick wiring; PositionAuthorityClient now only
boot GET and move-stream POST. main.gd snaps on authoritative position only.
Update client/server READMEs, cursor rule example, NEO-22 plan note, and
GdUnit authority tests (stream 400 + boot resync).
2026-04-17 20:06:46 -04:00
VinPropane 2b72d6bcb9 NEON-29: Prototype smooth hill piece, movement script updates, NEO-22 plan
Add prototype_smooth_hill_piece for QA geometry alongside main scene wiring.
Refresh player locomotion and main scene integration from stashed work.
Track docs/plans/NEO-22-implementation-plan.md (WASD replaces click-to-move).
2026-04-15 23:39:47 -04:00
VinPropane a7ad695143 NEON-29: Apply stashed WIP (main.tscn, movement validation, docs) 2026-04-13 13:24:05 -04:00
VinPropane 173c348030 NEON-29: Show player world x,y,z in prototype HUD
Add UICanvas/PlayerPositionLabel (top-left) and refresh each frame from main.gd.
2026-04-12 16:52:19 -04:00
VinPropane 103f8bbe19 NEON-29: Add approach treads for green, gold step, violet terrace.
TerracePlatformC_Approach (PCS_*): four cardinals, 7.2 m arms, ~0.104 m rise.
TerraceStepB_Approach (TSB_*): S/E/W, 6.2×1.0 m NS treads.
TerracePlatformB_Approach (TPB_*): N/E/W with six risers for 0.6 m to floor;
south uses existing gold step. New ramp-tint materials. README + plan.
2026-04-12 16:43:02 -04:00
VinPropane 4df71ac0cc NEON-29: Fix floor walk stall from tight nav agent distances.
Revert path_desired_distance and target_desired_distance to 0.35; 0.22
was below practical per-tick progress toward waypoints and led to
oscillation or stuck path state. When NavigationAgent reports finished
but horizontal distance still exceeds ARRIVE_EPS, steer directly
toward the authoritative goal in XZ.
2026-04-12 01:03:40 -04:00
VinPropane 44984780d4 NEON-29: Widen TerracePlatformA approach treads past capsule width.
Tread run was 0.45 m vs 0.8 m capsule diameter, causing straddle stuck
on stairs and blocked motion toward edges when exiting. Use 1.0 m
depth (NS/WE boxes), recenter PAS_* transforms flush to the lip.
Tighten NavigationAgent path/target desired distance 0.35 to 0.22.
2026-04-12 00:59:40 -04:00
VinPropane bfa932c834 NEON-29: TerracePlatformA cardinal approach treads (geometry fix)
Twelve walkable StaticBody treads (three per side) bridge floor to teal
lip; darker teal material. Fixes Jolt/box-lip stuck when script-only
mitigations had no user-visible effect. README + plan note.
2026-04-12 00:49:37 -04:00
VinPropane d81e915a0a NEON-29: Teal pad lips — wall normal assist, rim descend, +12mm lift
Step assist: use is_on_wall + get_wall_normal opposing want; keep slide loop
with dot < -0.02.

Descend: relax floor_block on shallow floor normal at internal edges; widen
vertical-ish slide threshold slightly.

Raise TerracePlatformA Y by 0.012 m vs main floor for coplanarity.
2026-04-12 00:42:25 -04:00
VinPropane b4c0defc29 NEON-29: Distinct colors for terraces and floor slab
TerracePlatformA teal, TerraceStepB gold, TerracePlatformB violet,
TerracePlatformC green; explicit neutral floor material. README props
table adds tint column and material ids for communication.
2026-04-12 00:40:32 -04:00
VinPropane 3efe65d9bd NEON-29: Descend on-floor gravity + snap cap; revert terrace Y lift
Reverts the 15mm TerraceStepB/TerracePlatformB root offset that regressed
floor-to-step movement.

When the walk goal is below the feet, apply gravity even while is_on_floor
so lip contacts are not stuck with vy cleared every tick; cap descend
floor_snap_length so the upper surface does not win over internal edges.
2026-04-12 00:17:09 -04:00
VinPropane f20957975d NEON-29: Fix terrace B descend (geometry gap + simpler floor_block)
Raise TerraceStepB and TerracePlatformB 15mm so boxes are not coplanar
with the main floor top, reducing Jolt internal-edge hangs.

Remove descend lip stall, peel multipliers, and snap cap; keep a single
floor_block_on_wall=false policy for the whole descend branch to avoid
oscillation. Document in NEON-29 plan.
2026-04-12 00:14:10 -04:00
VinPropane 6b471b2102 NEON-29: Fix walk steering when goal shares XZ; air gravity; player mask
- _set_horizontal_velocity_toward: optional fallback xz when delta.xz ~ 0 (avoids +X hack).
- Direct-approach branch: if horiz_dist to goal is ~0 but not arrived vertically, steer
  using the first navigation path point with horizontal separation.
- Apply get_gravity()*delta while walking and not on_floor so capsules land and Jolt
  registers floor contacts.
- Set Player collision_mask=3 explicitly; README collision bullet updated.
2026-04-11 23:46:09 -04:00
VinPropane ae66b6b313 NEON-29: Fix player–world collision pairing (env mask includes layer 2)
Player uses collision_layer 2 so camera pick rays (mask 1) skip the capsule.
Static bodies defaulted to collision_mask 1, so they never scanned layer 2 and
Godot produced no floor/wall contacts—walk appeared stuck with is_on_floor
false. Set collision_mask=3 on all NavigationRegion3D StaticBody3D walkables
and occluders; bumps inherit from Floor at spawn. Document the pairing in README.
2026-04-11 23:42:14 -04:00
VinPropane 6879d283a9 NEON-29: expand prototype district to 45×45 with terraces and obstacles
Replace 20×20 floor with 45×45 (~5× area). Add three occluder
obstacles (ObstacleB/C/D) distributed across the expanded space for
camera/occlusion stress QA. Add three terrace structures (TerracePlatformA,
TerraceStepB+TerracePlatformB, TerracePlatformC) for vertical variation;
each height transition respects agent_max_climb=0.35 m so the nav mesh
routes onto all surfaces. Update README with district layout table and
designer/QA limits.
2026-04-11 18:12:33 -04:00
VinPropane 15d405261f NEON-27: implement OcclusionPolicy — RayCast-based material fade
Adds OcclusionPolicy resource and wires it into IsometricFollowCamera.
Each _process frame, iterative rays from the camera eye to the player
focus detect bodies tagged "occluder"; their MeshInstance3D surfaces are
overridden with a transparent StandardMaterial3D (fade_alpha=0.25, instant).
Materials restore when the body clears the ray. Null-material surfaces
(e.g. the prototype Obstacle with no material assigned) receive a plain
transparent StandardMaterial3D so they fade correctly.

- client/scripts/occlusion_policy.gd — new Resource (enabled, fade_alpha,
  occluder_group, occluder_collision_mask, max_occluder_cast_depth,
  occluder_count_log_threshold, is_valid)
- client/resources/isometric_occlusion_policy.tres — default instance
- client/scripts/isometric_follow_camera.gd — occlusion_policy export,
  _update_occlusion pipeline, _apply_occluder_fade/_restore_occluder helpers,
  static occlusion_policy_is_valid guard, _exit_tree cleanup
- client/scenes/main.tscn — Obstacle tagged "occluder", policy assigned
- client/test/occlusion_policy_test.gd — new GdUnit4 unit tests
- client/test/isometric_follow_camera_test.gd — policy guard static tests
- docs/decomposition/modules/E1_M2_IsometricCameraController.md — NEON-27
  snapshot + readability demo gate note
- docs/plans/NEON-27-implementation-plan.md — null-material decision recorded
2026-04-08 23:34:00 -04:00
VinPropane 753ce84861 NEON-26: ZoomBandConfig, discrete zoom input, CameraState sync 2026-04-08 22:32:45 -04:00
VinPropane 4930fd89a6 NEON-25: isometric follow camera, CameraState, tests, and docs 2026-04-07 23:46:04 -04:00
VinPropane 7b11d4e238 NS-24: Eliminate idle jitter and movement QA bumps (Godot client)
Physics: Jolt 3D; physics_interpolation off; 120 TPS. CharacterBody3D idle
path uses dual floor_max_angle, rim/straddle and ridged-contact handling,
rim settle and random-floor-bump lip/wall escape, floor_block_on_wall,
NavigationAgent3D avoidance off, per-node interp off. No global_transform in
_process (avoid render/physics ghosting).

QA geometry: random_floor_bumps.gd (load from main.gd); each bump on its own
StaticBody3D under NavigationRegion3D; random_floor_bump_collision_constants.gd
for collider fudge and RANDOM_FLOOR_BUMP_MESH_GROUP.

Scene: player safe_margin and mesh Y lift; MoveRejectPedestal / MoveRejectFarPad
renamed from NS19*; Mat_player_capsule without polygon_offset (per follow-up).

Docs: NS-24 plan + resolution, client/README manual steps, code review
2026-04-05-NS-24.md; server/README bump height note. Code/scene identifiers
avoid ticket-based ns19_* naming.
2026-04-06 00:32:41 -04:00
VinPropane 6c73557c3b NS-23: Restore player.gd from e1beb82 (bumps ok, obstacle bee-line)
User-requested rollback to the pre-72eef09 behavior: skip nav waypoints when
auth goal.y is below body (floor pick vs mid-capsule), steering xz straight at
the goal — good for bump departure, bad for gray-box detours. Revert
floor_snap_length to 0.28 to match that snapshot.
2026-04-05 02:02:57 -04:00
VinPropane ee6c4b2718 NS-23: Simplify path-follow — drop bump/step-down heuristics
Restore a straight Godot nav pattern: steer toward get_next_path_position until
finish or final approach, then toward goal; horizontal-only arrival by xz.
Removes footprint rays, bump-step group, and step-off vy layering that fought
the engine. Slightly raise Player floor_snap_length for small ledges.
2026-04-05 02:01:17 -04:00
VinPropane 2291a0ec07 NS-19: move Bump B to clear capsule between bumps
Frustum bases left ~0.33 m between closest corners while the player
capsule is ~0.8 m wide, so crossing could wedge between A and B. Shift
NS19BumpB −Z by 0.75 m (z −4.1 → −4.85) so AABB clearance ≈1 m.
2026-04-05 01:23:25 -04:00
VinPropane fba2c8e171 NS-19: large bump — wider underfoot rays + shallower frustum
- Add xz-offset down-rays (~0.42 m) so rim/lean on the 1 m Bump A still
  counts as on-bump for nav skip (single center column could miss).
- Widen Bump A convex base 0.65→0.72 (top 0.5 unchanged): gentler ~34°
  sides vs ~45° to reduce CharacterBody3D snags; mesh unchanged.
2026-04-05 01:19:28 -04:00
VinPropane db1fe0f46b NS-23: skip nav waypoints on NS-19 bump plateaus only
Restore obstacle routing via waypoints elsewhere; on bump tops nav often
prefers a downward segment and breaks departure. Detect plateau with
is_on_floor + flat normal + ray down into group ns19_bump; then steer
only toward authoritative goal xz. Slopes keep waypoint pathing.
2026-04-05 01:12:11 -04:00
VinPropane a5ec8df4a7 NS-23: terminal collision, nav around obstacle, agent under region
- Add BoxShape3D to PrototypeTerminal (layer 1, walkable) so the player
  cannot pass through; matches terminal mesh size.
- Bake navigation from collision layer 1 only so the player (layer 2) is
  not merged into the mesh; reparent Player under NavigationRegion3D so
  NavigationAgent3D resolves a valid map.
- Restore nav waypoint following for long horizontal legs; keep horizontal
  steering toward next/goal so bump departure behavior stays sane.
2026-04-05 01:10:16 -04:00
VinPropane f6baf3bf72 NS-23: NS-19 bump single frustum collider (fix departure edges)
Replace top slab + four ramp wedges with one ConvexPolygonShape3D frustum
per bump so plateau and slopes are one manifold (no collider seams at
table edges when walking off).

Add CharacterBody3D safe_margin to reduce edge contact with physics.
2026-04-05 00:55:15 -04:00
VinPropane 38abf6d5d2 NS-23: NS-19 bump collision top-cap only (fix ramp snag)
Full bump box shared vertical faces with convex ramp wedges, doubling
collision and snagging CharacterBody3D on and off. Replace with thin
top BoxShape3D; ramps own all side contact.

Raise Player floor_max_angle to 50° and floor_snap_length slightly for
cleaner ramp floor snapping.
2026-04-05 00:51:32 -04:00
VinPropane 0e79250f1a NS-23: NS-19 bump convex ramps; drop autostep
- Add four invisible ConvexPolygonShape3D ramp wedges per bump (walkable) so
  move_and_slide can climb/descend without test_move ledge hacks.
- Remove _try_autostep / _maybe_autostep_after_slide and LEDGE_DROP_STEPS;
  they mis-detected geometry and fought CharacterBody3D slide.
- Fix duplicate subresource unique_id on BumpA RampWest and BumpB RampSouth.
2026-04-05 00:48:51 -04:00
VinPropane 6d00070c00 NS-23: Climb NS-19 bumps with 3D steer + vertical arrival + floor snap 2026-04-05 00:36:43 -04:00
VinPropane 0ac059fa3b NS-23: NavigationAgent3D path-follow with server move authority 2026-04-05 00:23:03 -04:00
VinPropane 32d2153acb NS-19: server move validation, client rejection UX, scene QA props 2026-04-04 23:39:40 -04:00
VinPropane b043e8ac45 NS-18: InteractionRequest, client prototype, Postgres test UX
Server: POST /game/players/{id}/interact, HorizontalReach, prototype registry, DTOs, tests; default spawn (-5,0.9,-5); dev HttpLogging.

Client: terminal, radius glow preview, interaction_request_client (interact/E), main wiring; obstacle moved off center.

Tests: postgres.runsettings, launchSettings, Docker compose auto-start/teardown harness, async-safe init.

Docs: plan AC, E1.M1 snapshot, alignment table, server/client README, code review 2026-04-04.
2026-04-04 20:19:33 -04:00
VinPropane 3882b0e2c6 NS-16: MoveCommand → server PositionState, Godot sync, tests
Implement E1.M1 intent → authority: POST /game/players/{id}/move with v1 JSON
MoveCommandRequest (snap + sequence), extend in-memory store and
PositionStateApi. Godot client splits ground_pick and position_authority_client
with thin main.gd; snap_to_server on player.

Tests live under NeonSprawl.Server.Tests/Game/PositionState/ with AAA layout
and MethodName_ShouldExpectedOutcome_WhenScenario naming. Debug builds use
UseAppHost=false so Linux IDEs resolve .NET 10 from a user-local SDK.

Add NS-16 implementation plan, code review doc, godot-client-script-organization
rule, csharp test layout/naming rules, and refresh E1.M1 / alignment docs.
Server and client README updates include move API, prerequisites, and Rider
notes.

Made-with: Cursor
2026-03-30 19:54:17 -04:00
don 64092566a4 fix(client): reliable NS-14 click-to-move without NavigationMesh
- Drive movement with horizontal steering + move_and_slide toward click goal
- Remove NavigationRegion3D / NavigationAgent3D; obstacle interaction is slide
- main.gd: raycast to walkable, Player.set_move_goal; viewport camera + mouse
- Scene: explicit physics layers/mask on floor, obstacle, player
- Docs: Godot 4.6 baseline, README + NS-14 plan + tech_stack; Godot .import/.uid

Made-with: Cursor
2026-03-29 22:08:25 -04:00
don 343592541a feat(client): NS-14 click-to-move with NavigationAgent3D
- Main scene: floor, obstacle, nav mesh, camera, CharacterBody3D + agent
- Click-to-move on walkable group; pick mask avoids avatar self-hit
- player.gd drives path following; README and plan AC updated

Made-with: Cursor
2026-03-29 21:19:52 -04:00
don 09a4106543 Update README and documentation to reflect project rebranding to "Neon Sprawl". Revise links to vision plan and adjust references in tech stack and decomposition documents. Enhance README with repository layout and instructions for running the server and client. 2026-03-29 17:23:00 -04:00