🟦Logic & Gameplay
To make high quality content, all creators need to know what is possible in The Sandbox metaverse, and level designers need technical resources to carry it out. Find these resources here.
NEW RESOURCE

Begin Game Maker
Logic Systems & Uses
Logic in our no-code Game Maker is all about creating a system of communication that provides interactive possibilities so players can choose a flow of cause & effect.
Logic can be linear with a single path of events for players or branching with many possibilities. It can range from simple to a complex chain of events depending on the desired gameplay.
Object Logic
About Object Logic
Behaviours govern the core actions of game objects.
Components add characteristics to deepen an object's interactive potential.
Behaviours and components send and receive Messages to trigger logic with other objects, Quests, and Game Rules.
Tags are identity labels for objects used to:
control where messages are sent to trigger logic
specify objects that may be detected
An object may have:
One Behaviour
Many Components
Multiple Tags
Make Any Asset Interactive
Assets have flexible utility depending on the interactive logic set up via Game Maker. These are the objects that populate your Experience.
You can find NFT assets to purchase in the Marketplace, or you can create custom assets with VoxEdit. Both types can be used in your own Experiences.
Example:
Display Videos & 2D Image NFTs
Uploading custom content for use with Video and Audio Streaming behaviours is limited to The Sandbox and select partners. These features are in development for public use.*
Frame Assets assets made in VoxEdit can be used for displaying:
2D image NFTs (JPEG, PNG, GIF, and WEBP on Ethereum and Polygon blockchains) using the NFT Image Display component
premade images provided by The Sandbox with the Image Display component
videos (using video streaming*)
Open NFT Marketplace Information
The NFT Details Display component can be can be set to open for any NFT made for The Sandbox in VoxEdit or any external NFT displayed in a frame asset. Visitors can be redirected to The Sandbox or OpenSea marketplaces via browser.
Example projects using NFT information:
Build a virtual shop for players to buy your NFTs
Showcase your NFT collections in a gallery, virtual home setting, etc.


Global Logic
About Global Logic
Quests Objectives inform and guide players through your game's flow using an attractive user interface (for single and multiplayer games).
Player Settings Spawn Point behaviour allows you to choose a custom avatar, set starter equipment, and apply some components to players (via Avatar's Feature).
Global Settings
The Gameplay menu includes settings that may affect all players, such as:
Game Rules - for global, player, and team mechanics
Start Screen - pre-game screen
Camera - position and angle (throughout gameplay)
Ambiance - music/sound, and global light (Weather Switcher behavior may be set to override)
Parameters - toggle on/off global avatar mechanics (e.g., swimming)
Cause & Effect
Messages are an essential method of communication in Game Maker. There are many simple ways to send a Message using logic and trigger something to happen. Use Tags on objects to direct Messages specifically.
Broadcast
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.
Object/Player Avatar Detection
An object can send a message when an expected tag is detected. It can also be set to play one of its animations.
Examples:
Add a Speaker component or Trigger Volume 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 Animated Decoration behaviour.
Object Destruction
Send a message or drop (spawn) a new object (e.g. loot, smaller enemies, etc).
Example (direct):
Send Message - Add a Health component to the object that will be destroyed. Set a Message sent on death. Optionally, you can trigger this with an Instant death message.
Example (indirect):
Drop (spawn) object - Add a Drop component to the object that will be destroyed. Choose Behavior (default asset settings) or Preset (custom settings for one or more objects to spawn). Select the asset or preset to spawn.
Other objects nearby with a Speaker component can detect a tag that is included in your spawned object.
A spawned object, such as a Message Broadcaster, could instantly send a message.
Object Collection
Can be set as collectible by one player or every player, send a message, and/or play a sound.
Examples:
Singleplayer - Add a Collectable component to an object and set a message to send.
Multiplayer - Add a Collectable component to an object and set a message to send. Then choose the Global setting:
True - One instance of the object can be collected in the Experience
False - One instance of the object per player can be collected in the Experience
Object Interaction (E)
Press E to send the “Interact” Message. This can trigger a wide variety of events depending on logic setup.
Examples:
Open a door
Turn on a machine or platform
Play video or audio
Start a timed parkour race or other challenge
Trigger a blacksmith to "make" and spawn a special item
Set off a blast with dynamite
Trigger a seasonal change, restore a wasteland, etc
Talk to an non-player character (NPC)
Begin a new quest
"Use" a magical potion or spell at the right moment in the story
View NFT information for The Sandbox assets or an external PFP NFT on display (includes a marketplace link)
Make blocks or assets appear or disappear
Collect or pick up an item
Trigger a complex sequence of logic
Quests
Can send a message when completed.
Example:
Create a Quest/Objective. In the Action After Completion dropdown, choose Send Message. Use the dropdown below this to select an existing message or create a new one.
Rules
Can receive a message, carry out actions (which can apply to variables you create), and send a message upon completion. This may trigger objects or other rules.
Examples:
Collecting an object can trigger a variable to increase to count a total number of resources represented by the object. This value can be updated with a Math Rule displayed in the player HUD using the Game Screen rules.
A Key or Mouse Input rule can be used to trigger an Asset Spawner to spawn objects with Projectile behavior to shoot at targets.
Life & Death
Equipment Attributes Impact Gameplay
The Rarity & Attributes of an Asset determines how it may impact gameplay.
Equipment with a Defense Attribute increases the player's maximum health.
Equipment with a Power Attribute damages enemies more during attacks.
Equipment with a Speed Attribute increases the players movement speed.
Damage & Recovery
Impact health of any actor (avatar, NPCs, etc) by specific amounts:
Blocks set to damage or heal the player via Health component added as the Avatar's Feature in Spawn Point behavior
Blocks damage or heal any object via their Health component
Objects with Healer behaviour, with specific targets by tag
Health message with positive or negative values in the argument sent to the Avatar or other objects from any behaviour or component
Avatar Death
If players aren’t set as invincible, they’ll die when life total is 0, then:
Respawn to checkpoint with full health, while quests & inventory remain active... unless you build more sophisticated Consequences for Death into your Experience logic
Game over if Defeat condition is triggered, and if restarted, quests & inventory are cleared of items and the Experience is reset
Customise what happens when the player dies in the Health component added as the Avatar's Feature in Spawn Point behavior (Death Event settings).
Any object with a Health component can be destroyed if the Immune to Attacks parameter is set to false. It can send a Message upon death to trigger other logic in your Experience. You can also add a Drop component to spawn something when it is destroyed, such as collectible loot!
Transitions: Messages with Arguments
Sending Messages with Arguments allow you to transition audio, light, camera, weather, and video* instead of making an immediate change with a normal message. A parameter to customise the transition will appear when you choose a message with yellow text.
Apply this to add polish to your Experience's ambience and effects.
Quests
Quests/Objectives are one-time-use player objectives that are used to guide players through gameplay, which may include choices that influence game outcomes. There are four main types of quests, but a lot of flexibility for how you may use them.
Add an Indicator component to objects to direct players with quest icons, which appear depending on the state of the quest and the assignments you make: quest giver, objective, or receiver.
Quests are Client-Only
With Game Maker 0.10, quests could only track individual player progression in singleplayer and multiplayer Experiences. Game Maker 0.11 makes quests compatible with multiplayer [MP] logic. This means the player source can be included with messages to trigger all new logic possibilities!
Crowd Event behaviour can also be used for collective goals. It can be triggered by emotes or messages.
Basics to Create an Experience
There's a lot of depth to creating an Experience that uses logic for interactive play. Below are some general tips for elements that most games may include, with links to documentation for more info.
Quick Start
See the Templates tab in Game Maker for content you can download. This includes logic, gameplay, and landscape templates.
Add Depth
Customise the player camera settings and modify appearance with Post Processing Effects behaviour
Transition or switch ambient lighting with Weather Switcher behaviour
Use Avatar Teleport and Avatar Checkpoint components to manage avatar location
Apply visual effects to objects for player feedback
Set up teams with Spawn Point behavior
It's recommended to create a 1x1 sized game in singleplayer mode for your first game
Set Up Global Mechanics
Create variables and set up global mechanics using Game Rules
Share Your Creation
Last updated
Was this helpful?

