Cookies
information
We use cookies to learn how you interact with this website and analyze this information. Please accept this before browsing further.
If you decline, we won't collect any information when you visit this website.
View our Data Privacy Statement for more information.
Cookies
preferences
Essential
Cookies that are necessary for the website to function properly. They enable core features such as security, network management, and accessibility.
Marketing
Cookies used to track visitors across websites to display relevant ads and marketing campaigns based on user behavior.
Analytics
Cookies that help us understand how visitors interact with the website by collecting and reporting information anonymously.
View our Data Privacy Statement for more information.

Creating a multiplayer Experience in Delightex Nova

Delightex Nova allows you to collaborate and play together with others through its multiplayer Experiences.

In this tutorial, you’ll learn how to create and explore your first multiplayer session step by step.

Part 1

Starting a multiplayer session

In multiplayer mode, multiple users connect to the same session so they can see and interact with each other’s actions. Think of it like a shared virtual room, everyone inside can see the same things happening live.

Every multiplayer session has two roles:

  • Host player: the one who creates and controls the session.
  • Client players: the ones who join a session started by the Host.

Usually, the Host generates a link and sends it to other Players so that they can join the session.

To start a multiplayer session, you need to call:

1Multiplayer.startSession

The Host start a new session, while Clients use the same method to join an existing one.

In other words, both sides call Multiplayer.startSession: the host creates a new session, and the clients connect to that session using the host’s link.

To do so, create a TypeScript script and type the following:

1async function startMultiplayer() {
2    await Multiplayer.startSession();
3    
4    if (Multiplayer.isClient) {
5        Debug.log("Joined to the multiplayer session");
6    } else {
7        Debug.log("Started a multiplayer host, link " + Multiplayer.joinLink);
8        Input.copyToClipboard(Multiplayer.joinLink);
9    }
10}
11
12startMultiplayer();

Now start the space and open the browser console. You’ll see a message like this:

1Started a multiplayer host, link
2https://nova.delightex.com/experiences/abcdefg?mp-sid=zxcvbn

The link is already copied to your clipboard, so you can open another browser window and paste the link there. You’ll then see another message in the console:

1Joined to the multiplayer session

That’s it! You’ve just created your first simple multiplayer game.

Note: You can’t invite other players directly from your editor. You first need to publish your Experience, either to the Gallery or by sharing it through a direct link.

In the next lesson, we’ll explore how synchronization works, so you can understand how data is shared between players and learn how to control what gets synchronized — allowing each player to have their own unique perspective while still staying connected in the same world.