シングルプレイヤーとマルチプレイヤーのロジック
このページではGame Maker のロジックシステム、シングルプレイヤーとマルチプレイヤーでのロジックシステムの使用方法を解説します。
最終更新
役に立ちましたか?
このページではGame Maker のロジックシステム、シングルプレイヤーとマルチプレイヤーでのロジックシステムの使用方法を解説します。
最終更新
役に立ちましたか?
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:
Logic can be a simple or complex chains of events, and it can be linear or branching with options.
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.
In SIn Si, [MP] logic works like [SP] logic. Gameplay design is more simple.
In , there are communication and bandwidth limitations to consider when designing gameplay.
are sent between and within systems to trigger gameplay logic.
There are many simple ways to send a message and trigger something to happen. Messages can also be directed more specifically using and .
Add a behaviour to a logic actor or object and set desired parameters.
Add a component and choose what to detect and detection range (avatars, tags, or a specific actor).
To trigger an asset's animation and send a message when an avatar is detected or a message is received, use behaviour.
The component can also detect and trigger a message when any tag enters or exits its volume.
Send Message - Add a component to the object that will be destroyed. Set a Message sent on death. You can trigger this with an Instant death message.
Drop (spawn) object - Add a component to the object that will be destroyed. Choose Behavior (default asset settings) or (custom settings for one or more objects to spawn). Select the asset or preset to spawn.
Other objects nearby with a component can detect a tag that is included in your spawned object.
A spawned object, such as a , could instantly send a message.
Add a component to an object and set a message to send.
Create an . In the Action After Completion dropdown, choose Send Message. Use the dropdown below this to select an existing message or create a new one. Any object in your Experience will be able to receive this message.
Objective 1: Find the key and unlock the break room in 30 seconds
Game Ruleset: Countdown (triggered with Objective 1)
[MP] Objects: Pickable key, Door
Objective 2: Get Seb a drink from the vending machine room
Ruleset: (global or local variable for money)
[SP] Objects: Vending machine, Seb NPC, coin
Collect enough coin objects (money variable in the Ruleset) to buy a drink.
Multiplayer Simulator
Use Objectives for individual player goals. Use for collective goals.
See below for more details on additional design considerations.
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 (triggered with Objective 1)
[MP] Objects: Pickable key, Door
Objective 2: Get Seb a drink from the machine
Ruleset: (Local variable - track each player's money)
[SP] Objects: Vending machine, Seb NPC; [MP] Object: Coin
Each player collects enough coin objects (money variable in the Ruleset) to buy a drink (all coins must be [MP] and collectable by each player).
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
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.
(QUESTS)
& are logic applied to voxel objects placed in the game world.