This player placement system tracks the players’ rankings during the race (first, second, third, and so on) in our multiplayer game.
At first I built it with straight‑up vector math, dot products, and scalar projection to figure out each player’s progress, but that came with some headaches. Every time the track changed, either I or the artist had to drop a bunch of target points and tweak their width to match the track width. Target points only work in straight lines, so on curves, the artists had to spam even more points super close together, which was not exactly efficient.
Scalar projection looked great on paper, but after checking how other games handle ranking, I found a way simpler, cheaper trick: a cumulative‑distance formula. It’s easier to read, lighter to compute, and when I swapped those target points out for Unreal splines, the curve problem just vanished. Now artists can drop a spline in seconds and the system just works, which makes it awesome because they don’t have to worry about map edits in the future or even a completely new map.
Since we were working on a team and I wasn’t the only developer touching the project, I wrapped the whole thing in a clean, component‑based C++ module. We can flip it on or off for debugging, track down issues fast, and keep everyone’s code playing nice together, especially when we were trying to make our weekly test builds.
– Afterward, I made a plugin out of the system as well, feel free to eplore it around and tell me what you think!
it is available on my Github page!
The Mini Map System converts a 3D bounding box into a 2D UI widget that shows the player and opponents’ positions using different icons. This system is made in a way that’s super easy to edit, and when artists want to adjust it, they only need to change the size of the bounding box, instead of messing with numbers or scale values.
The system is also component-based, and I ended up making a plugin out of it later on!
It can even take a picture of your map based on the area covered by the bounding box, and use that to automatically generate a basic texture. This gives artists a quick starting point to work with. In the widget editor, the system also makes sure to always preserve the texture’s aspect ratio, so artists can scale and position the map however they want without distorting it.
This system is mostly implemented using C++ in Unreal Engine, and it fully supports single and multiplayer games.
To give the player a more natural and interesting feel during gameplay, I implemented a physics-based system that dynamically adjusts player speed based on terrain. Players accelerate on slopes and slow down on hills, which adds a layer of realism and strategy to the experience.
To be more accurate, the system gets the surface normal and compares it with the world up direction using the dot product, to calculate how much the player’s speed should increase or decrease. It also uses the cross product to recognize when the player is turning around.