Derby Kings started out as Horse Racing Elite, a browser horse race in my Next.js arcade. This version is a complete rebuild in Unity 6, presented like a premium sports broadcast. There are glass panels, a LIVE bug, a race tracker, lower thirds and live commentary over a realistic course with real skies and turf, in day, golden hour, dusk or floodlit night.
A race day is a session of 5 to 20 races. Each race card draws a track, a distance, the going and six runners, and every runner has a running style, recent form, a rating and a price. You can back a horse to WIN, PLACE or SHOW, or name the first two in a FORECAST, and a camera director films the race. In the arcade, every paid race is drawn and settled by the game provider, and in Arenas up to eight players bet in the same 30-second window and watch the same race.
Broadcast, not cartoon
It looks and sounds like race day on TV, with a tracker, lower thirds, live calls and a director cutting between cameras.
A film of a decided result
The finishing order is drawn first, and the 3D race is filmed from it, so no frame rate or physics hiccup can change who wins.
One rulebook, two places
The same C# race rules run the offline demo on your phone and the paid races on the game provider.
02Screenshots
These screenshots were captured straight from the game. Tap any of them to see it bigger.
Title screen - the 3D logo over the stallsRace day - the next race and the sessionThe race card and bet slipAnd they’re off - the chase cameraThe finish camera at the lineThe official result, with distances and pricesCreating an arena for friends
03Core Loop
1
Read the card
Open the next race and check the track, the going, each horse’s form and rating, and the price.
2
Fill the slip
Add up to four bets, one per market (WIN, PLACE, SHOW or FORECAST), and set the stake with the chips.
3
Watch the race
Six runners break from the stalls while the director cuts between cameras. SKIP takes you straight to the last furlong.
4
Collect
The official result shows the distances (a nose, a head, lengths) and the prices, and your winning bets are paid out.
04Key Features
Camera director
Gate, chase, tracking, aerial, head-on and finish shots are cut automatically, or you can lock the camera you like.
Race physics
A smoothed pace model with a break from the stalls. Front-runners, stalkers and closers hold their lines and give way, the gallop matches the stride, and close finishes go to a photo.
Four kinds of light
The same course under a bright day, golden hour, dusk or floodlit night, with skies and turf from Poly Haven.
Four markets
WIN, PLACE (top two), SHOW (top three) and FORECAST (the first two in order), with up to four bets on one slip.
Arenas
Rooms for 2 to 8 players with an invite code and an optional password, a synced 30-second betting window, a leaderboard and a daily bounty for three wins.
Sealed demo wallet
The play balance and the next seed are sealed on the device, so they can’t be edited, and play credits only top up once they run out.
05What I Built
I made this game on my own, so I handled the design, the code, the art pipeline, the audio and the release.
I designed the race card, the four markets, the pricing and how Arenas work.
I programmed the gameplay and every screen in C#, building the UI in code with UI Toolkit.
I wrote the race rules as a standalone C# package that the game provider also compiles and runs.
I built the Blender Python pipeline that makes the horse and its rig, the jockey, the course kit, the 3D logo and the rendered icons.
I also made the broadcast skin and the audio mix in Python, the device screenshot tests and the race simulator that checks the maths.
06Under the Hood
Rules outside the engine
The race card, the race engine, the classic race, the race film and the random numbers live in Shared/RacingCore, a pure C# package with no Unity in it. The client runs it for the offline demo, and the provider runs the same files as the authority for paid races.
The race is a film
The provider draws the finishing order in proportion to each runner’s chance and settles the bet. RaceFilm then turns that order into a race to watch, and a test that runs 20,000 races checks that the film always keeps the drawn order.
Priced at 95%, then checked
Every price returns 95% (a 5% margin), from 1.05 up to 500. A .NET simulator checks every price on 20,000 cards, checks the finishing draw against the computed chances over 2,000,000 draws, and soaks the engine with 5,000,000 random bets.
Arenas over SignalR
A small SignalR JSON hub client runs over the build’s own WebSocket transport. In an arena, the provider draws each race’s seed and runs the original six-horse race, and every client films the same race from that seed.
07Art & Audio Pipeline
A horse built in Blender
build_horse.py takes Quaternius’ CC0 horse, rigs it for a stride-matched gallop and adds the jockey in silks and the numbered saddle cloth.
The course kit
build_course.py makes the track, rails, stands and finish post, dressed with Kenney trees and Poly Haven skies and turf. The logo, a gold shield with a racehorse at full stretch and a jewelled crown, is modelled in Blender too.
Broadcast skin & sound
The glass panels, scrims and racing icons are drawn in Python, in Chakra Petch and Barlow. The music is Rossini’s William Tell finale and Kevin MacLeod tracks, under real gallop and crowd recordings, and the bugle call and the photo-finish shutter are synthesised.
08Challenges & Solutions
ProblemA race decided by the 3D physics would play out differently on a slow phone than on a fast laptop.
SolutionThe result is drawn first and the race is only a film of it. The film test makes sure the horses always cross the line in the drawn order, whatever the frame rate.
ProblemArenas had to behave exactly like the rooms in the original web game, which players already knew.
SolutionI ported the original six-horse race to C# and compared its finishing orders against the old JavaScript with a script, and I carried over the room rules: the skip penalty, the early-exit fine, end votes and end requests.
ProblemA portrait broadcast UI has to fit tall phones, flip and fold covers, and tablets.
SolutionA PlayMode test plays through the title, home, race card, race, result, Arenas and every menu on 11 screen shapes and saves each screen, so layout problems show up as pictures.
Treating the 3D race as a film of a known result made the whole game simpler to test and impossible to cheat.
Porting an old game’s rules is only finished when you can prove the new one gives the same answers.
A broadcast look comes from lots of small things on screen at once: a tracker, lower thirds, live calls and well-timed camera cuts.
Credits. The horse is Quaternius’ (CC0), the trees are Kenney’s (CC0), and the skies and turf come from Poly Haven (CC0). The music is Rossini (public domain) and Kevin MacLeod (CC BY 4.0), the sounds come from BigSoundBank, OpenGameArt and Kenney, and the fonts are Barlow and Chakra Petch (OFL). The logo, jockey, course and interface were made for the game, and everything is credited on the in-game About screen.