Commit Graph
238 Commits
Author SHA1 Message Date
Hails e7af7b77e0 Game audio: ambience, water, rolling, trick cues, footsteps, settings
New crates/skate-game/src/game_audio/ module (Bevy audio):
- Loudness rules: master 25 % by default (settings/audio.json, Master/
  Ambience/Effects rows in the GRAPHICS menu), --mute; a clip may be
  raised only to its own full-scale peak (x4 max); fades, voice and
  repeat limits; silent while the menu is open or a replay runs. Mod
  audio follows the master volume and shares the one listener.
- Per-map ambience beds; water emitters on the map's water bodies
  (fountains: moving water, canals/lakes: lapping).
- Rolling: grain speed bands by board speed and the wheels' audio
  surface (new WheelLineState::audio_surfaces in skate-core, additive),
  restarted cleanly after leaving the ground.
- Cues found from physics/animation state each tick: pop, flip/grab
  (new trick only), landing (+ weight layer by impact), board-down,
  grind (metal vs other surfaces), powerslide and foot drag (shuffled),
  push, bail tiers, splash (retail patch record 869, played with its
  layers), footsteps from foot strikes. Sample picks confirmed by ear;
  each matches a retail SPLC patch record.
- AUDIO_CUE / AUDIO_LOOP / AUDIO_EVENT log lines; SKATE_AUDIO_TRACE=1.
- Read-only helpers: physics::foot_clearance, an animation-event latch
  in AnimationInput (physics never reads it).
- skate-data example audio_surfaces (per-map audio IDs, AT= point query).
2026-10-01 17:37:56 -06:00
Hails 55776dc373 Water: shallow solid / deep floats, camera, splash, water look
- Water is solid only where geometry lies within 0.5 m under it; deep
  water makes no contacts and is detected from position (physics/water.rs).
  Body buoyancy only over deep water; the board floats with water drag.
  On-foot support follows the same rule.
- Water camera (high, behind, looking down) with an edge vignette through
  retail_exposure -> retail_tone, driven by the water bail state.
- Entry splash from the game's water particle sprite; setup extracts the
  particle sprites from miscboot.big (environment group, particles.py).
- Family 33 look matched to RPCS3 footage: 4x ripple scale, blurred and
  tinted reflection, anti-tiling with swells, calmer small bodies
  (water_bodies.rs areas), waves at 0.75x (FrameStateData.pca_slow).
- Ignored water_drop trace test; SKATE_VERIFY_AT for timed --verify
  captures.
2026-10-01 12:27:23 -06:00
Hails b7865d05d4 Tests: set VERTEX_POSITIONS when validating shaders
retail_sky.wgsl reads forward_io's Vertex.position, which Bevy only
declares under VERTEX_POSITIONS; the mesh pipeline sets it for every mesh
with positions, but the test's validate() helper did not, so
sky_shader_validates failed (also on upstream 60efdef). All six shader
validation tests pass.
2026-10-01 12:27:08 -06:00
Hails 203376b9c4 Water: diagnostics and write-up after in-play testing
- water_surfaces example: view spots beside water, render materials at a
  point, model materials, texture and material inspection; SKATE material
  ids are 1-based (an off-by-one misreported water materials)
- 09-water.md: frame-state fix, water time, why University water looks
  darker than DownTown's (authored data), splashes still open
- README: fork renamed to rusty-trucks
2026-10-01 02:39:48 -06:00
Hails 01674566b6 Setup: fix ocean animation extraction during refresh
- --extract-ocean-pca runs before the crash supervisor, whose report
  window would block setup on a failed (non-zero) extraction
- ocean_pca.convert: install.spawn() pipes are text mode; reading them as
  bytes aborted the environment refresh
- test_ocean_pca runs convert through the real spawn() for success and
  failure

Verified: refresh rebuilt only the environment group (90 s) and wrote
assets/private/ocean-pca.json.
2026-10-01 02:39:47 -06:00
Hails 89348c6733 Rendering: write per-frame shader state in place; retail water time
The shared FrameStateData buffer (clock, ocean PCA frame, shadow floor) was
updated by replacing the ShaderStorageBuffer asset's data every frame. Bevy
0.18 then creates a new GPU buffer, while every world material's bind group
keeps the first one, so all world shaders saw clock 0 and no PCA frame:
water never animated, family 14 UV scrolling and the shadow floor froze.

- Create the buffer once (COPY_DST), extract FrameStateData to the render
  world and write it with RenderQueue::write_buffer (PrepareResources)
- Water families 30/33 use clock.z: retail water time runs at half
  real-time speed and loops every 10 s (behaviour of the disc build's
  water update; re-implemented, reference only)
- The unsupported-family warning lists the shaders it falls back for

Confirmed in play: water animates on University and DownTown.
See docs/hails-additions/09-water.md.
2026-10-01 02:39:10 -06:00
Hails b1d26230a8 Water rendering: extract the ocean animation table from default.xex
Water and ocean shaders need assets/private/ocean-pca.json, which setup
never created, so 52 water/ocean materials rendered static (or black).

- skate_data::xex: XEX2 unpacker (retail AES file key + CBC payload, LZX
  or basic decompression), no new dependencies
- skate_data::ocean_pca: locates cPCAWaterAnimationData's table in any
  build by its code addressing (disc build: 0x82FC3978; TU3: 0x830118D8)
- skate3rust --extract-ocean-pca <default.xex> <out.json>
- Setup environment group runs it (optional content); refreshes that group

In-play check of the rendered water still pending.
See docs/hails-additions/09-water.md.
2026-10-01 01:55:40 -06:00
Hails af1b35049b Water: detect water contact and bail into it
Water is retail collision surface type 12 (ID 1591); only DownTown and
University have it. The skater's water flag and height (Collision+3481/+28
-> Processed2488 bit30 / 2924) were never written, so the wipeout state's
water path (special surface, buoyancy, IsInWater) could never start.

- publish_water: body contact (SkeletonCollision material 12) or board
  contact (collision flag bit 25) sets the flag and water height
- No recovered retail check bails on water: touching it now requests an
  ordinary bail (request slot 33, logged WATER_BAIL); project choice
- water_surfaces example lists collision surface types and water per map

Confirmed in play: bails on University fountain/reservoir and DownTown.
See docs/hails-additions/09-water.md.
2026-10-01 01:55:33 -06:00
Hails 18f41a33c5 Tooling: streaming map validator (--validate-maps) wired into setup
One skate3rust process validates TEST_WORLD and every converted map over
stdin/stdout (SKATE_MAP_CHECK lines). Existing checks still fail a map;
new spawn-support / neutral-startup / invisible-collision checks report
warnings. Setup falls back to per-map --check-assets with an older exe.
See docs/hails-additions/06-map-validator.md (PR F).

Note: install.py also carries PR G's customiser-overlap hunks
(available_memory, overlap_customiser, Background); they are interleaved
with the validator wiring in _install and are documented in doc 08.
2026-10-01 00:13:53 -06:00
Hails 810defa65e Performance: index stock collection lookups (game start and map switch -5.5 s)
Collections are looked up through a lazily built OnceLock<HashMap> index
with first-match semantics, identical to the linear scan on 145,807 real
lookups. See docs/hails-additions/07-collections-index.md (PR E).
2026-10-01 00:13:45 -06:00
Hails dec7adeeec Collision: skip meshes with no surface IDs (zone/trigger volumes)
Retail collision includes clustered meshes in which no unit carries a
surface ID (unit flag 0x80 unset). Across every shipped district these
are only 12-triangle boxes: zone, trigger and level-bounds volumes. The
loader made them solid, creating invisible walls (SkateSchool spawn
area, DownTown's Kube Tower plaza, MegaPark's stadium entrance, Maloof).
Authored player positions lie inside some of them, so they are not solid
in the original game.

visit_clusters now decodes and validates each mesh fully and skips it
when no unit has a surface ID. Meshes mixing surfaced and surfaceless
units are ordinary geometry and stay whole. RetailTriangle records
has_surface.

Collision triangles loaded: SkateSchool -84, DownTown -24, Maloof -24,
MegaPark -12, all other maps unchanged. Confirmed in play.

See docs/hails-additions/05-collision-volumes.md.
2026-09-30 22:27:38 -06:00
Hails 3d485c8dfa Input: SDL3 gamepad backend with XInput fallback
Implements issue #14. A dedicated thread owns SDL3 (3.4.16, statically
linked via sdl3 =0.20.0) and publishes per-slot snapshots re-expressed as
the XInput-shaped XboxState, so the TU3 conversion in skate-core is
unchanged. Conversions are exact for XInput-backed pads (stick Y via
bitwise NOT, trigger round-to-nearest). SKATE3_INPUT=xinput selects the
original transport, which is also the fallback if SDL fails to start.
Optional settings/controller.json maps paddles to XInput buttons.

Build: scripts/Ensure-CMake.ps1 locates CMake (PATH or Visual Studio's
copy) for the SDL source build. sdl3-sys is vendored with a build.rs
patch setting CMAKE_MSVC_RUNTIME_LIBRARY from crt-static, because SDL's
CMake (policy CMP0091) ignores cmake-rs' -MT and the static-CRT release
build failed with unresolved __imp_* symbols.

See docs/hails-additions/03-sdl3-gamepad-input.md and vendor/README.md.
2026-09-30 19:26:50 -06:00
Ethanw05 dfd3e543c0 Add generic mesh and collider deformation with custom difficulty controls 2026-09-29 20:19:36 -06:00
Ethanw05 ddc30284b4 Generalize mod APIs, improve multiplayer and optimize mod rendering
Add generalized engine access and challenge mods, repair SKATE turn handling, and improve collision prediction and physics transitions. Reduce mod snapshot and material update overhead, preserve authored GLB materials with lighting and shadows, and improve CPU profiling.
2026-09-14 04:02:20 -06:00
Ethanw05 84142e78dc Extend modding API and menus; fix scoring, gestures, and bail controls 2026-09-13 19:37:45 -06:00
Ethanw05andCursor c87373dd6a Fix wipeout bail teleport NaN physics abort.
Reset biped controller on checkpoint teleport and fall back to identity when skeleton root orthonormalization sees a degenerate axis, preventing poisoned COM frames and deck torque before the shared solve.

Co-authored-by: Cursor <[email protected]>
2026-09-12 20:16:39 -06:00
Ethanw05andCursor e2b85b6489 Fix remote player irradiance and retail renderer updates.
Apply probe SH to online customiser characters after remote bind, restore received sun shadows, and ship Skyline driving, fullscreen, and renderer improvements on the branch.

Co-authored-by: Cursor <[email protected]>
2026-09-12 20:05:27 -06:00
Ethanw05andCursor 4a58b0b676 Fix Skyline car replication after multiplayer connect.
Respawn the chassis when a session starts so solid-bridge replication publishes a fresh body, and show local publish counts in replication status.

Co-authored-by: Cursor <[email protected]>
2026-09-12 01:47:34 -06:00
Ethanw05andCursor ec09165491 Add dynamic VFX mesh buffers, Skyline drift effects, and branch updater.
Expose append-only mesh buffers for mod skid/smoke rendering, sync rear-wheel VFX over multiplayer, rebuild Skyline audio assets, and let the updater install from any CI branch.

Co-authored-by: Cursor <[email protected]>
2026-09-12 00:40:57 -06:00
Ethanw05andCursor 821f523bb8 Fix MP air launch NaNs, solid modding, and Windows release packaging.
Sanitize non-finite SIMD lanes in offboard air selection, add solid dynamics and mod replication APIs, improve setup refresh without re-extracting assets, and harden Build-Release.ps1 for older PowerShell hosts.

Co-authored-by: Cursor <[email protected]>
2026-09-11 12:24:42 -06:00
Ethanw05 1399555ef2 Add Lua audio, dynamic vehicle cameras, dashboard, and Skyline updates 2026-09-11 04:41:47 -06:00
chazmm 4d5f70cb5e Accept original clothing colour resets in outfit validation 2026-09-10 03:27:06 +01:00
chazmm 5badc2d9f4 Remove fixed model transfer rate caps and stale queue drops 2026-09-10 03:10:15 +01:00
chazmm ea7b9a8218 Keep setup playable when optional disc content is missing 2026-09-10 02:36:05 +01:00
chazmm 128b40d1e8 Fix default.xex refresh flow and cache verified character preparation stages 2026-09-10 01:24:11 +01:00
chazmm c8219a54cd Merge opt-in tracing and University performance improvements
# Conflicts:
#	Cargo.lock
#	crates/skate-game/Cargo.toml
#	crates/skate-game/src/retail_character.rs
2026-09-09 22:25:54 +01:00
chazmm 54b8f989ca Restore upstream shadow visibility after gameplay trace comparison 2026-09-09 22:18:45 +01:00
chazmm 1c62e56fd6 Reduce material duplication, index static shadow casters and cache controller metadata 2026-09-09 19:59:49 +01:00
chazmm 2611f9ccc4 Merge gameplay crash fixes and native board adjustment 2026-09-09 19:25:48 +01:00
chazmm de37c6e167 Fix reproduced Vulkan shader crash and restore CPU material batching 2026-09-09 19:21:48 +01:00
chazmm 7bd0ba9435 Merge character transfer and stock material fixes 2026-09-09 18:56:46 +01:00
chazmm e008f9ec50 Verify stock hair materials retain authored shading after profile restoration 2026-09-09 18:51:31 +01:00
chazmm aeb641c52c Recognize pro skater hair materials instead of applying clothing highlights 2026-09-09 18:43:53 +01:00
chazmm 983771f99b Restore authored stock surface detail and specular masks after model swaps 2026-09-09 17:56:21 +01:00
chazmm 0b89cb8f47 Restore original material path after v6 native crash 2026-09-09 17:50:09 +01:00
chazmm e6a1dfe79c Enable Steam SDK configuration bindings for model upload bandwidth 2026-09-09 17:37:15 +01:00
chazmm f96be1dd10 Port complete native BoardAdjust lifecycle and angle wrap state 2026-09-09 17:37:03 +01:00
chazmm bea625f987 Batch retail material bindings to reduce CPU render commands 2026-09-09 17:35:40 +01:00
chazmm 411260a15a Revert "Fix airborne board adjustment retaining pose after stick release"
This reverts commit fd280fd0f1.
2026-09-09 17:25:49 +01:00
chazmm e1b3ab1bc8 Stream online character assets reliably without local file shortcuts 2026-09-09 17:21:28 +01:00
chazmm fd280fd0f1 Fix airborne board adjustment retaining pose after stick release 2026-09-09 17:18:56 +01:00
chazmm f33d60a3a6 Fix walking NaNs from subnormal velocity delta refinement 2026-09-09 17:01:24 +01:00
chazmm e109a0a34e Batch opaque retail shadow geometry independently of surface materials 2026-09-09 16:59:13 +01:00
chazmm bf7b894af6 Reuse installed online models by content hash and pose replacement rigs before display 2026-09-09 16:56:19 +01:00
chazmm dff672aee4 Fix FingerFlipOut crash with native grab exit curve lifecycle 2026-09-09 16:51:15 +01:00
chazmm 94e5f613f3 Cache delivered online models and stop completed transfers with fair chunk scheduling 2026-09-09 16:38:49 +01:00
chazmm 842b4adb2f Remove unused gamepad backend and avoid redundant render preparation 2026-09-09 16:34:43 +01:00
chazmm f8e10c8ec9 Synchronize online outfits and native characters with bounded custom model transfer 2026-09-09 16:22:44 +01:00
chazmm 1a6e95b188 Merge complete character importer and customiser setup 2026-09-09 05:01:45 +01:00
chazmm 8bd052c4cc Prepare complete character content on first run and restore stock and clothing lighting 2026-09-09 04:19:07 +01:00