Circuit racer arcade
For creatorsAdd-on 2.2.2+
You give a race the arcade cabinet: a title screen with the game playing itself behind it, insert coin, a car and a track to choose, an arcade clock, CONTINUE?, high scores with initials, driver’s gauges built in Blender, and music.
▶ Play the circuit racer arcade — 5 or C insert a coin · Enter start · arrow keys choose · W / S throttle and brake · A / D steer · Space handbrake · I engine on or off · Backspace back on the track · Esc pause · mouse wheel: how far W presses the pedal. On a gamepad, Select is the coin, Start starts and pauses, A chooses and B goes back.
The title comes up over the game playing itself. Insert a coin, press START, pick one of four cars and one of three tracks: Kestrel Park, and two real ones from OpenStreetMap. The Pee Dee Oval is a real oval in South Carolina, flat here, two laps. Charleston Streets runs 825 m of real streets beside Marion Square, with the real buildings beside it at their mapped heights. You start fourth. Finish third or better against the arcade clock, or it is CONTINUE?. A good time puts your initials on that track’s board.
This builds on tutorial 30, the circuit racer, which stays as it is. Start from a scene with its race line, barriers, pit box, player’s car and AI racers.
1. The cabinet
Section titled “1. The cabinet”-
Open Properties ▸ World ▸ Simulacrum ▸ Arcade Front End (it starts closed) and press Make Arcade Front End. Then open Edit ▸ Adjust Last Operation and set:
- Title and Subtitle: the words on the title screen.
- Steps: the choices the player makes, in order. The default,
car=SELECT CAR|track=SELECT TRACK, asks for a car, then a track. - Continue (s): how long CONTINUE? counts down (9).
- Free play: on, and START needs no coin.
- Scores: A time (lower is better) for a race.
Afterwards the Arcade Front End panel shows the cabinet’s settings, so you can change them there.
-
Select your four cars and press Make Front Option in the Arcade Front End panel (or choose Make ▸ Make Front Option in Properties ▸ Object ▸ Simulacrum). In Edit ▸ Adjust Last Operation, set Step to Car. Each car gets bars for SPEED, ACCEL, GRIP and WEIGHT, read from its handling row: the numbers it really drives by.
-
Select your race lines and press Make Front Option again, with Step set to Track. Each track is shown as its map, with its length. The panel’s Choices box lists each step’s options.
-
Select each race line and, in the Racing panel, set the arcade clock: Time on the clock (s)
35, Extended a gate (s)4and Place to qualify3. A clean lap gains a few seconds; a tangle costs them.
Any game can take the cabinet, not only a race. For your own game’s rules, see game logic.
2. More than one track
Section titled “2. More than one track”Put each track in the same scene, far apart. Every object that belongs to one track should show only while that track is chosen.
-
Select the objects of one track’s scenery (its buildings, its walls), then select its race line last so it is the active object.
-
Press Make Track Scenery in the Racing panel (or choose Make ▸ Make Track Scenery). Each object is tagged with the race line’s name.
-
Do the same for every track. Objects without the tag always show.
In a scene with the cabinet, only the chosen track’s scenery shows. While SELECT TRACK looks at a track, that track’s scenery shows under the camera. A scene without the cabinet shows everything.
3. The driver’s gauges
Section titled “3. The driver’s gauges”The gauges are geometry you can see and edit in Blender: a tachometer and a speedometer with faces, ticks, numbers and needles, the gear and speed in large figures, a shift light, and bars for fuel, engine and body.
-
Put the 3D cursor where you want the cluster, then choose Add ▸ Simulacrum ▸ Vehicles ▸ Dash Cluster (Shift+A in the 3D View).
-
In its operator panel, set On the screen to Bottom right and Size to how much of the screen’s height it takes (0.34 by default). The cluster is drawn over the view and hides while a menu is up.
-
For a dash inside a car instead, set On the screen to In the world (a dash) and parent the cluster to the car’s body. It shows that car’s values, and a headset sees it in the cockpit.
-
For one dial on its own, choose Add ▸ Simulacrum ▸ Vehicles ▸ Gauge and choose what it Shows. A gauge’s settings are in Properties ▸ Object ▸ Simulacrum ▸ Gauges & Sound.
Re-colour the parts, re-shape them or move a needle’s pivot: the tags are what count.
| Tag | Values | What it does |
|---|---|---|
gauge |
car.speed · car.mph · car.rpm · car.rpmFrac · car.gear · car.fuel · car.temp · car.engine · car.body · car.boost · race.time · race.pos · race.lap · race.lapTime |
The value it shows, by name |
gauge.display |
needle · bar · text · light |
A needle turns, a bar grows along its x, a text plane shows the value, a light comes on |
gauge.min · gauge.max |
numbers | The values at the needle’s start and end |
gauge.from · gauge.to |
degrees | Where the needle starts and ends |
hud.screen |
bottom-right · bottom-left · bottom · top-right · top-left · top |
On the Empty above a cluster: draw it over the view at that corner |
hud.size |
a share of the screen’s height | How big the cluster is drawn |
4. The music
Section titled “4. The music”-
Add a Speaker (Add ▸ Speaker) and give it a sound in its Speaker properties. It can stand anywhere: the music is not positional.
-
With the speaker selected, open Properties ▸ Object ▸ Simulacrum ▸ Gauges & Sound and press Make Music (it is also in the Make menu, under World). In its dialog, set When:
- Title: plays in the demo, the title and the choices.
- Race: plays from the start of a race. With several race pieces, each race gets the next one (Order sets their order).
- Over: a short sting at TIME UP, a wreck or a lost race.
- Done: a short sting for a qualifying finish.
- Always: the whole time.
-
Repeat for each piece. The sound is packed into the .blend, and Build writes it into the cartridge.
Pieces loop unless they are stings. The pause turns the race music down to a quarter, and CONTINUE picks the race track up where it stopped. A browser plays nothing before the first key, click or touch; the piece wanted then starts. Add ?music=0 to the address to silence it.
5. Play it
Section titled “5. Play it”Press Play in the 3D View’s header. What the player sees:
- The title. The title, then each track’s best times, over the game playing itself. The AI drives your car round one track, then the next.
- The coin. 5 or C is a coin; START spends one. With Free play, START is enough.
- SELECT. Left and right go through each step’s options. On a car, the camera circles it on the grid. On a track, the camera flies high over it.
- The arcade clock. TIME UP, a wrecked car (exploded, seized or out of fuel) or a finish behind third brings CONTINUE?: a 9-second countdown on a paused world. A coin and START put you back where you were. Let it run out: GAME OVER, and back to the title.
- PAUSE. Esc stops the world, the cars and the sound: CONTINUE, RESTART or QUIT.
- INITIALS. A qualifying time that makes that track’s top ten asks for your initials: type them, or use the arrow keys. The boards are saved in your browser.
A good lap passes the rivals. They do not steer into a car alongside. They follow a car ahead at a gap and pull out on the side with room, and they take an inside pass at that lane’s slower speed.
Settings
Section titled “Settings”| Tag | Values | What it does |
|---|---|---|
front.on |
1 |
The scene has the cabinet (Make Arcade Front End) |
front.title · front.subtitle |
text | The title screen’s words |
front.continue |
seconds | How long CONTINUE? counts down |
front.freeplay |
1 |
No coins needed |
front.table |
a number | How many places each board keeps (10) |
front.option |
a step’s id, such as car or track |
This object is a choice in that step (Make Front Option) |
race.time |
seconds | Time on the clock at GO (0: no clock) |
race.extend |
seconds | Time added at each gate |
race.qualify |
a place | A finish behind it is a lost race |
race.scenery |
a race line’s name | Shown only while that track is chosen |
music |
title · race · over · done · always |
When a speaker’s sound plays |
For a title picture on the loading screen, see loading splash and textures.