Commit Graph
339 Commits
Author SHA1 Message Date
Hails 418dcecd41 Audio: interim cue tables retired, native water splash, published tools
- The interim cue tables and their opt-outs are gone; the native runtime is the only audio path. Old
  settings/audio.json files still load ("interim" / "native" ignored). Missing native data logs an error
  instead of falling back.
- Water splash from retail's mechanism (SFXObj_OffBoard start / update): Skate_Collisions 1187 / 1197 once
  per water stay, 1198 when the board is in water.
- The random interim riding bed is removed; riding collision and cloth sounds compared with the recomp
  (doc 11). Native output otherwise byte-identical (13 scenarios + 5 sessions).
- Published tools under tools/ (one folder per tool with a README; the recomp ones labelled for use with the
  research hooks), doc 14 and PR plan bucket L.
- Docs: doc 11 (retirement, bail density measured against the recomp, collision posts), doc 13 (usage guide).
2026-10-03 10:20:08 -06:00
Hails 6499b7dea0 Docs: seam-hit prominence closed as a likely recomp artefact 2026-10-03 09:11:01 -06:00
Hails a6d9512f99 Audio: native by default, console cadence, optimisations, review fixes, world foundations
- Native AEMS runtime is the default (`SKATE_AEMS=0` or `"interim": true` for the interim tables, kept).
- MixMap, eEQChain clear and Jitter on the console's 30 Hz cadence, frame-rate independent.
- Optimisation pass (render p50 210 -> 130 us, 0 allocations per block, byte-identical) and hardware FMA
  dispatch in the new skate-audio-fma crate (p50 -> ~55 us, byte-identical; skate-audio stays forbid(unsafe)).
- World emitter banks decoded ahead on a worker thread (no game-thread decode spikes).
- Session-review fixes: push sounds at the foot plant, push-foot plant/lift, bail body impacts, grind on/off.
- Foundations, inert until the engine has the systems: traffic and ped sounds, ped speech rules, NPC skaters'
  board sounds.
- Docs: doc 11 sections, doc 13 (the recompilation research hooks, reference only), PR plan.
2026-10-03 09:08:06 -06:00
Hails 2fcbcc3002 New audio who dis
Native port of Skate 3's retail audio runtime (AEMS) behind SKATE_AEMS=1, plus the world audio work:
- skate-audio crate: formats, patch-program evaluator, voice graph, mixer, MixMap, granular rolling bed and its
  bus chain, Splice contacts, the buses (env reverb network, eEQChain, flanger returns, collision and footstep
  submixes, reverb zones) and the player components (rolling layers, seams on the console's 30 fps cadence,
  grinds, skids, squeaks, tricks, treatment, footsteps, clothing, hands on deck, wind, wheels, collision manager).
- game_audio host: native runtime, player audio state from our physics, world emitters from the maps' .ems files,
  random distant one-shots, zone ambience, state log, e2e render harness, timing.
- Setup: audio export of the banks, grains, MixMap, vault tuning and reverb zones.
- skate-core: per-wheel / per-part audio surfaces and seam patterns (additive).
- Docs: docs/hails-additions/11-audio.md and the PR plan.
2026-10-02 22:58:17 -06:00
Hails b4c31d374c Docs: PR plan — audio draft #32, all open PRs synced with main 7ae67f2 2026-10-02 09:11:28 -06:00
Hails 5e9e4dd784 Audio: retail world emitters from the maps' .ems files
Replaces our own water placement (water.rs: water collision grouped into
bodies, a random 1-2.5 s piece every 0.7-1.3 s that piled up 2-3 deep, which
the user heard as overlapping water at the University plaza).

Setup (audio manifest v4):
- audio_formats: .ems reader (72-byte records) and name_id, Bob Jenkins'
  lookup8 64-bit hash with the seed the sound ids use;
- audio_export: every .ems file with each sound's attributes from the disc's
  skatercollections emitter class 0xF0CEF367088EFFF8 (volume, bank, patch
  selector, volume type, falloff), resolved through parents; decodes every
  bank the sfx_*/skateschool emitters place (100 banks; all 486 sound
  emitters resolve to a bank on the disc).

Game (game_audio/emitters.rs, behaviour taken from TU3):
- sphere or ellipsoid (semi-axes = extents along forward/up/side), inner core
  at full level, level = volume x falloff ((1-d)^2, 1-d or flat);
- at most 5 emitters, in discovery order, released when the listener leaves;
- each water bank plays its program's measured pattern (two-voice relay of
  shuffled one-shots or one loop, with its level/pitch movement) until the
  AEMS evaluator is ported.

Verified muted in game: University plaza starts water_fountain and the
channel fountains_waterlaps_left; Aletown canal fountains_waterlaps_left.
2026-10-02 09:11:28 -06:00
Hails f0ef959462 Game audio: escape the raw NUL bytes in a library.rs test literal
The WAV-header byte string held literal NUL bytes, so git stored the whole
file as binary (no diffs). Written as \x00 escapes; same bytes at compile
time.
2026-10-02 08:22:18 -06:00
Hails 818f109c27 Merge gameplay/water (synced with main 7ae67f2) into gameplay/audio 2026-10-02 08:16:27 -06:00
Hails 06556fac53 Docs: PR plan after upstream merged #26/#17/#18 and its own ISO fix
PR E merged upstream; PR A trimmed to the long-paths change (upstream fixed
the extract-xiso order itself); new row K (solver iterations); upstream sync
notes and known-failure list updated.
2026-10-02 08:16:21 -06:00
Hails 7c5c6b2c51 Game audio: retail-measured layers, transient-safe one-shots, 75% default volume
- Pop, flip-catch and landing cues built from the layers retail plays per
  moment (bank, record, level, delay, envelope measured from TU3 traces),
  with hollow/normal landing tables and per-kind chances.
- One-shots start at their final level (no fade-in eating the transient);
  loops still fade in.
- Riding bed from the measured statistics.
- Master volume defaults to 75 % (100 % is unity gain; 25 % was too quiet
  to judge retail parity).
2026-10-02 08:16:21 -06:00
Hails 7a9e6dc26f Physics: solve the board/skater with retail's 50 constraint iterations
The stock RWMaxIterations (25) is only the Simulation's setup value; TU3
solves with 50 on every gameplay frame. With 25 the constraints converged
less: wheels sank ~10x faster at rest, the ollie deck sat ~1 cm low and
the jump velocity the pop sound reads was too small (rolling ollie
0.21-0.29 vs retail 0.50), so pops picked the quiet row.

Maps validate identically; water traces stay within expectations. See
docs/hails-additions/12-solver-iterations.md.
2026-10-02 08:16:20 -06:00
Hails 969485e5c5 Merge main (7ae67f2, synced with upstream) into gameplay/water
Brings in upstream #26 (indexed collection lookups, our PR E), #17, #18 and
upstream's own extract-xiso fix via our main. The two conflicts are the
extract-xiso call sites, where both sides made the same fix: take upstream's
lines (it also keeps the extract log outside the temporary directory).
2026-10-02 08:10:03 -06:00
Ethanw05 7ae67f269c fix: place extract-xiso options before ISO in core setup 2026-10-02 05:40:26 -06:00
Ethanw05 713fe70b61 fix: correct ISO extraction arguments and preserve failure log 2026-10-02 05:40:20 -06:00
Ethanw05 fe4e7b291a Merge pull request #18 from dylan-gluck/fix/grind-owner-routing
Route grind handlers exclusively through the grind owner
2026-10-02 05:29:13 -06:00
Ethanw05 061b6ceffd Merge pull request #17 from dylan-gluck/fix/rwcm-matching-id
Fix embedded RWCM static matching IDs
2026-10-02 05:29:06 -06:00
Ethanw05 4003812b08 Merge pull request #26 from Hailey-Ross/perf/indexed-collection-lookups
skate-data: hash-indexed collection lookups cut game start and map switch by 5.5 s
2026-10-02 05:28:59 -06:00
Ethanw05 3030b6cd68 docs: simplify history and AI usage; credit dumbad by alias 2026-10-02 05:20:06 -06:00
Ethanw05 dca00688db docs: explain research history and AI usage 2026-10-02 05:13:06 -06:00
Hails 32af010bce Docs and dev tooling: audio write-up, PR plan row J, audition page
- docs/hails-additions/11-audio.md (current design, formats incl. the
  SPLC patch tree, cue table, how it was tuned, prior work upstream
  #1/#4 and why their runtime is not adopted), README row 11,
  PULL-REQUESTS row J.
- tools/audio_audition.py: dev page to audition decoded samples (local
  .local/ output only).
- trace-downtown-lag.json: dev-only perf-trace output from TRACE_PLAY.bat
  (header only, no capture); committed because everything pending is
  committed, not needed by the build.
2026-10-01 17:38:06 -06:00
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 11ff8cd9c2 Setup: extract and decode the disc's game audio (new audio group)
- audio_formats.py: EA SNR (EA-XMA) stream scanner with block-chain
  validation, SPLC bank streams and patch tree (records, layers,
  containers; verified on all 20 banks), .grain files (speed-sweep
  recordings), loopable speed bands, gain-free 5->2 downmix.
- audio_export.py: decodes only what the engine plays (22 ambience
  beds, 14 grains x 6 speed bands, wheel spins, 23 sample banks) to
  PCM16 WAV in assets/private/audio with audio_manifest.json (v3,
  incl. SPLC patch trees). Decoder: pinned vgmstream r2117
  (SHA-256 checked) via the existing dependency() helper.
- Registered as optional asset group `audio` (versions, receipts,
  asset_exports, install); a failure records audio-availability.json
  and the game runs silent. Other groups' fingerprints unchanged.
- .gitignore: retail audio extensions and *.wav (Skyline mod WAVs
  excepted). Tests updated for the new group.
2026-10-01 17:37:30 -06:00
Hails 477e9de3f7 Docs and dev tooling: water write-up, PR H prepared, teleport mod
- 09-water.md: physics, camera, splash and look after in-play testing
- 10-sky-shader-test.md, README index
- PULL-REQUESTS.md: PR H prepared against upstream 60efdef
- water-test-teleport: F7 Aletown canal, F5 position readout, the
  "Teleported" text clears after 5 s
2026-10-01 12:27:23 -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 363d245bf3 Docs and dev tooling: PR plan update, water test teleport mod
- PULL-REQUESTS.md: pending edits to the upstream PR plan
- mods/water-test-teleport: dev-only mod for testing water (F2/F3/F4
  drop into University fountain, University reservoir, DownTown fountain;
  Shift+F2/F3/F4 stand beside them). Not intended for upstream.
2026-10-01 02:44:19 -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 2cd1c8a984 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
2026-10-01 00:21:27 -06:00
Hails 3c33805387 Docs: upstream PR plan (A-G) with fork commits 2026-10-01 00:14:03 -06:00
Hails 8327e94090 Setup performance: skip duplicate stream copies, parallel customiser
- Skip decoding identical streamed asset copies (DownTown streams 107.8 -> 24.8 s)
- Run the character customiser beside the map stage (memory-gated)
- Build.ps1 builds the native RefPack DLL for dev checkouts
- Clothing library texture warm-up and pro roster run in worker processes
  (library 126.5 -> 51.2 s, roster 89.6 -> 15.9 s); shared caches are
  published first-writer-wins to avoid Windows rename races
- pipeline-equivalence.json: combined pairs (committed -> PR F+G)

Outputs proven identical (8,288 customiser files; all maps/spawns).
One-time customiser rebuild. See docs/hails-additions/08-setup-performance.md (PR G).
2026-10-01 00:13:55 -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 f00b329e68 Docs: authored map spawns confirmed in play
All 10 authored starts tested in game. Notes that SkateSchool's start sat inside an invisible collision volume, fixed separately (doc 05).
2026-09-30 22:27:30 -06:00
Hails 167605a4f6 gitignore: local Claude Code workspace (.claude/) 2026-09-30 19:27:03 -06:00
Hails c2be42b2c9 Docs: index of fork changes in docs/hails-additions
Context for upstream review: one document per change with root cause, evidence, verification and open questions.
2026-09-30 19:27:02 -06:00
Hails b495ed696f Asset pipeline: bake authored map spawns and headings
Every map's startup position and default landing zone is its baked
spawn. The old rule (upward triangle nearest the origin) put the skater
over the void on MegaPark and on the roof of Industrial Skate Park and
StartPark, because park origins sit at a corner and retail floors are
sometimes wound downward.

New map_starts.py resolves each district's start from retail data: the
world row's start locator (parks), a chosen fe_locations row for
districts with several (University career start, Industrial Haystings
Park, DownTown Rosalita Skate Park, Maloof street), or the district's
only fe_locations row. Position and heading come from the district's
global_locators records; the heading is now written into the .skate
header. Districts without an authored start fall back to geometry:
compact parks use the new ground_spawn search, city-sized districts keep
the original rule (ground_spawn put Industrial under the streets).

See docs/hails-additions/04-map-spawns.md.
2026-09-30 19:26:57 -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
Hails 0a88f7a94e Setup: enable Windows long paths and relaunch when needed
Roster work paths under deep checkouts exceed MAX_PATH (260), leaving
pro skaters unavailable. If LongPathsEnabled is off, setup asks once for
elevation to enable it and relaunches itself, since Windows reads the
setting at process start. Declining keeps the previous behaviour.

See docs/hails-additions/02-long-paths.md.
2026-09-30 19:26:28 -06:00
Hails ea549ab042 Setup: pass extract-xiso options before the image path
extract-xiso stops parsing options at the first image path, so
`-x <iso> -d <dir>` extracted into the working directory and then failed
on "-d" as a second image (exit 1 -> "Conversion failed"). Use
`-x -d <dir> <iso>` in both call sites.

See docs/hails-additions/01-iso-extraction.md.
2026-09-30 19:26:12 -06:00
Dylan Navajas Gluck 99c04c50a3 Route grind handlers only through the grind owner
MotionFactory already dispatches CreateGrindAttributes, ControlGrindCrouch
and GrindControlFade to motion_grind; the duplicate stock-gameplay variants
were unreachable and contradicted the routing test.
2026-09-30 14:11:05 -04:00
Dylan Navajas Gluck 92a51a8273 Register embedded RWCM clusters with matching ID -1
Native static registration uses matchingID -1; the RWCM unit group only
splits clusters. Using the group filtered static-world line queries for
actors whose query ID differed from it.
2026-09-30 14:08:49 -04:00
Ethanw05 60efdef866 Bundle only Skyline in the installed mods and fresh releases skyline-driving-update 2026-09-29 20:25:49 -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