Local multiplayer
How to make, with the editor 0.4.0, a game for several people on the same computer, turn it on in the Game card, test it with 2, 3 or 4 players on a split screen, run it past the bot and play it in the launcher.
DescribesEditor 0.4.0 For creating without programming
On this page
Local multiplayer means several people on the same computer: one screen, one keyboard and, if there are any, gamepads. Editor 0.4.0 lets you create these games, test them with up to four players and export them.
Creating a game for several players#
- On the home screen, press New game.
- At the top, under How it is programmed, leave Rules or code, which comes selected.
- Under Players, pick Local multiplayer.
- The template becomes Coin rush for several players.
- Type the name and press Create and open.
The dialog describes the template this way: "The toolkit example: 1 to 4 people on one computer with split screen. First to collect the coins wins. Hand-written script; test it from the Game card, under "Players"."
It is a game made with code: its logic is in the script, not in the Rules panel. You can change the arena, move the coins and the obstacles and add pieces as in any project.
With Blocks selected under How it is programmed, Local multiplayer is disabled in the dialog, with the label on the Game card, after creating: in a Blocks project you turn it on in the Game card, as the next section explains.
Turning it on in any project#
You do not need to start from that template. Any project becomes multiplayer from its Game card.
- Open the Game card tab.
- Scroll down to Players.
- Check Local multiplayer (same computer).
- Adjust the fields.
| Field | What it is |
|---|---|
| Minimum and Maximum | How many people a match takes. |
| Local multiplayer (same computer) | Turns on multiplayer on the same computer. |
| People | Up to how many play together on one computer: up to 2, up to 3 or up to 4. |
| Screen | Split: one camera per person or Shared: one camera for everyone. |
The Game card sums it up: "On one computer each person gets a camera and controls: two share the keyboard and the rest use gamepads."
Split or shared screen#
| Screen | How it looks | When it fits |
|---|---|---|
| Split | The screen is divided and each person has their own camera. | Big worlds, where each one goes their own way. |
| Shared | A single camera for everyone. | Small arenas that fit entirely on screen. |
Testing multiplayer#
With local multiplayer on, the Game card shows Test multiplayer in the viewport: with one button per number: 2 players, 3 players and 4 players, up to the maximum under People.
A click opens the match in the viewport, with the game's screen just as it will look.
How the controls are shared out#
| Player | What they play with |
|---|---|
| Player 1 | W A S D, Space, E and Q. |
| Player 2 | The arrow keys, right Shift, Enter and right Ctrl. |
| Players 3 and 4 | One gamepad each. |
Two people share the keyboard. With two gamepads connected, they use one each. The third and fourth players need a gamepad: there are no keys for them.
If a gamepad is missing, the match runs anyway and the game says so in that player's frame. It lets you check that the screen is divided well even if you do not have four gamepads at hand.
From the Play dropdown#
The same options are in the Play dropdown, under Test multiplayer (same computer).
| Option | What the menu says |
|---|---|
| Play with 2 players | Game screen; two share the keyboard. |
| Play with 3 players | Player 3 needs a gamepad. |
| Play with 4 players | Players 3 and 4 need a gamepad. |
In Full mode it is also in Run > Test multiplayer. To go back to editing, Stop and back to editing or Esc, as in any match: see Playing inside the editor.
The bot test with everyone#
In a game with local multiplayer, Test with bot runs seven matches instead of six:
- The usual six, single player: three difficulties times two seeds.
- One more with all the players the game declares. In the template it appears as "4 players · Normal · seed 1".
In the seventh, all the players are bots and follow the same route. It checks that the game does not break with the room full and that the match ends.
As in every game, the test has to be passed in order to export: see Test bot.
Exporting and playing it in the launcher#
A multiplayer game is exported like any other: Export creates the .ggx. The steps are in Game card, export and share.
In the launcher:
- Import the
.ggx: see Import a .ggx. - The game's card shows On this computer, with how many people and which screen.
- On the game's start screen, pick how many play under Players on this device: 1, 2, 3 or 4.
- Press Play.
The launcher shares out the controls the same way the editor does: with gamepads, one per person; without gamepads, two people share the keyboard. It takes up to four gamepads. More in Playing.
Online multiplayer#
It is not available. You will see it in three places, always disabled and with "coming soon":
| Where | How it appears |
|---|---|
| New game | The Online multiplayer option, which cannot be picked. |
| Game card | The Online multiplayer box, which cannot be changed. |
| The launcher | The card of a game that declares it says Online: "Not available yet: online rooms are not open". |
The Coin rush for several players template already declares it in its manifest, and the Game card says so: "This game already declares it (up to 8). The editor keeps it as is, but cannot test or publish it yet." You do not have to do anything about that.
How multiplayer is declared in the game's file is in The manifest. The status of what is coming is in the Roadmap.
Next#
- Playing inside the editor: the Playing strip and the Console.
- Game card, export and share: the rest of the Game card.
- Playing: the match, from the player's side.