× Phaseshift FCOM Tutorials

0.0.13 Time Trial ghosts, save data and day/night cycle



Ghost lap data, dynamic day/night cycles, save data manager, with refactoring and improvements to data structures

Because having a track builder in PS:E is a very real possibility, I need a robust solution to creating a Time Trial feature complete with ghosts and an API to allow downloading ghosts linked to a custom created track. This version fixed a lot of user experience bugs and smoothed out a lot of the game, making it have a more professional look and feel.

Save Manager


When setting blistering lap times, they need to be saved somewhere. So I created a Save Manager to be able to save and load the data. I'm also trying compartmentalise the data, chunk it up so the different sections are many, but smaller in capacity. This means ghosts are saved separately and eventually track builder and story mode save data is saved separately. This should help reduce load times by only loading what 'chunk' we need. I found this straight forward due to my experience with Phaseshift - I save any settings or 'public' data via PlayerPrefs. Any private data I'll save in a more...hidden place.

Bubble.UI was made to accept notifications and  save status updates so this linked straight up - meaning players are always aware of what is happening to their save data.

Time Trial gamemode


Making the gamemode was definitely the easy bit! Tracking best laps, checking if there were any quicker and updating the UI was fairly straight forward. I had a few hiccups when saving the time trial session data with the correct trackId, but this turned out to be a silly error on my part. (Grabbing playlist trackId data and not sessionData trackId data) 

I added new UI stopwatch elements for showing the session best and local best lap time (for currently active ghosts). I also added new gamemode options for Time Trial mode, ghost mode on and a new settings called Day/Night Cycle (which I'll get into in a minute!) This allows the player to customise their play session even slightly. I have ideas in the future on how to further expand this. 

Time Trial can also be used with local splitscreen. Each player has a unique ghost that tracks their best session lap time. I also have ideas to further expand this too! I want to try and make Time Trial as compelling as possible as this is an easy way to add (asynchronous) multiplayer into the game, especially through the proposed track builder.

Ghost Mode


Ghost mode was more of a challenge. I had created this previously in the first Phaseshift, but wanted to expand on it in PS:E. The code is very similar, it takes snapshots of a players position and rotation x times per second, then plays it back, sort of like recording a piece of audio, then moving around the play head. When the player drives across the finish line, the ghost plays from the start again. 

I wanted to create a holographic effect much like Phaseshift for the ghost bikes. I'm using a different render engine but the concept was the same. The ghost object stores all of the vehicle data, so the correct meshes and even sponsors are saved - this means I could possibly build a replay feature in the future if requested. 

Side Quests


So in the middle of getting this new gamemode working and fixing bugs and improving UX flow, I wondered how it would look if PS:E had a day/night cycle. I want to include an Endurance style gamemode where pit stops and general durability/longevity is important to winning a race. I wanted to be able to show the passage of time, or at least give an idea of how long a race is. If a race is over 7 laps for example the day/night cycle could change with the time. 

I first toyed with changing the colour of the skybox with an every changing timeOfDay variable. The progression of the timeOfDay depends on a currently hidden setting, but I intend to tie it in with a multiplier depending on the length of a day on that world. Just altering the skybox, then later the main light intensity gave the majority of the effect I was after. I then later added in filter temperature effects on the main light, rotating the light around for different shadow effects as well as creating a custom skybox shader to add stars when the world got dark. For the last touch I added a light to each of the bikes that reflected the same colour as the vehicle material emission colour - the intensity then increased the darker it got giving an added feeling of how dark the world is.

This was a super fun project to add. Definitely out of a scope and a major side quest but something I feel can greatly expand the look and feel of PS:E. Phaseshift 1's worlds were all purposefully dark to help the emissive environments pop. PS:E URP renderer can't do the same amount of emissive pop, but I can definitely emulate it with clever tricks.

I intend on adding the same depth to more dynamic environments in the future, having some tiles change entirely depending on time of day to create extra depth and un-predictability during an event.

Time Trial ghosts, save data and day/night cyclev0.0.13


Mar 16, 2026
  • Connects to BGD servers to track online leaderboards per track
  • Added Time Trial mode, now saves your best laptimes
  • Added Ghost Mode, can save ghosts of your best time from Time trial
  • Currently 2 ghosts can be visible, local best lap, and session best lap
  • Ghosts show up on the minimap
  • Time Trial can be played in local splitscreen
  • Added Day/Night cycle, can be set in the settings along with a dynamic mode to change time during an event
  • New announcer type, Lily and can be changed between available announcer types
  • Added SaveData, favourite data, best laps, ghosts and other records are now saved with your save file
  • Added Vortex sponsor
  • Added and improved audio UI sounds across the game
  • Fixed bugs with input device and menus in the settings menu
  • Removed Steam profile UI showing on load up, now will only show when necessary
  • Refactored Sponsors and TeamScriptableObjects
  • Improved HUD with local best lap and session lap now visible
  • Improved Custom Event menu flow, especially regarding playlists
  • Loads of improvements to UI readability and pop ups
  • Fixed a bug where the mouse could not trigger buttons at the start of a play session
  • Free look has been smoothed out
  • Improved the mix of the Saathea race soundtrack
  • Improved and updated credits

Liked this article?

Please consider sharing!
Author

Josh Lyell

Game Developer

Other Combat Racing games

A futuristic bike races past a logo of the game titled Phaseshift

Phaseshift


Developer: Bubblehead Game Dev

Genres: Combat RacingRacingAction

Platforms: PC


Release date: Apr 8, 2022