Action Races
Overview
Action Races are timed single-player races released as post-launch content for MindsEye, where the player is chasing the fastest time they can set whilst avoiding the destruction unraveling around them. Chaos is breaking out across the city, with robots and civilians attacking each other, and the race runs straight through the middle of it. Along the route, action events play out around the player: fights breaking out at the roadside, spontaneous explosions, and vehicles swerving into their path that they have to outmaneuver.
Road To Hell
A point-to-point race set in the street and underpasses around the Hyperloop Terminal.
Short Circuiting
A three-lap circuit set in a sandstorm on the edge of the city, each lap throwing something different at you.
My Role
- Oversaw the two level designers who built both races, reviewing their level design and directing a further pass on the content.
- Performance was the biggest issue, so we changed the routes, and removed and reordered some of the action events, keeping the races intense while making them less strenuous on the machine.
What I Built
- Cleaned up the race logic after the level design pass.
- Implemented a clean up system, that improved performance by cleaning up AI, VFX and vehicles that were still active but no longer in use.
- Ran performance passes on both races. Everything was built in Arcadia, with the Unreal profiling tools used to debug performance.
Result
Performance improved from lows of 10fps to a baseline of 30fps throughout both races, delivering an action-packed experience in a single-player environment.
Performance Analysis and Improvement Breakdown
The process I followed to find and fix the performance problems in each race.
1. Dissect
- Create a 2D map of the race.
- Split the race into sequential segments of roughly 30 seconds, adjusting each one around environment changes, sharp turns, events and gates so the segments are sized sensibly.
2. Review
- Record a full run of the race with the framerate displayed, both with and without a performance profile attached.
- The more videos or laps captured, the better.
3. Identify
- Note whether each drop is a spike or a sustained dip in performance.
- Collect the top, bottom and average framerate.
- Add timestamps for the pain points.
- Highlight the segments where performance drops lowest.
4. Initial Hypothesis
- Compare against common issues: the camera swinging quickly onto a complex scene that is costly to render,
or an event triggering heavy processes such as large amounts of AI logic or mass collision calculations.
- Frame spike 1: happens after driving through market stalls placed on the road, with boxes and tables flying all over the place.
- Frame spikes 2 & 3: the same location on two separate laps. The scene opens up as you cross the bridge, greatly increasing the render distance and the total number of objects on screen.
- Frame spike 5: hundreds of people are fighting in the streets.
- Frame spike 8: a firework display as you cross the line on the last lap.
- Not every issue is visible on screen. In Unreal Insights, spikes are easy to spot on the graph, and the
timestamps collected earlier help locate the less obvious ones.
- Frame spike 4: detection of lots of AI becoming active via player proximity.
- Frame spikes 6 & 7: a similar place on both laps. Detection shows mass shadow calculations being done.
- Many native Unreal calls are documented online, but in-house processes are often not descriptive enough to understand at a glance. I note down any call that runs longer than expected compared with baseline frames, which makes conversations with other teams much more productive.
5. Solve Whilst Testing
- Never attempt every fix at once. Many performance issues are tied to desired gameplay, so each change or removal is tested on its own to confirm it actually improves performance.
- Solutions:
- Frame spike 1: remove excess AI, remove rigid body assets that can be moved by collision and destruction mechanics, and replace collision profiles so assets don't collide with each other or the vehicle.
- Frame spikes 2 & 3: add billboards. They suit races and can cover open space to reduce render distance. Sometimes adding more can be better.
- Frame spikes 4 & 5: reduce the amount of AI used and the number of AI variations. Compare against a similar scene, like the Bank Robbery, where a smaller amount of AI is used in a combat scene.
- Frame spikes 6 & 7: lights on foliage such as tree leaves, bushes and even grass can drive up the performance cost. There are a couple of options: turn shadows off on complex assets, turn shadow casting off on vehicle lights, or even turn the vehicle lights off.
- Frame spike 8: reduce reliance on VFX for the fanfare at the end of the race. Audio, camera angles and UI can enhance the intensity of crossing the line with a smaller impact on performance.