Reported in #265 by Kayyo321; first fixed in #267 by Jean-LucTch, whose
approach this keeps to the folder being installed.
"Install folder" named each file with fs::relative, which follows links:
a file link inside the folder to a file outside it came out as
../../<file>, and the copy wrote over that file (ReSkate.dll among what
it could reach).
- Files are named by where they sit in the chosen folder
(lexically_relative), never by where a link leads, and go through
safe_entry like a zip's entries.
- A symbolic link, junction or mount point inside the folder refuses the
install, saying which. Links on the way to the folder or to the Mods
folder (a library moved to another drive) stay fine, as do cloud
placeholders such as OneDrive's, which name nothing else: #267 refused
any reparse point on those paths, so a game reached through a junction
could install nothing.
- Tests: a junction inside a mod folder is refused and the file it leads
to is untouched, with no staging left behind (this fails without the
fix); a Mods folder and a picked folder reached through junctions still
install; a file symbolic link is refused (skipped without Developer
Mode, which creating one needs).
Co-authored-by: Jean-Luc T. <88255067+Jean-LucTch@users.noreply.github.com>
- page_banner: each page opens with its heading, what it is for, and how
things stand at the right (a status pill and a caption). card: the
panel the pages draw on, lighter edged on hover, blue edged when marked.
- MY MODS and GET MODS rows are cards with a gap between them (list_row),
in lists without a border. MY MODS' banner counts problems and waiting
updates and holds the load-order explanation; GET MODS' says whether
the listing loaded and what is installed or waiting. The ticked bar on
GET MODS is a card.
- OFFICIAL: a card per mod with its status and version pills, its
Thunderstore facts, and THUNDERSTORE and OPEN FOLDER.
- PROFILES: new-profile and import cards side by side; a card per profile
with a picture of its first mods' icons, pills for what it holds, LOAD
and UPDATE, and the rest in a menu.
- The borderless window has a frame style for resizing, snapping and its
shadow, with WM_NCCALCSIZE keeping the whole window client. Its edges
and corners resize it; maximised, it is inset by the frame Windows puts
past the screen.
- WM_GETMINMAXINFO holds it to the size it opens at.
- The swap chain's buffers follow the client size (Renderer::resize).
- Frames are drawn from WM_SIZE too, so dragging an edge (Windows' own
message loop) does not stretch the last frame.
Every update, and every install over an installed mod, sent the old
folder to the Recycle Bin, which filled up with old versions.
- commit() moves the installed copy aside into the staging folder, moves
the new one in, then deletes the old for good. A new copy that cannot
go in puts the old one back; a copy with a file in use is not replaced
and stays whole.
- Uninstalling still goes to the Recycle Bin. The Replace dialog says the
installed copy is deleted.
They load from Mods/.reskate-official, outside the Mods folder's list, so
the page took the ones in effect for mods whose folder was gone: "Folder
deleted / APPLY TO UNLOAD", a change pending, and an Apply that reloaded
the level for nothing.
- Each official mod has a tile of its own after the installed mods:
OFFICIAL while in effect, SET ASIDE while Board Break has another deck
in the game, APPLY TO LOAD for one put in place since the game started.
No Enable/Disable: the launcher keeps them.
- live_mods::preview leaves built-in and official content out of what
applying would unload.
The launcher reads the official list from the ReSkate backend (or the last one it read, or its own)
and keeps each mod in Mods/.reskate-official at its latest version; a copy the player installed is
moved in, the deprecated Board Break retired. The game loads them always on and leaves out Mods
folder copies; the browser no longer lists them. The built-in zips are gone (FPV drone too), and
built-in folders no longer carried are removed.
Fourth Studio's Board Break pack (ten decks and every sound) and Road Rash wounds are built into
ReSkate.dll beside the FPV drone, unpacked under Mods/.reskate-builtin and always on.
- The Thunderstore copies (Fourth_Studio-Board_Break_Pack, Fourth_Studio-Road_Rash and the
deprecated Fourth_Studio-Board_Break, or the same put in by hand) are moved to the Recycle Bin
as the launcher starts and dropped from mods.json; the merge leaves them out should one still
be there, and the Thunderstore browser no longer lists, updates or installs them, a dependency
on one included.
- Board Break's deck list, sounds and deck settings look in the built-in packs too.
- Names with spaces inside them (Board Break's "Body Impact 1.wav") unpack.
- The build makes each zip in assets/builtin into one zstd stream (ReSkateBuiltinPacker,
Engine/Vfs/builtin_pack_format.h), which the DLL carries: repeated files across a pack cost next
to nothing. Board Break 15.0 -> 5.4 MB, the drone 6.0 -> 5.4 MB, Road Rash 36.1 -> 34.2 MB;
ReSkate.dll 86 -> 70 MB. Plain zips still unpack.
- Tests: the mods taken for built-in ones and their retirement, and a pack unpacking to exactly
its files, refusing one that leaves its folder or is cut short (RESKATE_BUILTIN_PACKS also
unpacks the packs a build made).
In a level, the cracks, the board's metal and the body's hits play through the game's own
positioned sound where the skater is, as the drone's motor does, so the game's mix and echo apply
and a break heard from afar sounds far off. Several still play over each other.
- Each wave file is also made into the 16 kHz mono that sound takes, as it loads (8, 16, 24, 32
bit and float, any rate and channels, averaged down so a crack's highs do not alias).
- A tick on the client thread, beside the drone sounds, streams them in at the skater's root.
- Outside a level, or until the game's sound is ready, they play straight to the speakers as
before.
path::string() uses the ANSI code page and throws on a character it lacks (a Cyrillic folder on
an English Windows). The remaining places it was used now go through path_utf8:
- Mods: a deck folder or a mod folder named outside the code page no longer leaves the Board Break
decks empty, or the Mods folder ignored altogether.
- Game and mod archives: a file under Win32 with such a name is passed over instead of stopping
the read.
- pose-dump no longer ends the multiplayer session when the game folder is not ASCII.
- The item browser's status line and a Board Break warning no longer fail on such a path.
- Launcher: system fonts are named to ImGui in UTF-8, which it reads.
Sentry's minidump endpoint streams every attachment but the dump to an object store, which this
self-hosted Sentry does not run: ReSkate.log and report.json were dropped from every crash
(outcome upload_failed). Each crash now goes to the envelope endpoint as sentry-native sends one:
the event, the minidump, report.json and the log, all kept.
- The event carries the log's last 100 lines as breadcrumbs (debug lines only among the last 25),
the mods the game ran with (enabled, outdated, excluded), how long it had run, and an anonymous
install ID as its user. Its time is the crash's, however late it is sent.
- crash.site tags where it crashed ("Skate.exe+0x3d9ed9d"), as Sentry names game code by the
nearest export; mods.count how many mods were on.
- An accepted report is kept in sent/ (the newest 10) instead of deleted, so the player still has
their crashes.
- multipart.* is report_envelope.*; the receipt check also reads the envelope endpoint's
{"id": ...}.
- Riding back and forth in one place (a halfpipe, a bowl, laps of a spot) is filmed from a spot
off to the side, high enough for the airs, instead of chasing each turn; riding off or no turn
back for a few seconds goes back to following.
- It looks along where it flies and slows in time to stop short of a wall, sliding along it;
short probes push it off anything close and keep it from climbing into a ceiling. A spot behind
the skater that is inside a wall comes in to this side of it.
- It keeps its clearance over the ground under it and just ahead of it, climbing as fast as a rise
needs, and only sinks slowly near the ground whatever its spot asks.
- FOLLOW ME has Follow distance (3-12 m) and Aggressiveness (0-1, how quickly the pilot reacts,
how hard it leans, closes gaps and turns); the middle is the tuning it had. Also dronetune
followdistance / followaggression.
- Tests: a halfpipe session, turning round at a wall, a slope and a spot under the ground, and the
settings' middle being the usual tuning.
combine() recorded every source's copy of every EBX and resource asset, so that conflicting edits could be combined later. Map mods carry near-complete copies of the game's root-level bundles, so most of those copies are the game's own bytes. A mod's copy equal to the game's first copy of the asset, the copy edits are combined onto, is no longer recorded; the game's copy, recorded first, stands for it. A contribution points at its source's folder instead of copying the path. The merge report counts the copies left out.
In a level the pilot's drone is played with the other players' drones through the
game's positioned voice sound, just under its camera, so it gets the game's mixing,
reverb and obstruction. The Windows output only plays it where the game's sound is
not there to take it.
An autopilot flies the real flight model behind the skater while they skate: it
works the sticks a pilot would (angle mode with height hold), reacts a moment late,
eases toward the lie of the ground instead of every ollie, closes gaps no faster than
it can slow down gently, and climbs a little over what blocks the shot. Its camera
sits on a tilt gimbal so leaning to speed up or brake keeps the skater in frame.
Started from FOLLOW ME on the DRONE page or the dronefollow command; it hides the
game's interface like Start flying does. Tests cover straight, turns, hard stops,
ollies and catching up.
An array record's hash is one per field type in a document (every
array the base game's files hold follows this, and each such hash is a
key of the document's reflection group table, now read). A new array
takes the hash of an existing array of the same holding type and field;
callers can ask the writer to refuse when there is none, and the mod
merge keeps the old fallback. Checked on the game's own
level documents.
Each array record carries a hash the original files make specific to
the field or element type; the writer used to give every array the hash
of the first record of the same element type, so a rewrite changed
hundreds of them in bam's level root. Arrays read from a document now
keep their record's hash; only arrays with no source record borrow as
before.
A rewrite copied a boxed value's bytes, pointers and all, but wrote the
arrays and strings those pointers reach only when a field also reached
them. Rewritten documents lost that data and the boxed pointers aimed
at whatever moved into its place; the mod merge rewrites real documents
this way. Read documents now keep their EBXD bytes, and the writer
carries every array, string, instance and boxed value a boxed pointer
reaches, repointed. Found by a round-trip check on bam's level root (one string and
about 1,120 bytes of arrays lost).
The icon is about half its old size and is drawn just above the drone's
model, with the distance and name stacked above it, so the marker no
longer covers the model.
The tests read the merged patch through CasStore and list_bundle, report a missing archive as a failure, and cover a mod archive numbered like a placeholder.
A mod archive numbered 65534 or 65535 is placed under a free index, so no real placement is read as a placeholder. carry() records every payload in one list (settle() still writes each once per install chunk) and keeps one archive index, as write() does.
The music mod's song names its audio chunk; each map that takes the song carries the chunk too, and every chunk entry in the patch points at bytes inside its archive.
A carried asset whose install chunk no package names fails when it is carried, and is noted, as it was before it was written once; it no longer fails the whole merge when it settles.
A carried asset was written again for every superbundle that carried it: 1.4 GB of 2.2 GB with 96 mods, which left no room for a live apply. Each one is now written once per install chunk, when its first superbundle settles.
Each remote drone's motor is synthesised and played through the game's positioned voice sound,
the one proximity chat uses, so it is placed in the world and muffled behind walls. The throttle
is worked out from how the drone accelerates, so the drone packet and protocol stay the same.
Full volume only within 1.5 m, heard out to 120 m; the DRONE page's sound volume sets the level.
A model is spawned at each other player's flying drone and moved every frame. It is the drone's
own model (FPV Drone by PinaPipe, CC BY 4.0, credited on the DRONE page), built by ReSkate Studio
into a pack that ReSkate.dll carries and unpacks into Mods/.reskate-builtin before the merge.
Without the pack the game's traffic cone stands in. dronemodeltest spawns one in front of you.
Gamepad: the drone flies with a gamepad by default (Xbox or PlayStation,
read directly; with none plugged in, the keyboard and mouse fly it), Mode
2. Its throttle stick springs back and its middle is hover power, so a
resting stick no longer means 50% throttle; the sticks are scaled down
(60%, which in angle mode slows turning only), softened in the middle and
given a round dead zone, and the right stick is inverted by default (up
tips the nose up; padinvert 0 for a radio's way). A arms and disarms, Menu
puts the drone back; while the ReSkate menu is open the pad is the menu's
and the drone holds still. An RC radio is still a choice.
Height hold is a toggle (off by default): the middle of a springing
throttle holds the height, adding throttle as the drone leans; partway it
climbs at the climb speed (20 m/s), and full stick is always full or no
throttle. Angle (self-levelling) mode, leaning 55 degrees, joins acro.
Flight: thrust grows with motor output to the power 1.5, so the hover
throttle sets thrust to weight (22% is about 10:1); the motors spool up
and down and the turn rates catch up with the sticks in about 30 ms.
Drag is quadratic and larger across the props, set by the top speed
setting so flat out settles near it (no more hard cap); inflow, ground
effect and prop wash. Defaults: gravity 9.81, camera tilt 0; the drone
starts level.
Crashes: collisions sweep to the surface met, find its normal with two
more rays, and slide along it; hard hits bounce and tumble the drone,
and one at the crash speed (7 m/s) cuts the motors until it is armed
again, with a warning and a broken-up picture.
- overlay.h: the gamepad reader is declared in the overlay namespace,
where it is defined; nothing could call it before.
- Tests (drone_flight_tests): hover and height hold, full stick past the
hold, thrust, motor and rate lag, top speed, angle mode, wall crash and
re-arm, crashes off, a gentle landing, and the gamepad's sticks.
A whole pose from a dedicated server opened a stream under any of its
65,536 numbers, and each stream kept its last 32 poses. Streams were only
dropped once their player had left, so a sender that opened one under
every number for a player who was there (itself) made the receiver keep
millions of poses. Sound streams were open the same way.
- pose_batch::open_stream: a player's new stream ends their old one, and
no more than 512 streams are held (twice the player limit); both the
pose and sound receivers open streams only through it.
- A stream is opened only for a player in the session. A refused whole
pose is not acked, so a real server sends it again; sound is sent whole
every couple of seconds.
- Tests: the reported flood leaves one stream for one player and 512 for
65,535; the same for sound, and only admitted players open a stream.
- mesh_tests: HookBatch stubbed, which the session uses since the freeze
fixes; the test had stopped linking.
The game's own connection is a loopback to the world it hosts in the same
process, but it keeps the game's in-game timeouts (15 s in Game.cfg,
5 s in Branch.cfg). A replay export holds every frame to the encoder's
pace, and a long one stalled the game past that: the game left the map
with SecureReason_TimedOut and went back to the splash screen while the
export carried on.
- Client.IngameTimeout and Server.IngameTimeout are set to -1 (off) at
startup, as the game's own development config does; ReSkate's
multiplayer runs beside that connection and keeps its own timeouts.
- Set apart from the other startup settings and tried for a minute, so
a name the game does not take cannot hold those back; the result is
logged.
Most crashes are caught by the game's own fatal handlers, which write a
dump of thread stacks only; the launcher could only copy it after the
game had exited. A crash on a freed or overwritten object then showed
the faulting registers but not the object or the list it came from.
- game_fatal_dump: the game's MiniDumpWriteDump import points at
ReSkate. Before the game writes its dump, the crash reporter takes its
own of the still-running game for the faulting thread; the game's dump
follows as before. Reports say capture.source "game-fatal-handler".
- The reporter's dumps include the memory the stacks point at
(MiniDumpWithIndirectlyReferencedMemory), a few MB more a report.
- The shared report says who asked for the dump (protocol version 4).
- Tests: a game-handler crash is captured with a heap block only its
stack points at; ReSkate's own capture keeps it too.
A spatial transaction queue gives every object it tracks a cull ID from a
free list made once, when the queue is, at the game's
InitialCullIdListSize (40,000 in its config), and never grown. A custom
map with more objects (Cardiff) emptied it while loading and the next
insert read entry 0xffffffff of the list (crash at 0x489cfe9).
- spatial_cull_ids: as each queue makes its list, its size setting is
raised to 262,144, one ID for every entity slot the entity pages hold;
a larger configured value is kept. 12 bytes an ID per queue.
- The contract checks the list maker and how it reads the setting; it is
installed at startup with the other world pools.
The streamed-texture reading is one of the perf readings, and perf textures is where it gets
looked for. It is now an alias, so Tab under perf offers it too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each bone's scale was held to the limit (a server's bone-scale, 2x by
default; 8x on every client), but a bone shows at its own size times its
parents' and the whole skater's. A modified client resized each bone of
a chain to the limit: four neck bones at 2x showed a neck 16 times as
long, within every per-bone check.
- skater_bone_parents.h: the parent of each of the skater rig's 386 bones,
read from the game's data (animbase_default_renderskeleton), which the
pose's skater bones follow.
- limit_bone_scale then holds each bone to what its parents leave of the
limit: the size it shows stays within 1/limit to limit. A single resized
bone (a bigger head) is unchanged; bones past the rig's have no parent
and keep the per-bone limit.
- Servers and clients already hold every pose to their limit with it, so
the combined limit follows each server's bone-scale setting, and every
client's 8x where a server allows more.
- Tests: a neck chain at 2x each shows at 2x; a resized skater's bones are
held to what its own size leaves them.
Turning "Install ReSkate updates" or "Test pre-releases" on or off took
effect at the next start. Closing settings after changing either now runs
the update check again: a pre-release is offered as soon as it is wanted,
the latest release when it no longer is, and a pending update is dropped
when updates are turned off.
- Not while a download, an update or a launch is under way, while the game
runs, or while a merge waits on an answer about mods; nor as the launcher
closes. The next check or start picks the change up then.
- The "Test pre-releases" help says the check happens when settings close.
719cba1 stopped writing the metadata pointers into the other renderer
(0x2daa00 bytes, Skate.exe+0x30c64cc, kept at 0x75f2700), taking them for
the state owner's alone. They are not: the other renderer's own code reads
them through the patched view (0x030e6bff, called from 0x30a7e18) and
append (0x03e94fe6, called from 0x30d8ebb). Without the write, it read
whatever lay 18 MB past its end. With it, as in every release before, that
memory was overwritten, or the write faulted when nothing was mapped there
(the store_field crash).
- The other renderer's allocation is patched to the state owner's
0x11ab080 bytes (0x030c64cc, mov ecx), so +0x11aae28/+0x11aae30 are
inside it.
- Both renderers' metadata pointers are written again, before and after
the native constructor. The resource-state and relation-mask vectors stay
the state owner's alone: the other renderer keeps fields of its own at
+0x2da920.
- The contract's comment says which renderer reads what, and where.
Players reported the game hanging for about a second while skating. A
profile showed the memory line in the log walking every heap
(HeapSummary) on the client thread, 0.5 to 2 s every two minutes. An
audit of everything that runs on the game's update and render threads
found more of the same, and Sentry's top crashes had causes of ours.
Freezes:
- Memory log line: no heap walk or thread snapshot; the GPU part and the
write happen on a thread of their own.
- Profile database: synchronous=NORMAL in WAL mode. A save is still kept
when the game crashes; every play event no longer waits for the disk
inside the game's hooks.
- ReSkate's own preferences and values (menu clicks, session sliders,
Discord) are saved by a background writer in order; reads see a value
until it is saved.
- Input: the foreground window and the keyboard are sampled on a thread
of their own (GetAncestor and GetAsyncKeyState stalled the client tick
40-50 ms when another program held Windows' lock); flight input uses
the sample; ClipCursor at most twice a second while a menu has the
pointer.
- Hooks installed while the game runs go in one transaction per place
(HookBatch): throwdowns, remote players, the party, Hall of Meat.
- Off the update thread: the host's map package lookup (one table read in
the background, not the Mods folder per offer), the trainer's map file
and settings save, Board Break's settings save, mod music playlists and
their covers, the Spotify station covers.
- Off the render thread: the Modding page's and the deck card's Mods
folder reads. The overlay's three startup waits share five seconds.
- Less work per frame: Steam names reused while one a frame is asked
again, 2 friends a tick, steam_api64.dll checked once per process,
cosmetic names read in place rather than a system call per character,
an outfit load no longer copies the inventory per slot, the throwdown
type scan runs at background priority over resident memory, the Board
Break deck label is kept a minute.
Crashes:
- Render-resource pool: the metadata fields are written to the state
owner only. The other renderer is 0x2daa00 bytes, and +0x11aae28 is far
past its end (store_field crash; heap corruption in every release).
- Other players' skateboard effects: a stale skateboard component is no
longer followed, and the joint lookup is walked with a bound first (an
endless loop in reused memory ended in GameStall).
- Launcher: Oodle decodes into the buffer it asks for with corrupt data
possible, and its assertions no longer stop the process (heap corruption
in the store-copy scan; a breakpoint in oo2core).
Timings (Send performance timings):
- A frame of half a second or more in a level is sent as game.freeze:
where the time went (ReSkate's tick, the game's frame, or outside it),
whether the renderer kept presenting, and ReSkate's busiest zones.
- Closing the game sends the level session it was in.
Music after a connection drop:
- Spotify device: an account Spotify could not be reached with is kept and
tried again (3 s doubling to a minute); a session that drops is taken
up again. Only an account Spotify refuses is asked for anew.
- YouTube playlist pictures that could not be fetched are tried again,
from 30 s to 10 minutes apart.
Switching time of day could load the new layer while the old one was
still loaded: the apply loop goes through the layers in catalog order
and sends one event a pass, so going to an earlier time (WeatherDay ->
Evening) sent the load first, and nothing waited for an unload to finish.
Two times of day at once carry both times' lights, and a level with many
lights overflowed the engine's light tables.
A time-of-day layer is now asked to load only once every sibling time of
day that is to be off reports requested and loaded both false; until then
its row says "Waiting for the old time of day".
An unload is no longer sent while the engine is still loading the layer
itself. The engine ignored it, so at a level load the level's own time of
day could stay loaded beside the saved one, and with the wait above the
saved one never loaded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings > Launcher > "Test pre-releases" (off by default). On, the update
check takes the newest GitHub release that is not a draft and carries a
launcher.json, pre-release or not, in place of the latest full release:
a pre-release newer than the last release is installed, pinned by size
and SHA-256 as any release is. Turned off, the next check goes back to
the latest release, whose files then replace the pre-release's.
- The update notice says "Pre-release" for one, and the log names which
kind of release was taken.
- The changelog shows the release the setting picks, marked as a
pre-release, and is fetched again when the setting changes.
- --no-gui launches follow the same setting.
Follow-up to #225. The session still waits 30 minutes in all for a map
(checking, the two-minute question, download, install, apply, join), and
servers and lobbies still let a player go at 30 minutes. But a download
that has begun is no longer cut off at 27 minutes: a large map on a slow
connection never came at all that way.
- Once the download has begun, the session's deadline is the session's
alone. The download goes on (up to its own four hours, as before #225),
installs and is applied, and the player is told to join again; no
rejoin is tried past the deadline, where the server would turn them
away. "Map still downloading" says so when the session stops waiting.
- Before the download, the deadline still ends the check and the question.
Declining or cancelling still stops it and removes the partial file.
- A download whose session has gone is not cancelled by joining another
session; a new map need is turned away until it is done.
- The 27-minute transfer budget and its completion reserve are gone from
map_fetch_policy.h, with their tests; the map download tests cover the
new behaviour.
- The HTTPS timeout test compiles with warnings as errors (a signed and
unsigned comparison), and get_text's stale-file removal is indented again.
- README: map downloads described as they now are.