# Social Platforming

{% hint style="success" %}
See [Solo Platforming](/en/creator/game-maker/creative-guides/experience-guide/solo-platforming.md) if you're building a platformer for the first time.
{% endhint %}

Social platforming games combine competitive racing with fun parkour mechanics, all in a vibrant multiplayer setting. This kind of gameplay includes:

#### Physical Spaces

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Hub/Lobby</strong></td><td>Access point to the race zone, entertaining players who are waiting for the next race</td></tr><tr><td><strong>Race Zone</strong></td><td>Obstacles, platforms, checkpoints, etc. that challenge players to reach goals (score, time)</td></tr></tbody></table>

#### Logic (Rules & Objects)

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Portal System</strong></td><td>Triggers a racer checking system and player movement between the lobby and race zone</td></tr><tr><td><strong>Racer Registration System</strong></td><td>Controls which players may access a race (racer count, resources needed, etc.)</td></tr><tr><td><strong>Timer System - Core Loop</strong></td><td>Triggered by a racer registration system when enough players enter</td></tr><tr><td><strong>HUD - Personal Race Data</strong></td><td>Announcement/posting of which player(s) won the most recent race</td></tr><tr><td><strong>HUD - All Race Data (Optional</strong>)</td><td>Additional data tracking which players won across multiple races, personal bests, etc.</td></tr><tr><td><strong>Secondary Loop Logic (Optional)</strong></td><td>Gain and use resources, interact with objects, etc. while waiting in the lobby</td></tr></tbody></table>

Currently, Game Maker does not have matchmaking and lobby systems, but you can build your own!

***

## Lobby

A lobby is a space to manage which players can enter a race and entertain players who don't enter in time. Players waiting in the lobby during a race may spectate, play mini games, etc.

{% hint style="success" %}

* **JOIN (**[**SPAWN POINT**](/en/creator/game-maker/docs/behaviours/basic-logic/spawn-point-and-avatars-feature.md)**)** - Players enter the Experience via the lobby area or hub near it.
* **EXIT** **(**[**TELEPORT**](/en/creator/game-maker/docs/components/actions/avatar-teleport.md)**)** - Players exit the lobby when they interact at a portal to join a race.
* **ENTER (**[**TELEPORT**](/en/creator/game-maker/docs/components/actions/avatar-teleport.md)**)** - Players return to the lobby when a race ends.
  {% endhint %}

<figure><img src="/files/B0llExodCRnRDZSzdp3o" alt=""><figcaption></figcaption></figure>

## Race Zone

The race zone should be designed with a variety of physical obstacles and transitions between them that alternate between danger and safety with checkpoints. Risk should be rewarded.&#x20;

The race zone needs a start area blocked off with invisible barriers until the registration timer ends, then the barrier should disappear with Actor Property Switcher behaviour. It also needs a finish area to detect the player and record their time by detecting entry to the area with a Trigger Volume component.

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><img src="/files/EQwqisSsD7pZbZcf3b1N" alt="" data-size="original"><br><mark style="color:yellow;"><strong>BASIC PLATFORM</strong></mark><br>Moving walls and hazards<br>Crossing a large gap</td><td></td></tr><tr><td><img src="/files/SzeTXPygdMWXhPMCdNgw" alt="" data-size="original"><br><mark style="color:yellow;"><strong>ADVANCED PLATFORM</strong></mark><br>Shortcut if player timing is right<br>Pause at waypoints (risk/reward)<br>Linear pathing</td><td></td></tr><tr><td><img src="/files/y0KtYK9rt2PEy3TB4jyz" alt="" data-size="original"><br><mark style="color:yellow;"><strong>ROTATE</strong></mark><br>Turning obstacles<br>Circular pathing</td><td></td></tr><tr><td><img src="/files/1O8AmRhQxAfnCbhOw3Ae" alt="" data-size="original"><br><mark style="color:yellow;"><strong>POWER UP</strong></mark><br>- Spikes, traps &#x26; hazards<br>+ Speed, Health, etc.</td><td></td></tr><tr><td><img src="/files/UVqX8yjtTAyLw6SwCmtt" alt="" data-size="original"><br><mark style="color:yellow;"><strong>TRIGGER VOLUME</strong></mark><br>Fall consequence (below)<br>Trigger course changes</td><td></td></tr><tr><td><img src="/files/60b3pagmJMoZwrVhNy47" alt="" data-size="original"><br><mark style="color:yellow;"><strong>CHECKPOINT</strong></mark><br>Shorter race times<br>Lower frustration</td><td></td></tr></tbody></table>

## Portals

A portal is an access point for players to join a race from the lobby. You may have one portal or many.

#### States: Inform Players

Players in the lobby need information about race status when they approach a portal.

{% tabs %}
{% tab title="One Portal" %}

### **UI Text**

:green\_circle: **BEGINNER**

Display text above an invisible object and control UI visibility of it.

<figure><img src="/files/UqOLoHJWN9bPtIWdebnv" alt="" width="394"><figcaption><p>Text appears as UI based on player location</p></figcaption></figure>

#### Show/Hide It

<div><figure><img src="/files/1wb1DX1N4AtEc7gVGXbT" alt=""><figcaption><p><strong>Text</strong> - <a data-mention href="/pages/XLD2SCxDQl7HejgiYTpq">/pages/XLD2SCxDQl7HejgiYTpq</a> component (<a href="/pages/q6KxIWCpECS7i5s2IPVz#text-formatting">formatted</a> if needed)</p></figcaption></figure> <figure><img src="/files/WdsJ9ePZ0te5OsEoCzFQ" alt=""><figcaption><p>Visibility - <a data-mention href="/pages/q1wLMoeFeIYsWe0KCCH1">/pages/q1wLMoeFeIYsWe0KCCH1</a> looks for its tag</p></figcaption></figure></div>

***

:yellow\_circle: **INTERMEDIATE**

Control UI visibility ([Actor Property Switcher](/en/creator/game-maker/docs/behaviours/modifiers/actor-property-switcher.md)) based on play entrance/exit of a [Trigger Volume](/en/creator/game-maker/docs/components/triggers/trigger-volume.md) and race status.
{% endtab %}

{% tab title="Multiple Portals" %}

### **Voxel Text**

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>Join Race</strong></td><td>A player finds an open portal and enters. They may not return to the lobby until the race they joined ends.</td><td><a href="/files/i5kQ0jI3nsiq8IrTmZYK">/files/i5kQ0jI3nsiq8IrTmZYK</a></td></tr><tr><td><strong>Reserved</strong></td><td>A portal that has been used informs players who are still in the lobby that it can not be entered.</td><td><a href="/files/IW1KRvB2FtOeluyNsW7i">/files/IW1KRvB2FtOeluyNsW7i</a></td></tr><tr><td><strong>Race in Progress</strong></td><td>When a race starts, all portals close and players are informed. They must wait until it ends, but may spectate.</td><td><a href="/files/yd3HzlbWVPi0lVfcibuR">/files/yd3HzlbWVPi0lVfcibuR</a></td></tr></tbody></table>

:yellow\_circle: **INTERMEDIATE** ([VoxEdit](/en/creator/voxedit/create-assets.md) Modeler skills, [uploading](/en/creator/voxedit/upload-assets-to-workspaces.md))

Create [*voxel text assets*](/en/creator/game-maker/docs/gm-guidelines/playability.md#display-text-in-voxel-assets), remove collisions, and control their visibility depending on race status.

* [Actor Property Switcher](/en/creator/game-maker/docs/behaviours/modifiers/actor-property-switcher.md) controls a voxel text asset's visibility
* [Trigger Volume](/en/creator/game-maker/docs/components/triggers/trigger-volume.md) triggers the **Actor Property Switcher** when players enter/exit the volume

:red\_circle: **ADVANCED** ([VoxEdit](/en/creator/voxedit/create-assets.md) Animator skills, [uploading](/en/creator/voxedit/upload-assets-to-workspaces.md))

Create one voxel text asset with one animation per text state needed (hiding voxels inside of other models) and control which animation is displayed depending on race status.

* [Animated Decoration](/en/creator/game-maker/docs/behaviours/visual/animated-decoration.md) controls which animation displays as the voxel text asset
* [Actor Property Switcher](/en/creator/game-maker/docs/behaviours/modifiers/actor-property-switcher.md) controls a voxel text asset's visibility
* [Trigger Volume](/en/creator/game-maker/docs/components/triggers/trigger-volume.md) triggers the **Actor Property Switcher** when players enter/exit the volume
  {% endtab %}
  {% endtabs %}

#### Logic: Teleporting to the Race Zone

Players in the lobby need to interact with an object with \[MP] logic at a portal. This provides player source data for the Game Rules system to manage the core game loop so you can start and end races. It can also be used to limit how many players may enter a race.

Portals need logic to "open" when a race is not happening and close when a race starts. With multiple portals, the collect logic handles whether a portal is "open" or "closed" when triggering logic in Game Rules.

{% tabs %}
{% tab title="One Portal" %}

### Detection System

When the player enters a Trigger Volume at the lobby's only portal, they can be teleported to a holding area at the entrance to the race zone.

Once the countdown timer ends, the collisions for an invisible barrier around this area can be removed with Actor Property Switcher behaviour, and the race can begin.
{% endtab %}

{% tab title="Multiple Portals" %}

### Collect System (Objects)

A collect system needs one portal per racer. Each portal is used once per race by one player.

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>Collectable objects at each portal send player data to Rules to track which players may enter a race.<br><br>They must be respawned at the end of every race so players can register to join more races.</td><td><a href="/files/4gOITnIlCoGrkPIcv33Z">/files/4gOITnIlCoGrkPIcv33Z</a></td></tr><tr><td><p><strong>Example:</strong></p><ul><li>Barriers keep players in the lobby.</li><li>Each gold cup in the lobby has [MP] collectable component (Global=True).</li><li>The collect message sent from each one registers the triggering player and teleports them to the purple portal outside of the lobby (the race zone).</li><li>The collect message includes a message argument (1) to help Game Rules track racer count.</li><li>When a race ends, players teleport to the purple portal inside the lobby.</li></ul></td><td></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## HUD/Banners - Race Data

### Personal Race Data

Create variables for data that players will enjoy keeping track of, including their personal best time. They'll also need a variable for the current race to compare with their personal best to see if a new personal best has been achieved.

### All Race Data

If you've already collected the player name in a variable, you can save that text in a Fastest Racer variable when the player's personal end race time is larger than an instance best time variable.

## Registration Timer (Portals Open)

The registration timer is simply a countdown until the race will begin. During this time, players can be detected at a portal to register to join a race, which starts the stopwatch. The end of the race triggers the stopwatch value to be reset and to begin countdown again.

## Race Timer (Portals Closed)

The race timer should begin counting up when the registration countdown reaches 0. Game Rules logic should record player data.

## Reset

Certain logic needs to run in a loop, such as timers to switch between the registration period and the race. Some logic will need to be destroyed once used and respawned when players switch between the primary loop (racing) and the secondary loop (lobby/shop).&#x20;

This serves to automatically reset the gameplay so multiple races can be enjoyed. You can also add logic to manually reset race data, including timers, in case there are no racers but timers are running.

## Mini Games (Optional)

The lobby can offer interactive objects or NFT art to entertain players as they wait to join the next race.&#x20;

It can also be a secondary loop to the Experience's primary loop of racing. For example, [Resource Management](/en/creator/game-maker/creative-guides/experience-guide/resource-management.md) logic can be created to offer players in-game currency earned from playing mini-games.&#x20;

Currency could be used to enter a race or buy equipment at an in-game shop. Equipment could be cosmetic or have Attributes that give players an advantage in the next race, such as additional running speed. Shop items may even include collectable items that are consumable PowerUps the player can use anytime during a race by opening their inventory. You can even add collectable items in the race course as resources to spend in the lobby. All of these options give players a secondary goal to the primary goal of winning a race.

#### Shop Setup

Create an area for the shop, add a shop NPC, add logic to spawn shop items, and create presets to be spawned with logic applied if they are [provide a benefit when equipped](/en/creator/game-maker/creative-guides/logic-guide/equipment-based-logic-on-equip-nft-sensor.md) or consumed.&#x20;

For a shop with only a few items, you can integrate a Shop preset in the Game Rules with your asset spawners.&#x20;

For a shop with many items, you can set up a message with arguments for currency and shop items and modify the Shop preset so that collected items add currency, lose currency while gaining items, or simply spend currency depending on the player's choices in the shop and in lobby mini games.

## Spectator Area (Optional)

A spectator area has open visibility with invisible barriers, allowing players to view the race zone. This should look similar to the other portals, but allow players to travel freely by entering a Trigger Volume and teleporting (set up both in the lobby and in the spectator area).

The spectator area may not be one small viewing box, but many areas throughout the race connected via teleporting. Just make it easy to get back to the lobby.

<figure><img src="/files/hDjq2w1EsdiTdvw0k7jT" alt=""><figcaption></figcaption></figure>

#### Projectiles

You could offer spectators an opportunity to interact with a cannon that spawns projectiles at racers. When a projectile hits a player, it can reduce the running speed of any player it touches. The cannon needs Asset Spawner behaviour to spawn a preset of your projectile. The projectile needs to be set to send the message Speed with a negative number in the argument, broadcast at Hit Actors.

#### Powerful Shop Item

Make one of your shop items a high cost perk that unlocks special powers in the spectator area, like the power to toggle on and off platforms in the race zone by with a certain key input.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sandbox.game/en/creator/game-maker/creative-guides/experience-guide/social-platforming.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
