Benchmark routes: VICTORY_BENCH_ROUTE=downtown|drive #554
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!554
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-554"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@jackonick on GitHub · 2026-12-05 03:05 UTC · original
jackonick:bench-routes→main· +2141 −14 · 10 files · 2 commits · merged 2026-12-05 20:22 UTCTwo fixed benchmark routes built into the layer, so anyone can benchmark the same places the same way, with no mods. Results are comparable across machines and builds (game 1.0.2.1).
Usage
VICTORY_BENCH_MINUTESstill sets the length. WithVICTORY_BENCH, timing starts when the route starts, andbench_stats.txtnames the route.Routes
downtown: a noclip flight in a Blista around a 2400 m square with its corner at (-2600, -1000).drive: the game's own AI drives a Blista around a loop on the roads in the hills, starting at (-2556, 6948), with traffic. About 3.5 min a lap.How it works
crates/victory-loader/src/bench_route.rsis a minimal script-native caller:VICTORY_BENCH_ROUTEis set.Testing
main, builds clean, and the route unit tests pass.VICTORY_BENCHon this exact branch.🤖 Generated with Claude Code
@Widget9337 on GitHub · 2026-12-05 06:27 UTC · original · edited 2026-12-05 06:34 UTC
Thanks for this, a fixed route is exactly what I was missing for test runs.
Tried both routes on an RX 9070 XT 16 GB (Ryzen 9 7950X3D, 64 GB RAM, CachyOS, this repo's Mesa and vkd3d-proton), game 1.0.2.1, Series X, 1080p with FSR 4 Balanced, ray tracing on. The PR merged cleanly onto
mainb581f7e(plus #428 and #445), release build. I usedVICTORY_BENCH_ROUTEon its own with my usual settings, withoutVICTORY_BENCH.downtown: works
All 25 natives checked, the flight started 15 s after Jason appeared, and the laps logged at 320 s and 640 s. One thing made the laps differ: with no input, the idle camera starts and takes over the view.
I got around it locally with a stick nudge: during the route, the first pad's right stick is set to 0.5 for 0.2 s every 10 s, in
pad()ingameinput.rs, next to the benchmark's Enter:route_nudge()is true for the first 0.2 s of every 10 s whenVICTORY_BENCH_ROUTE=downtown. Since the flight sets the camera's direction every frame (SET_CAM_RELATIVE), the nudge never shows. With it, the idle camera didn't start once over a full lap.That only works with a controller connected, though. Two ways it could work for everyone:
FALLBACKdevice, whose right stick is I/J/K/L), so it works the same with no pad connected.INVALIDATE_IDLE_CAM, andINVALIDATE_VEHICLE_IDLE_CAMfor the car) each frame next toSET_CAM_RELATIVE. That wouldn't need any input at all.A warning about using a key instead: I tried F15, assuming nothing was bound to it, and it opened the phone (first person, half the screen) and reopened it every 10 s.
drive: two problems
1. The teleport did nothing here. The first try ended with
stopped: the ground at the start did not load in 60 s, and Jason never left the house.teleport()is the only placeSET_ENTITY_COORDSis used, and on this build it left Jason where he spawns. So the ground at (-2556, 6948) never streamed in, because he wasn't there. Switchingteleport()to the flight's call fixed it:The start then took about 1 s. Separately, when the route stops there, he stays frozen in the air. A
freeze(me, false)on the way out would help.2. Leg 2 ends in a tree, every time. Two runs, with no input at all in the second:
About 11 m past waypoint 1, heading for the start 243 m away, the AI drives into a tree and gets stuck on it. Since it's the same spot both times, I'd guess waypoint 1 is just off the road, so the AI has no road to follow back and goes straight at the start. Maybe an extra waypoint between 1 and the start, on the road, would fix it.
@luisaugustz on GitHub · 2026-12-05 13:30 UTC · original
Thanks for this.
downtownworked on every run here: about 50 runs on RX 9070 XT + Ryzen 7 5800X, game 1.0.2.1, RADV. The flight is steady enough that 200 s windows of the baseline land within about ±0.3 fps of each other.drive: the AI took a long detour on leg 1 and then stood at 1 km/h for a while in the run I tried, so I useddowntownfor the comparisons.Results are in #591.
@t-jonesy on GitHub · 2026-12-05 14:19 UTC · original
Thanks for the routes.
downtownhas become our main bench for driving 1% lows. Here are the fixes we needed on top of82b99a6and what we measured. RX 9070 XT 16 GB, Ryzen 9 7950X3D, game 1.0.2.1, 3840x2160 with FSR 4 Performance, ray tracing on, 30 fps cap.Fixes we carry (same findings as Widget9337's):
teleport()now usesSET_ENTITY_COORDS_NO_OFFSETwith[e, v, 0, 0, 0, f(0.0)], as the flight does. With plainSET_ENTITY_COORDSthe player stayed at the spawn and the drive stopped with "the ground at the start did not load in 60 s". With NO_OFFSET the start takes about 1 s.freeze(me, false)runs on every way out of a route, so a stopped route no longer leaves the player frozen in the air.downtown. The right stick is pushed to 0.5 for the first 0.2 s of every 10 s once the route has started, unless something else moves it. The push goes to the first pad and to the keyboard's stand-in pad, so it works with no controller connected. The flight sets the camera's direction every frame, so the push never shows. Over an 11-minute flight the idle camera never started. We did not findINVALIDATE_IDLE_CAM's handler in 1.0.2.1, and we avoided key nudges (Widget9337's F15 opened the phone).VICTORY_BENCH_ROUTE=spot. We added this mode for fixed-camera benches after an autosave moved our spawn indoors. Fifteen seconds after the player appears, it applies the same noon, sunny, no-wanted and invincible settings. It holds the player overVICTORY_BENCH_SPOT=x,y[,heading](default: the downtown square's corner) until the ground loads, puts him there, and leaves him alone. It still needs some input, or the idle camera starts after about 30 s.drive: waypoint 1 is the problem, not the leg back. With the teleport fixed, we changed the loop to go back the way it came: start, (-2399, 7172), (-2566, 7202), (-2399, 7172). That did not help:So from (-2566, 7202) the AI leaves the road in both directions: a tree toward the start, the river toward the previous point. That suggests the point itself is off the road network, at the end of a spur. Moving that waypoint onto the road, or dropping it, is probably the fix. We have not found a replacement point yet. luisaugustz's long detour on leg 1 may be the same thing.
downtownas a lows bench. Our method: start the window 60 s after the route starts (to skip the first streaming), measure to +270 s, take frame intervals from a tracer, and interleave A/B arms with control runs.With it we could separate changes of 1.3-2.2 fps in the 1% low from noise with 3 runs per arm, and reject several changes that were neutral (0 ± 0.3).
@luisaugustz on GitHub · 2026-12-05 15:11 UTC · original
@t-jonesy The idle camera can also be turned off in the game's own settings menu. That should make the stick pushes unnecessary, including for
spot.@datWeazel on GitHub · 2026-12-05 16:44 UTC · original
On
main@8bf4878withVICTORY_BENCH=nort VICTORY_BENCH_ROUTE=downtown(game 1.0.2.1, RX 6950 XT), the route started on the title screen.PLAYER_PED_IDis already valid there, and the ped stands at the save's position, so "the player is in the world" was logged before any save had loaded. The benchmark then timed 5 min of the menu, and the automatic Enter presses no longer got past the account picker.Waiting for the ped to move 2 m from the position first seen worked reliably here (4 of 4 runs); it needs one step from the player. A draw-count threshold does not work: the title screen draws about 11,000 draws a frame.
Also, the route can trigger an autosave, so restoring the save before each run is worth a note in the README.
82b99a685ato24abbb25cc