OpenGP needs Windows 10 (version 1809 or later, 64-bit), Linux or macOS 13 on Apple Silicon, and a graphics driver with Vulkan (on macOS, Metal). packaging.md has the details.
- From the installer package: unpack it, open
OpenGP(the launcher) and add your disc image of each game. It builds each game you have an image of, once, and then plays it; see packaging.md. On the command line,opengp-clibuilds them the same way. The games,opengp-mkgp2andopengp-mkgp1, then sit next to OpenGP. - From source: see building.md and game-files.md.
Each game is its own program: opengp-mkgp1 for Mario Kart Arcade GP and opengp-mkgp2 for
Mario Kart Arcade GP 2. In an installer package, OpenGP starts them (Play). They work the same
way, and everything on this page applies to both.
The games behave like the arcade cabinet: insert a coin and press start; in the menus, steer to
choose and step on the gas pedal to decide. Turn on free play in the menu (Esc), or start the
game with --free-play, to play without coins ("Step on gas pedal to start"). The first time a
game starts, a hint says which keys put in a coin, start and open the menu.
opengp-mkgp2 --free-play # in the installer package's folder
build/<preset>/games/mkgp2/opengp-mkgp2 --free-play # in a source buildThe first time, the game asks "Do you have Mario Card?". Choose No, then Yes to make one: the card keeps your progress (Mario Coins, titles, unlocked characters). See Mario Cards.
Esc (or a gamepad's guide button, or Back and Start held together) opens the menu over the game: Resume, Settings, Test menu (the game's own, for operators: it restarts the game) and Quit. The game pauses while the menu is open and gets no controls (turn off Pause while this menu is open in Settings, on the Game page, to keep it running).
The menu works with the keyboard, a gamepad or the mouse: the arrows (or the d-pad and left stick) move, Enter (or A) selects, and Esc (or B) goes back one step, out to the game from the first one; the guide button (or Back + Start) closes the menu from anywhere. In Settings, Page Up and Page Down (or LB and RB) change pages, and Left and Right change the chosen row's value without opening a list. Quitting, the test menu and restoring the default controls ask first.
| Page | Settings |
|---|---|
| Game | The Mario Card you hold; pausing; Discord; free play |
| Video | Full screen, aspect ratio, internal resolution, VSync, even frame pacing |
| Sound | Volume |
| Controls | The keys, buttons and axes for each control; steering speed, dead zones, force feedback |
| Camera | The webcam (or the test pattern) the game takes your photo with |
| Linked cabinets | This cabinet's number and the link over the local network |
| Performance | Live frame times, drops, CPU and GPU usage, audio queue; optional F7 overlay |
The performance display keeps its measurements in memory and does not record a profile.
The settings are the launcher's: the launcher's Settings edit the same file. The camera and the link settings take effect when the game next starts; the page says so while a change waits.
F11 (or Alt+Enter) switches between a window and fullscreen, and F12 saves a screenshot to
user/screenshots/. On a Mac keyboard, hold Fn for the F keys (or turn on "Use F1, F2, etc.
keys as standard function keys" in the keyboard settings), use Option+Return for Alt+Enter, and
P to pause.
P (or the Pause key) pauses the game and shows "Paused"; press it again to carry on. The arcade
games have no pause of their own, so OpenGP freezes the whole machine: the game, its timers and
its sound stop where they are, and carry on as if no time had passed. The menu pauses the game
too, and Pause when the window is unfocused (Game tab) pauses it while you are in another
window. The pause control can be changed like the others (Controls tab, or pause in
controls.toml). The game's clock falls behind by the time spent paused, until it next starts.
Pausing is only for playing solo. Once the game has linked to another cabinet (on this computer or the local network), the other cabinets need it to keep running, so it doesn't pause again until it restarts: the pause control does nothing, and the menu opens over the running game.
The menu's settings are saved in user/settings.toml when the menu closes and when the game quits,
along with the window's size. The file can be edited by hand; command-line options (see
building.md) override it for one run without changing it. An aspect ratio
or camera source OpenGP does not know keeps its setting, and the game says so on screen; other
values of the wrong type are ignored, and numbers out of range are brought into range. A file it
cannot read at all is kept as settings.toml.bad, for you to fix, and the defaults are used. If
a setting, a Mario Card or a screenshot cannot be saved (a folder you cannot write to, a full
disk), the game says so on screen: keep OpenGP in a folder you can write to, not in Program Files.
The aspect ratio is Fit the window by default: the picture takes the window's shape, from 4:3 up to 32:9 (a window narrower than 4:3 gets black bars above and below). 4:3, 16:9, 16:10 and 21:9 can also be chosen; the window then gets bars at the sides if its shape differs.
In widescreen, the races show more on each side. The game's 2D graphics (the speedometer, the map, the menus' panels) stay in the middle at their original shape, full-screen backgrounds and fades are stretched to the edges, and banners that run off the side of the 4:3 screen are continued to the edge of the wide one.
The game draws at its native 640x528 times the internal resolution, and shows 640x480 of it times the same (the menu lists the size shown). Match the window (the default) picks the smallest multiple at least as tall as the window: 2x for 720p, 3x for 1080p, 5x for 4K.
The game runs on its own 60 Hz clock, but it takes more time over some frames than others, and
OpenGP shows each frame as soon as it is drawn. A monitor with a variable refresh rate (FreeSync
or G-Sync) shows each frame as it comes, so frames can be a few milliseconds early or late and
the motion slightly uneven. With Even frame pacing (Video tab, off by default; [video] even_pacing in user/settings.toml), OpenGP holds each frame until the game's next tick, as a
cabinet's display does, so the frames come evenly spaced. It costs about half a frame (8 ms) of
delay, and matters most in fullscreen with FreeSync or G-Sync.
The game's clock is NTSC's 59.94 Hz, a little slower than a 60 Hz display: at real speed one frame in a thousand would be shown twice, a small hitch every 17 seconds. With vsync on, on a display within half a percent of 60 Hz or a multiple of it, OpenGP runs the game 0.1% faster to match it (the console says so); the sound speeds up the same, which no one hears. Linked races follow the leading cabinet instead (see Linked cabinets).
Cards are saved in user/cards/GGPE01/ (GP) and user/cards/GGPE02/ (GP 2), one file per card
(Card 1.bin, ...); Open folder, under the card list, opens that folder. In the menu's Game tab you choose the card you hold: you insert it when the
game asks for your card, and the game takes it back at the end. New card gives you a blank one (answer No to "Do you have Mario
Card?", then buy a card, and it is saved under that name); No card plays without one. A card the
game gives you is yours to hold from then on, so you can keep a card per player. Files can be
renamed (the name is only for the menu) or copied to back them up.
A card saved by an earlier version as user/tricard_GGPE02.bin is moved to Card 1.bin.
The cabinet has a camera (the NamCam2) that takes your photo when you start a game: "Please align your face within the frame", then the item button. The photo is shown on your character in the race. OpenGP can use a webcam for it. In the menu's Game tab, Photos from is:
- Off (the default): the game takes no photos, as a cabinet without its camera.
- Webcam: the webcam chosen below it (Default is the first one). Its picture is cropped to 4:3 around the middle. On macOS, the system asks once whether OpenGP may use the camera (started from Terminal, it asks for Terminal).
- Test pattern: colour bars, for trying it without a webcam.
The camera is set up when the game starts, so a change takes effect when the game restarts. If
there is no webcam, the game runs without its camera and says so on the console. In
user/settings.toml the setting is [camera] source ("off", "webcam" or "test") with
webcam (the webcam's name, "" for the first), and --camera off|webcam|test sets it for one
run.
The webcam is on only while the game uses it: while your photo is taken and on the test menu's camera page (the game's camera check at start-up gets a grey picture, without the webcam). Its light goes off a few seconds later. Its first moment's pictures, dark while it adjusts to the room's light, are left out, and in a dim room the picture is brightened (the cabinet had its own light). If the webcam can't be opened then (another program is using it, say), the photo is grey and the console says why.
Up to four cabinets link, so that up to four players race each other in Versus mode, as in an arcade. Each cabinet is a copy of OpenGP: on the same computer, or on computers on the same local network. Both games link, each with its own kind (GP 2 with GP 2, GP with GP). Run the same version of OpenGP on every cabinet: a cabinet whose version can't link with this one is left out, and the Game tab names it.
Each cabinet needs its own number, 1 to 4: Cabinet number in the menu's Game tab
([link] cabinet in user/settings.toml, or --cabinet N for one run). The game's setting
keeps the number set in the game's test menu, which is 1 unless changed there. The number is read
when the game starts, so a change takes effect when it restarts.
-
On one computer, give each copy its own user folder as well as its own number, since two copies sharing one would overwrite each other's settings and saves (a second copy started on a folder already in use says so and stops):
opengp-mkgp2 --user-dir user2 --cabinet 2. To drive them all at once from one keyboard or gamepad, turn on Use the controls in the background too (Controls tab) in each. -
On a local network, turn on Link over the local network on each computer (
[link] lan = true, or--lan). The cabinets find each other by broadcasting on the network. The first time, Windows asks whether OpenGP may use the network: allow it. macOS asks whether OpenGP, or the Terminal you start it from, may find devices on your local network: allow that too. The link uses ports 28500 to 28539 (TCP and UDP) on each computer;[link] portmoves them (give every cabinet the same).Like the arcade machines, linked cabinets trust each other: there is no password, and another computer on the same network could disrupt a race. Link over networks you trust (your home, a LAN party), not public Wi-Fi. OpenGP only links with computers on a local network (private addresses, or a network this computer is on, such as a Radmin VPN or Hamachi network), never over the internet.
If the cabinets don't find each other ("looking for other cabinets" stays on), check that the firewall lets OpenGP use the network: if you said no to Windows' question, allow
opengp-mkgp2(andopengp-mkgp1) in Windows Security > Firewall & network protection > Allow an app through firewall, for private networks. If Windows calls your home network public, set it to private (Settings > Network & internet > your network > Private network). Wi-Fi with "client isolation" (common on guest networks) keeps computers from seeing each other; use a wired connection or another network.
Start the cabinets, and wait for the later ones to get through their start-up (the attract mode begins): a cabinet links to the others as it starts. Then start a game on one cabinet. The others show "Waiting for entry!", and players who insert a coin there (or press the gas pedal, with free play) before the time runs out join the race. The Game tab says which cabinets this one is linked with, and if another cabinet has the same number.
A linked game can't pause (see Pausing). If a cabinet stops in the middle of a game, the others stop too with "Please call an attendant / Link error occurred", as arcade cabinets do: OpenGP restarts them after a few seconds.
In a GP 2 race the cabinets play in step, the one that started the game leading. Computers'
clocks are never quite the same, so each of the others runs its game a fraction of a percent
faster or slower to keep up with it (games/common/link_pace.h), and the leading cabinet lets a
cabinet that is a frame behind catch up without stopping: before 1.0.3 it froze a frame each time.
While Discord runs on the same computer, your Discord profile shows what you are playing, as Playing OpenGP: the game, and whether you are choosing a character or a course (or having your photo taken, with the camera on); in a race, the cup, the round and the course, your character, your place and the lap, with the time since the race started; then the place you finished, with the cup's trophy if you won. The pictures are the games' own, of the characters and courses. For example:
Yoshi Cup · Round 1: Yoshi Park 1
Mario · 3rd · Lap 2/3
OpenGP talks only to the Discord app on your computer, through its local connection, and sends
nothing anywhere else. If Discord starts after the game, your profile shows it within 15 seconds.
To turn it off, untick Show what you're playing in the menu's Game tab ([discord] rich_presence = false in user/settings.toml). Discord's own Activity Privacy settings can hide
it as well.
| Cabinet | Keyboard | Gamepad |
|---|---|---|
| Steering | Left / Right, A / D | Left stick, d-pad |
| Gas | Up, W | Right trigger |
| Brake | Down, S | Left trigger |
| Item button | Space, J | A (bottom face button), right shoulder |
| VS cancel button | Backspace, K | B (right face button), left shoulder |
| Start | Enter, 1 | Start |
| Coin | 5, C | Back |
| Service / test | F1 / F2 | |
| Menu | Esc | Guide, Back + Start |
| Pause | P, Pause | |
| Fullscreen | F11, Alt+Enter | |
| Screenshot | F12 |
Every connected device works at once. Keys and d-pad steer gradually (a keyboard cannot hold the wheel half-way); sticks and wheels steer directly.
On a cabinet, a choice can't be undone: once the class or the character is chosen, the game goes on to the next screen. In OpenGP, the brake goes back a screen, from character select on: to the class from the character, to the character (or the kart, with a Mario Card) from the cup or course, to the cup from the round, to the round from the items. The photo screen is skipped on the way back. Once you have pressed the gas on a screen, it goes on as usual.
It doesn't work in a linked game, where the cabinets' menus keep in step, and it doesn't change the
class screen (hold the VS cancel button there for Time Attack, as on a cabinet). Turn it off with
Brake goes back (Game tab) or brake_goes_back = false in settings.toml. Only in Mario
Kart Arcade GP 2 for now.
In the menu's Settings, on the Controls page, choose the keyboard, gamepads or wheels and other controllers, then choose Add next to a control and press the key or button (or move the axis, the pedal or the wheel) to add it; Esc cancels. Choose an input (its cross) to remove it. While an input is awaited, a gamepad's buttons go to the control, not to the menu. Changes apply at once and are saved when the menu closes.
They are kept in user/controls.toml, which is written with the defaults the first time the game
runs (with a window). It can also be edited by hand (then restart); delete it to get the defaults
back. An input name OpenGP does not know is left out (the game says which); a file it cannot read
at all is kept as controls.toml.bad and the default controls are used. Each control lists the inputs that drive it:
[keyboard]
gas = ["Up", "W", "Left Shift"] # SDL key names, by their place on a US keyboard
[gamepad]
item = ["a", "x"] # SDL gamepad button names
[joystick] # wheels and pedals SDL does not know as a gamepad
steer = ["axis0"]
gas = ["-axis2"] # a pedal that reads highest when released
brake = ["-axis3"]The file names keys by where they are on a US keyboard, so it works with any layout; the menu
shows them as your keyboard's layout prints them (W on an AZERTY keyboard shows as Z).
Axes: axis2 is the whole axis, axis2+ and axis2- are one half of it, and a leading -
turns it around. The file itself lists every name.
Normally only the active window reads the controls. Use the controls in the background too
(Controls tab; [background] input in the file) makes every OpenGP window read them, active or
not, to drive several copies on one computer at once (see Linked cabinets):
gamepads on every system, and the keyboard on Windows. The windows then all do the same.
A wheel that SDL does not recognise as a gamepad uses the [joystick] bindings; set up its
pedals there (their axis numbers differ between wheels). Wheels with force feedback get the
cabinet's effects: a centering spring, friction, and pushes from bumps and crashes. Gamepads
rumble on bumps and crashes. [force_feedback] in controls.toml sets the strength (0 turns it
off).
Sound plays on the system's default output device. The menu's volume (or --volume PERCENT)
turns it down, and --no-audio turns it off.
The attract mode (the demo that loops before a coin goes in) has sound every time round. GP 2 by itself plays its first time round without sound; OpenGP turns that off. Its volume is the game's own ATTRACT setting, in the test menu's SOUND SETTING (8 of 15 by default). The demo race in each round is silent; whether it is on a cabinet is not known yet.
For tests and screenshots without a player, --input and --input-file play controls by frame
number (see runtime/input/script.h). This goes from start-up to a race and holds the gas:
opengp-mkgp2 --headless --free-play --timeout 120 --screenshot-every 600 \
--input "700 gas=255; +60 gas=255; +60 item; +60 item; +60 item; +60 item; +60 item; +60 item; +60 item; +60 item; 2400-9000 gas=255"Each event is a time (600, +60 after the previous event, or a range 1000-2000) and what to
hold: coin, start, item, cancel, test, service, steer=0..255 (128 is straight
ahead), gas=0..255, brake=0..255. Buttons without a range are held for 10 frames.
The game's clock is the computer's. Once a week, at start-up, the game asks for the card reader to be cleaned ("Please clean the card R/W"): press the cancel button (Backspace) to clean it (OpenGP inserts the cleaning card), or the item button (Space) to skip it until the next start-up.
The game's own settings (the operator's: difficulty, sound in the attract mode, card price,
bookkeeping and so on) are in its test menu. Press F2 (the cabinet's test button) at any
time, or use Test menu in the menu's Game tab, or start with --test-menu: the game restarts
into it (the window closes and opens again, as the cabinet reboots). In the test menu, F1 (the
service button) moves to the next item and F2 chooses it; EXIT restarts the game.
Holding F1 and pressing F2 during the game opens the I/O test instead (wheel and pedal calibration and a switch test); hold F1 and press F2 again to leave it. Leave the calibration page with the wheel or stick centred and the pedals released: the game takes the centre from there. If the steering pulls to one side afterwards, open the page again and leave it centred.
If the game's picture stops for 10 seconds while it is not paused, OpenGP writes where the game's
threads are to user/hang-report.txt (and the console), with the version, the game and the time.
If it crashes, it writes what went wrong to user/crash-report.txt and says so; on Windows a
message names the file. Please attach that file to a
bug report: it shows what the game was
doing. Never attach files from the games.
If the game cannot start (no disc image, no graphics driver with Vulkan or Metal), it says why on the console and, when started for a window, in a message.