β¦οΈBuild Singleplayer & Multiplayer Logic
Use this one page guide to learn about Game Maker's logic systems and how they work together for single or multiplayer gameplay. Follow links as needed for more details in our documentation.
Last updated
Use this one page guide to learn about Game Maker's logic systems and how they work together for single or multiplayer gameplay. Follow links as needed for more details in our documentation.
Last updated
Copyright Β© 2012- 2023 The Sandbox. All Rights Reserved.
Rules are gameplay mechanics that can be triggered and completed repeatedly and use variables for all players or individual players.
Example: Points, Timers, Shops, and more
Quests are an individual player's progress in a singleplayer or multiplayer Experience's flow, which can be completed only one time.
Example: A quest to collect coins
OBJECT LOGIC
Example (image above):
Light, NFT Sensor, NFT Image Display, Play Sound & Trigger Volume
Player settings customize avatars, controls, basic features, and interactions in the world.
Example:
The player's avatar may be allowed to swim, may receive damage from certain blocks, etc.
A split between [SP] and [MP] logic was introduced with Game Maker 0.8.
This made it possible for players to experience some logic independently and other logic simultaneously with all other players. Synchronised logic includes position and state of objects, environment, global mechanics, etc.
An object may have one of the following logic setups:
No logic applied
Only [SP] logic "Client Only" - for each player to experience at different times Example: A player explores gameplay at their own pace and reads Quest dialogue when ready
Only [MP] logic "Networked" - for all players to experience at the same time Example: A door opening or a platform moving is synchronised for all players
In Singleplayer Experiences, [MP] logic works like [SP] logic. Gameplay design is more simple.
In Multiplayer Experiences, there are communication and bandwidth limitations to consider when designing gameplay.
Logic can be a simple or complex chains of events, and it can be linear or branching with options.
There are many simple ways to send a message and trigger something to happen. Messages can also be directed more specifically using filters and tags.
Send a message on start of the Experience or when triggered, once or repeatedly.
Example:
Add a Message Broadcaster behaviour to a logic actor or object and set desired parameters.
Use a message broadcaster as a middle step if two logic elements will not send or receive messages as quickly, consistently, or specifically as you want.
There are two layers of logic that do not communicate with each other, but must be designed to feel seamlessly integrated for players.
Toggle the Multiplayer Simulator at the top right in the Editor to test how the Experience will behave if published as singleplayer or multiplayer.
(QUESTS)
& are logic applied to voxel objects placed in the game world.
Messages are sent between and within systems to trigger gameplay logic.
Objective 1: Find the key and unlock the break room in 30 seconds
Game Ruleset: Countdown timer (triggered with Objective 1)
[MP] Objects: Pickable key, Door
Objective 2: Get Seb a drink from the vending machine room
Ruleset: Shop (global or local variable for money)
[SP] Objects: Vending machine, Seb NPC, coin
Multiplayer Simulator
Objective 1 (auto trigger at start): Race to unlock the break room Gameplay: All players see the single player objective and rush to find the key
Ruleset: Countdown timer (triggered with Objective 1)
[MP] Objects: Pickable key, Door
Objective 2: Get Seb a drink from the machine Gameplay: All players explore and find Seb on their own time, triggering logic only they can see.
Ruleset: Shop (Local variable - track each player's money)
[SP] Objects: Vending machine, Seb NPC; [MP] Object: Coin