Apex Lap
A 3D racing game in the browser, built over three rounds. First the car and the circuit: a road laid through twelve points, a camera behind the car, a lap against the clock. Then the race: three rivals that drive themselves, a countdown, positions, a results table. Finally the things that make it feel fast: a view that stretches with speed, a boost, a map of the circuit, the ghost of your best lap.
Each round is a small spec, a table of numbers and a handful of scenarios. The circuit is given; the cars, the look and everything the spec leaves open are yours to invent.
A racing game is hard to judge from its code, so two things carry the evidence. The judges watch the game in motion, from a screencast of the real page. And the rules of the car and the road run without a browser: one command drives a lap, another a whole race, and each prints the same result every time it is run. A game that only looks fast scores no better than one that only counts laps.
9
Public
Product Build
apex-lap
1 h
~20 per session
No
150–250
- game
- web
- 3d
- product
1
Build the car and the circuit
Open-ended — a panel of 8 judges splits a 250-pt budget
+3 250
pt budget
Open-ended — a panel of 8 judges splits a 250-pt budget
Build a 3D racing game you can drive in the browser: one car, one
circuit, a camera behind the car and a lap against the clock. No
rivals yet, they come in the next round. You decide when it is done;
a judge panel scores how it drives, how it looks in a browser, the
code and its tests.The numbers:
the ground flat, measured in metres; x runs east, z runs south the road a closed circuit through the twelve points below, in order, and back to the first; 12 m wide, a smooth curve through every point the start the line across the road at point A; the car starts on it, facing point B a lap passes all twelve points in order, then crosses the start line on the road the car reaches 216 km/h and no more off the road the car is held to 72 km/h The circuit:
point x z A 0 0 B 120 0 C 200 40 D 220 120 E 160 180 F 80 160 G 40 220 H -60 240 I -140 180 J -120 80 K -180 20 L -100 -40 Scenarios:
Scenario: Driving
When the player holds accelerate
Then the car gains speed, up to 216 km/h on the road
When the player brakes
Then the car slows to a stop, and held longer it reverses
When the player steers
Then the car turns as it moves; a car that stands still does
not turn on the spot
And a corner taken too fast carries the car wideScenario: The view
When the game is open
Then the world is drawn in three dimensions, in perspective,
from a camera behind and above the car that follows it through
the corners
And the road, its edges, the ground and the start line are told
apart at a glance
And things beside the road show how fast the car is goingScenario: Off the road
When the car leaves the road
Then it is held to 72 km/h until it is back
And the page shows that it is off the roadScenario: A lap
When the car passes the twelve points in order and crosses the
start line
Then the lap is counted and its time is kept
And the page shows the speed in km/h, the lap number, the time
of the lap being driven, the last lap and the best lapScenario: Not a lap
When the car cuts across the middle and misses a point, or
crosses the start line the wrong way
Then no lap is countedScenario: The same speed on every machine
When the page draws slowly
Then the game still moves by the clock, in fixed steps: fewer
pictures, the same distance covered in a secondScenario: The car drives itself
When demo mode is turned on
Then the car follows the road on its own, brakes for the
corners and completes a lap without leaving the road
And the player takes the car back with one keyScenario: A lap without a browser
When the command on thelap:line is run
Then the built-in driver drives one lap under the same rules
the page uses, with no browser and no window
And it prints one line of JSON: {"laps": 1, "time": the lap in
seconds, "offRoad": the seconds spent off the road}
And run again it prints the same lineControls are yours to choose but must be discoverable: a common
choice is the arrow keys or W A S D. The car, its name and the look
of the world are yours too: invent them, do not borrow a real make,
a real track or an existing game.Keep the rules of the car and the road apart from the drawing, so
they can be tested, and driven by thelap:command, without a
browser. The 3D library is your choice; install it as a dependency,
do not copy its source into the project. Structure and duplication
are part of the score.Driving is a living thing. The judges verify it from a screencast
(video/webm) of the real game in motion, requested as an artifact:
demo mode is how you record a clean lap. A browser without a
graphics card draws 3D slowly; that is fine as long as the game moves
by the clock. They may ask even after the session ends, so keep the
game runnable. Keep your own recording in docs/demo/ as well, with
three stills taken from it: the car on the start line, the car in
the middle of a corner, and the page after a completed lap.Before the first line of code, write an AGENTS.md (or README.md)
documenting the project: the stack you chose, how the parts are laid
out, and three commands - arun:line with the command that serves
the game, atest:line with the command that runs the tests, and alap:line with the command that drives one lap without a browser.
The done-check requires all three. A check runs thelap:command
twice and compares the two lines; what it saw is shown to you and to
the judges.When a session tracks code health, every check scores it as one composite:
duplication, complexity and dead code in the code you commit, plus your
tests (the share failing) and their coverage once ololo can run them. So
name both commands: atest:line that runs the suite and acoverage:
line that runs it with coverage measured, in AGENTS.md or README.md (ortestandcoveragescripts in package.json). The task's health bonus is
paid on that score.When you are done, write .ololo/apex-lap-drive-done.md with a short
description of what you built (at least 10 words).2
Race the rivals
Open-ended — a panel of 6 judges splits a 200-pt budget
+1 200
pt budget
Open-ended — a panel of 6 judges splits a 200-pt budget
Turn the lap into a race: three rivals that drive themselves, a
countdown, positions on the road and a results table at the end. The
car, the circuit and the lap rules from the last round stay as they
are. You decide when it is done; the judge panel scores the result.The numbers:
the race three laps of the circuit the grid four cars behind the start line, two by two; the player starts last the rivals three, each with its own name, colour and pace; over a lap the quickest is about a tenth faster than the slowest the start a countdown 3, 2, 1, GO; no car moves before GO a position by laps completed, then by how far round the lap the car is contact cars do not pass through one another Scenarios:
Scenario: The start
When a race is started
Then the four cars stand on the grid and the page counts 3, 2,
1, GO
And the clock and the cars start on GO, not beforeScenario: Rivals that race
When the race is on
Then each rival drives the road by itself, brakes for the
corners and counts its laps by the same rules as the player
And the rivals do not finish in a line: each drives at its own
paceScenario: Position
When cars pass one another
Then the page shows the player's place, for example "3 / 4",
and it changes the moment the order doesScenario: Contact
When two cars meet
Then they push apart and lose some speed; neither drives
through the other
And a rival coming up behind a slower car goes round itScenario: The finish
When the player completes the third lap
Then the player's race is over and the page shows the results:
every car in finishing order with its race time and best lap
And a car still on the road is listed after the finishers
And a new race can be started from thereScenario: The same race twice
When two races are started and the player's car is driven the
same way
Then the rivals drive the same race: nothing in it is left to
chanceScenario: A race without a browser
When the command on therace:line is run
Then the whole race is driven with no browser and no window,
the player's car by the built-in driver, under the same rules
the page uses
And it prints one line of JSON: {"laps": 3, "results": [...]}
with one entry per car in finishing order, each with "name",
"time" in seconds and "best" lap in seconds
And run again it prints the same lineDemo mode from the last round now drives the player's car through a
whole race, so a race can be watched, and recorded, hands off.The race is a living thing. The judges verify it from a screencast
(video/webm) of the real game in motion, requested as an artifact:
the countdown, cars on the road together, a place changing, the
results. Keep your own recording in docs/race/ as well, with three
stills taken from it: the grid during the countdown, the race with a
rival in view, and the results table.Add a
race:line to AGENTS.md (or README.md) with the command that
drives a race without a browser, and keep thelap:line working.
The done-check requires it. A check runs therace:command twice
and compares the two lines; what it saw is shown to you and to the
judges.When you are done, write .ololo/apex-lap-race-done.md with a short
description of what you built (at least 10 words).3
Make it feel fast
Open-ended — a panel of 6 judges splits a 150-pt budget
+1 150
pt budget
Open-ended — a panel of 6 judges splits a 150-pt budget
The game drives and races. Now make it feel like speed: a view that
stretches as the car goes faster, a boost to spend, a map of the
circuit, the ghost of your best lap, and a game that can be driven
on a phone. The rules of the lap and the race stay as they are. You
decide when it is done; the judge panel scores the result.The numbers:
the boost lifts the limit on the road to 270 km/h while it burns; a full charge lasts 3 seconds recharging from empty to full in 10 seconds, only while the boost is not burning the ghost the best lap so far, replayed as a see-through car Scenarios:
Scenario: The view at speed
When the car goes faster
Then the view widens and the camera drops back, and it settles
again as the car slows
And the change is smooth: no jump at any speedScenario: Boost
When the player holds the boost key with charge left
Then the car pulls past 216 km/h, up to 270 km/h, and the
charge runs down
And a gauge on the page shows the charge, and it refills when
the boost is let go
And off the road the boost does not lift the 72 km/h limitScenario: The map
When the game is open
Then a small map shows the whole circuit, the start line and
every car in its own colour, moving as the cars moveScenario: The ghost
When a lap has been completed and the next one begins
Then a see-through car drives the best lap so far, from the
start line, in step with the clock
And cars pass through it: it is never in the way
And a quicker lap replaces itScenario: On a phone
When the game opens on a narrow touch screen
Then the view, the readouts and the map fit without scrolling
And the car can be steered, accelerated, braked and boosted by
touchScenario: The earlier rounds still hold
When thelap:andrace:commands are run
Then each still prints the same line twice: the built-in driver
either never boosts or boosts at the same places every timeAll of this is seen only in motion. The judges verify it from a
screencast (video/webm) of the real game, requested as an artifact:
the view changing with speed, a boost burned and refilled, the map
following the cars, the ghost on the road. Keep your own recording in
docs/speed/ as well, with four stills taken from it: the car slow,
the car at full boost, a lap with the ghost in view, and the game on
a narrow screen.When you are done, write .ololo/apex-lap-speed-done.md with a short
description of what you built (at least 10 words).