Introduction to multiplayer techniques | GDevelop 5 Tutorial

6 Likes

Beautiful job, and great explainations aswell!
Definitely better than my implementation bugged, 4 years ago.

I’ll send you all people who asking about multiplayer :’)

Spoiler

I joking, oh wait maybe not ^^

1 Like

Thank you! It’s definitely something I want to explore more and see if I can come up with better patterns that others can use, so definitely happy to have questions sent my way :blush:

Some ideas:

  • Write a extension for client instead write all stuff in eventsheet.
  • onFirstSceneLoaded useful for initalize your client.
  • onScenePostEvents usefull for refresh the position for example and send data to other players.
  • An extension allow you to create your own instructions (condition/action/expression, behavior too !)
  • Add a behavior for sync with the server some datas.
    You can create you own behavior and add input like checkbox bot select which info can be send on server.
  • custom actions can be interesting for disconnect, connect, send a custom value on server.

Go futher:

Currently you use a circle as player. Imagine the others player haven’t this circle file. (Imagine because you have loooot of skins.)
If the others player haven’t the image you can get the blob of the sprite, convert itin base64, send througt the server, receive it on other players, and load in memory the file and display it on others client s :wink:
An example exist for load an image and display it in sprite object. “loading img from url” an javascript example.
Basically you can send all datas present in an object.

3 Likes

That’s a pretty thorough list, thanks for taking the time to write that out! I’ll give them some thought. :slightly_smiling_face:

2 Likes

:orange_heart::orange_heart::orange_heart::orange_heart: Love from the bottom of my Heart :orange_heart::orange_heart::orange_heart::orange_heart:

2 Likes