Catch My Drift

A high speed, 6DOF, flight racing game. Set in the distant future, you play as a pilot and fly a ship called a drifter. Play in any of seven different maps, on Earth, in its orbit, and on the Moon. Race to get the fastest time, play against your friends, and even play against your previous races.

Flight is simulated using custom physics code, based on real aerodynamic forces like lift, drag, and the ground effect. Each frame, the ship’s velocity vector is used to determine the magnitude and direction of these forces, using their associated equations, and applied to the ship. 3D math is used extensively in these calculations to properly simulate these forces.

Using build mode, you can create your own ships. Select parts and place them where you want. The shape of your ship also determines its aerodynamic properties. Long, slender ships will perform differently than wide ships. Pointed and rounded parts will create less drag than flat ones. You can view its specs change in real time, simulate inputs to see how it performs and tune each part.

Playback your races in the replay mode. Set custom camera angles to make videos. Set the camera to follow your ship as it drives by, and create clips using your favorite recording software. Attach your camera to the ship in whatever angle you wish to get the best angles for your video.

As part of the replay system, any replay can be raced against in a ghost race. Play against your old times and try to beat them, with your replaying drifter flying against you in real time. You can also ask your friend for their replay files and race against them too.

Race against up to seven of your friends in multiplayer. Fly with a starter ship or any of your custom built ships with your own tuning settings. One player hosts and the other can connect via IP. Custom network code for ship movement and replication of ship states.

Project Details

Catch My Drift is a project in ongoing development. It is the current result of 7 months of active development between 2022 and 2023, with a large amount of C++ code, including some custom physics and replication code, and more logic in Blueprint. The code-base has several large modules that include:

  • Replay system - A record of the ship’s state and inputs are saved for later replay. States and inputs are saved as structs, and saved into a SaveGame object in Unreal Engine. The replay system then iterates through the states and inputs, playing back the moves again and interpolating between states for a smooth replay experience.

  • Build Mode - Allows player to create their own ships from a selection of parts, that include thrusters, fuel tanks, wings, and others. Players can pick a part from a selection, rotate it, move it, and place it onto the body of your ship. Parts can connect to other parts. The ship is saved as a JSON file and can be loaded in single and multiplayer races, or for later editing in build mode.

  • Physics simulation - Several different forces are enacted on the ship, including thrust, drag, lift and gravity. Mass is an important factor to determine the resultant acceleration due to these forces, meaning massive ships will accelerate slower due to thrust, decelerate slower due to drag, and heavier ships will also have less lift. The system also calculates surface area dynamically for your ship, meaning drag will be higher for ships with larger profiles.

  • Three different gameplay modes - Race (single player and multiplayer), Ghost Race, and Replay. A regular race can be played alone or with friends. By sharing your external IP with them, they can directly connect to your session. A ghost race can be played against your own replays. Much like watching a replay, a replay is loaded and then its states iterated upon to move a ghost ship along the track while you race alongside it.

  • Movement replication - Custom network code, implementing client side prediction algorithm [1] [2]. Movement replication takes advantage of the infrastructure implemented for the replay system by using its input and state structs to replicate ship movement across the network to all clients. This results in smooth gameplay for clients, without jitter.

GitHub Repository: https://github.com/kevinrmahoney/ProjectZero

Tools: Unreal Engine, Gaea (terrain)

Plugins: FMOD (audio)

Team

  • Kevin Mahoney - Developer

  • Matthew Mahoney - Audio design

Visual representation of the wind tunnel's scan, to determine a ship's aerodynamics for drag calculations.

Each part can be damaged by hitting terrain or rings. Damage is shown via the integrity display. Highly damaged parts will leak fuel, provide less thrust, won’t provide as much lift, etc. Coupled with the power diversion system, this means the drifter’s performance can and will change throughout the race.

Features

Tuning window
Large thruster part info panel
Simulator window
Specifications panel

Debug lines drawn to show trace lines that detect parts, which is used for drag calculation.

Ground effect debug, showing traces done to detect closeness to surface, negating drag.

Client debug lines for netcode client prediction. Yellow is before rollback. Red is after rollback. Green is the final result after replaying inputs.

The leaderboard shows a record of all races you’ve played in, sorted by your result.

Controls can be mapped through settings menu.

All races are shown in the replay menu, where they can be watched, played against, or deleted.

An example of the build menu widgets when creating ships.

Tuning Window allows the player to tune each part that can be tuned, such as changing how much fuel is in the tank, setting thrust levels, setting lift generation of wings, etc.

Specifications window shows important statistical information about the ship, including its max velocity, acceleration, thrust, lift, drag, mass, etc. Most specs can be expanded to show even more detailed information about the specifications in each direction

Simulator allows you to simulate how the ship will perform given certain inputs, such as thrust levels, if using boost, fuel and boost fuel levels, and flap angle.

Part Panel can be see by hovering over a part in the part selection panel , displaying its statistics.

Small fuel tank part info panel
Small reaction wheel part info panel