In Custom mode you can build a full multiplayer (MP) game in which the players share the physical game world. Players can collide with each other, and when a player for example destroys objects in the game world, such changes are automatically updated for others as well. You have more control over the events that each player encounters.
Making custom MP games requires a solid understanding of how to work with logic in HypeHype. If you're unsure whether this mode is necessary for your game, check out the light-weight features of the See Others mode first.
🧠 Shared Game Logic: The game logic is synchronized on the server side for all players (in comparison: in the See Others mode, game logic is synced on client side).
🌍 Shared Game World: All players exist automatically in the same interactive environment — when one player moves an object, triggers a trap, destroys an item, or causes a collision, it happens for everyone.
🔁 Customizable logic: All Multiplayer nodes work in Custom mode. You have more control over the game mechanics than in the See Others mode.
📢 Get a quickstart: Here's an MP Template which contains the basic setup of a platformer game: https://hypehype.com/game/multiplayer-template/r/tLlKW1lCxM4dZy
If you want to learn how to build such a setup on your own, keep reading!
Logic mode is recommended when creating a Custom MP game. It keeps the logic nodes visible at all times. To turn it on, tap the Three-dot menu on the left > View > Logic mode.
Reference objects appear in the game world when they are spawned. If the player has a gun, you may need to set it separately as a Reference object. Playtest to see that there are no unwanted parts floating around.
The Multiplayer Control node ensures that the game camera follows every player correctly.
The above example makes use of a premade player from the Asset Library. To make it work nicely with the game camera, a Multiplayer Control node was added to its logic. This node is also needed for assigning game objects only to specific players.
To spawn player characters and to assign them correctly to players who join, two nodes are necessary: Multiplayer Events and Multiplayer Player Spawner.
The MP Events node detects when players join and leave the game session. It sends out a Player Index, which refers to the order in which players join the game. The index of the first player is 0. The first joined player is also the host of the game session.
The player index is passed with a link to the MP Player Spawner node, and the same link executes the spawner. As a result, a new player character is spawned every time a player joins. The player index ensures that the game as accurate information on who should control each player character. The MP Player Spawner node is only used for spawning characters or other objects that the players control.
Here's a summary of logic nodes that are essential when creating Custom MP games:
Multiplayer Control | This node is needed when you want to assign an object or a UI for a specific player only. |
Multiplayer Events | This node detects when a player joins the game and can provide the Player Index that is used for identifying each player |
Multiplayer Info | Add this node to the scene if you need to use a player's name, position or profile picture in your game. Can also provide the Party index |
Party Info | This node provides information about a player party, such as the number of members and each player's index. Requires the party index from the Multiplayer info node to identify which party the data belongs to. |
Multiplayer Player Spawner | This node spawns the character, car, motorcycle, cube or whatever entity each player is supposed to control in a game. Needs a Player Index as an input. |
Multiplayer Sync | Use this node to ensure that essential game events happen simultaneously for all players. |
Player Broadcaster | The node sends a signal to all players in a session. Can be used for triggering events or notifying players. |
Player Broadcast Listener | All players will receive the signal that Player Broadcast Listener picks up (vs. regular broadcast listener which only affects individual players at a time) |
Player Beacon | Detects all players in a specific area |
Global State | Syncs a number for all players in a game |
Value Inspector | Also Value Inspector can provide the Player Index of a player, when you fetch data from the Object category. |
The following nodes are not supported in multiplayer games:
Multiplayer Settings Multiplayer Games See Others: Ghost Multiplayer