Multiplayer tutorial 2: chat room

Favourite 82 favourites
Tutorial written by AshleyOriginally published on 14th, March 2014 - 3 revisions

Translation Team:

1 revision

Ces tutoriel supposent que vous avez déjà lu Multiplayer tutorial 1: concepts.

Debut de la Traduction par TropicalMurloc
L'introduction la plus facile à l'objet "multijoueur" dans Construct 2, est une simple Chat room. Ca doit seulement traiter la connexion et la jonction de la Chat room, pour les autres pairs, la jonction, le départ et le relayage des simple messages de chat. Certains des sujets plus compliqués comme la prédiction de saisie et la latence ne sont pas nécessaires avant qu'il n'y ais d'objet contrôler par le joueur. Ceux-ci seront expliquer dans le tutoriel suivant, mais pour le moment nous pouvons nous concentrer sur l'essentiel et toujours faire quelque chose d'utile.
Fin de la Traduction par TropicalMurloc

To get going, open the Example: Multiplayer - chat room example that comes with Construct 2. This can be found in the Select template or example dialog that opens when pressing File - New. While this example is already commented, this tutorial will explain it event-by-event in more detail, since some of the features take a little more explaining than is convenient in event comments.

Running and testing

To preview the example, you must run it from the first layout (F4). If you run the Chat layout directly, it will not be able to join the chat room, since it needs a valid name entered from the Login layout.

When testing the tutorial multiplayer games, it's possible you will meet other people who happen to be running the tutorial at the same time. However users commonly go "away from keyboard" (AFK) and leave things running without attending to them, so don't be surprised if other people are present but don't respond to chat messages. If you don't happen to meet someone active, get a friend involved and do some testing with them!

It's also possible someone will already be hosting the tutorial but you won't be able to connect to them. If that happens, change either the game, instance or room name and you'll start a new game which you host yourself.

Share and Copy this Tutorial

You are free to copy, distribute, transmit and adapt this work with correct attribution. Click for more info.

Leave a comment

Everyone is welcome to leave their thoughts! Register a new account or login.