Multiplayer tutorial 4: real-time game

26

Index

Contributors

Stats

50,557 visits, 195,922 views

Tools

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 19 Mar, 2014. Last updated 5 May, 2022

Game events

As with the previous examples we have global constants for the game, instance and room name:

These allow us to conveniently change the names on the signalling server without having to hunt through our events.

Message log group

As in the Pong example, we have a text object with an AddLog function to simulate a scrolling list of messages. There's also a second helper function called AddChat. This is simply a shortcut to add a line in the format <Name> Message, which is useful for adding chat messages.

Now we can call AddLog or AddChat in the Function object from anywhere else in the event sheet to conveniently add scrolled messages to LogText.

  • 8 Comments

  • Order by
Want to leave a comment? Login or Register an account!