🔹Creating Gameplay

Use this simple visual guide to get a quick feel for how to create gameplay in Game Maker 0.9.

Systems

Messages are communicated between and within systems to create gameplay:

Game Rules: Gameplay mechanics

Example: Points, Timers, Shops, and more, tracked through variables. Variables can track values either for all players or for each individual player. Game Rules are reusable.

Objectives (Quests): Individual player progress in an Experience's flow

Example: A player interacts with an NPC, starting a quest to collect items. Quest are not reusable.

Object Logic: Behaviours & components added to voxel assets placed in the world

Example: [MP] (multiplayer synced) logic

  • Behaviour: Light

  • Components: NFT Sensor, NFT Image Display, Play Sound & Trigger Volume

Layers

An object may have no logic, only [MP] logic, or only [SP] logic applied.

[MP] and [SP] logic layers DO NOT communicate with each other, but when used together in a singleplayer or multiplayer Experience, they lead to cohesive gameplay.

[MP] - Networked for all players

Example: A door opening for all players

Communicates ONLY with:

  • Other [MP] logic

  • Game Rules

[SP] - Client Only for individual players

Example: Dialogue triggered for a player's active Quest

Communicates ONLY with:

  • Other [SP] logic

  • Game Rules

  • Quests

Use logic assets to add logic without adding physical obects. They have no visibility or collisions. This will improve your Experience performance (singleplayer and multiplayer).

Gameplay Examples

Using the assets and layers of communication shown above, let's walk through simple examples of how a singleplayer or multiplayer game will feel for the player and how logic will communicate in the background.

Singleplayer

Objective 1: Unlock the break room as fast as you can

Game Ruleset: Countdown timer triggered when Objective 1 begins (using a global variable)

[MP] Objects:

  • Collectable key

  • Door

Logic:

  • Collecting the key sends a message to open the door

Objective 2: Get Seb an espresso drink from the machine in the break room

[SP] Objects:

  • Vending machine

  • Seb NPC

Logic:

  • Interact with Seb to trigger the quest and turn on quest markers

  • Interact with the machine to get the espresso drink

  • Return to Seb to give him the drink

FOLLOW UP Why use [MP] objects in a singleplayer game? Door behavior is only available as a synchronised [MP] type of logic because if creators used a [SP] door in a multiplayer Experience, there would be conflicts with what is visible and what has collisions. Performance [MP] logic does not reduce gameplay performance in singleplayer games compared to multiplayer games.

Multiplayer

Objective 1: Unlock the break room as fast as you can Gameplay: All players rush to find the key

Rulesets:

  • Countdown timer triggered when Objective 1 begins

  • Coins earned via a Shop mechanic using a local variable (L)

[MP] Objects:

  • Collectable key

  • Door

Logic:

  • One player can collect the key. This sends a message to open the door (synchronised for all players) Variation: Coin Bonus Set the key's collect message to go to Rules. Use a local variable in a rule that adds a specified amount of coins. This gives the player a bonus!

Objective 2: Get Seb an espresso drink from the machine in the break room Gameplay: All players explore and find Seb on their own time, triggering logic only they can see.

[SP] Objects:

  • Vending machine

  • Seb NPC

Logic:

  • Each player interacts with Seb to trigger dialogue, quest, and quest markers.

  • Each player interacts with the machine to "get a drink." A message is sent to Objectives to mark this objective as met.

  • Each player returns to interact with Seb to "give him the drink." A message is sent to Objectives to complete the quest.

Free Exploration

Logic:

  • When Objective 2 is complete, a message is sent to toggle on dialogue to interact with the vending machine to buy your own drink.

  • If you're the player who collected the key and earned coins, you can interact from the machine to the Game Rules to check if you have enough coins to buy an item. Variable Types: Using a Local Variable The Shop Ruleset gives coins to only the players who trigger the rule to earn coins. It tracks this value as it changes (earning or spending) for every player individually. Using a Global Variable The Shop Ruleset gives coins to all players even if only one player triggers earning them. It tracks this value as it changes (earning or spending).

FOLLOW UP

Why use [SP] logic in a multiplayer game? This logic is for each player to experience on their own. Objects in the game world with [SP] logic are necessary to trigger quests, which track each individual player's progression in your game flow and/or objectives. Performance [MP] logic should be used minimally in multiplayer games to add more gameplay potential without reducing the fun. Start by creating as much [SP] logic as possible and then add the [MP] layer. You can build the same player experience that performs more efficiently!

Last updated

Logo

Copyright © 2012- 2023 The Sandbox. All Rights Reserved.

Change request #15: 0.9 Draft - DO NOT MERGE UNTIL LAUNCH