Unity & nodeJS Multiplayer Explained
In this tutorial, I’ll be talking about understanding multiplayer games using Edge Multiplay, Edge Multiplay is a multiplayer solution where the server is nodeJS and the client is unity.
Edge Multiplay is a free and open-sourced Multiplayer solution.
I have here a small example where I’m going to enter my name and press start game.
I’ll see some text generated.
The game will start and I will be playing with another player called Bruce.
Now let’s go deeper and understand what happened after I pressed the Start Game Button.
When I pressed the Start Game Button, I sent a request to the network manager with my location.
The network manager will find the closest server to my location, and once the server is found the connection between me and the server will be initiated.
Next, I will need to provide a key to the server so I can enter the lobby.
There are no rooms available in the lobby so I’ll have to create my room and the room will be for two players only (according to my game logic).
Bruce has been through the same process but now he finds that my room has a vacancy and he will join my room.
Once the server noticed that the room is full the server will announce the start of the game.
Inside the room, me and Bruce will be exchanging messages.
For messages like the ball movement or the paddle position, those will be UDP messages.
For more reliable messages like score, those will be web-socket messages.
To learn more about edge multiplay, please consider the following
Join our Discord Server:
Join the MobiledgeX Community Discord Server!
Check out the MobiledgeX Community community on Discord - hang out with 32 other members and enjoy free voice and text…
And check the EdgeMultiplay Getting started tutorials: