How to Create an Online Multiplayer Game in GDevelop 5 : Peer-to-Peer! [Easiest Way]



Hey Game Dev’s
This GDevelop 5 online multiplayer game tutorial will show you how to create a multiplayer game with GDevelop using peer-to-peer. You will learn how to deploy your game so that people anywhere around the world can play against each other. #gdevelop

You will learn and understand the following after this tutorial:
How the Peer-to-Peer(P2P) System Works
What are Clients, IDs and Broker servers
How to connect to the default server which would connect anyone
How to connect to a custom (local) server
How to start a custom (local) server which would run on your machine
How to start a custom (online) server which would connect anyone
How to Develop your App to heroku
Connecting Multiple Clients/Peers to a Server
And many more…

Website URLs
Download Nodejs = https://bit.ly/31BuKxO
Signup for a Heroku account = https://bit.ly/3jqmAi5
Deploy peerjs server (heroku elements) = https://bit.ly/3dTYmeL

Table of content
00:00 – Introduction
02:35 – The Project Folder
03:35 – What is the Client
03:54 – What are IDs
04:21 – What are Broker servers
06:59 – The Host Scene
10:32 – The Join Scene
13:05 – Setup P2P external event
13:55 – Setup Broker Server
14:33 – Default Broker Server
15:46 – Custom (local) server
21:13 – Dataloss Mode
22:20 – Peer-2-peer Conditions
25:05 – Multiplayer Platformer Setup

Download The Project Folder
From my discord server (https://discord.gg/q6C5hD8C2A) includes regular updates 🙂
Directly from itch.io (https://the-gem-dev.itch.io/online-multiplayer-game)

-Enjoyed the tutorial?
Consider a donation 🙂
https://www.paypal.me/thegemtutorials

-Tutorial for beginners

-Platformer Tutorial

-Download GDevelop 5
https://gdevelop-app.com/download/

-Try GDevelop 5 online
https://editor.gdevelop-app.com/

-Version
Beta 101

-About GDevelop 5
GDevelop is an open-source, cross-platform game creator designed to be used by everyone – no programming skills required.

-Important
Don’t forget to LIKE, COMMENT and most especially SUBSCRIBE.
You can make a tutorial request by placing your request in the comments section below

-Social Media
Twitter – https://twitter.com/TheGemDev
Instagram – https://www.instagram.com/the_gem_dev/?hl=en

48 thoughts on “How to Create an Online Multiplayer Game in GDevelop 5 : Peer-to-Peer! [Easiest Way]”

  1. Table of content

    00:00 – Introduction

    02:35 – The Project Folder

    03:35 – What is the Client

    03:54 – What are IDs

    04:21 – What are Broker servers

    06:59 – The Host Scene

    10:32 – The Join Scene

    13:05 – Setup P2P external event

    13:55 – Setup Broker Server

    14:33 – Default Broker Server

    15:46 – Custom (local) server

    21:13 – Dataloss Mode

    22:20 – Peer-2-peer Conditions

    25:05 – Multiplayer Platformer Setup

    Download The Project Folder
    From my discord server ( https://discord.com/invite/q6C5hD8C2A ) includes regular updates 🙂

  2. Nice it was helpful but can you teach us a different idea the idea is when anyone joins the game then one player is going to spawn and if another person joined then they'll meet each other on the same screen.

  3. just wish you would show us how to make it so each player has the same controls and a new player is created whenever someone connects. I just have no idea on how to differentiate between players

  4. SOO, for a weird reason it says "InvalidStateError: Failed to execute 'setRemoteDescription' on'RTCPeerConnection': Failed to set remote answer sdp: Called in wrong state: kStable" Do you know why? This happens when I press connect as a host.

  5. I want to make it where on the other players screen the camera focuses on them instead of the main player so on there screen they can see themselves and same as the main player

  6. is there any way to create a server so that everyone connects with just the touch of a button? like agar.io? that is always active? I just need that please, I will pay more than 100 dollars to whoever helps me

  7. At around 22:00 you copy and paste the trigger connected event into the code for the event "connected". Why is this done? It looks like the event is triggering itself but why is this necessary? Thanks 🙂

  8. Is it possible to ask few questions?

    1. Both of player 1 and 2 have different key inputs. However, I don't see anything that can stop the host/ player 1 to control the second player and vice versa, is there a way to fix/ stop this?

    2. Would it be possible to add an account like algorithm/ system?

    3. Is it possible to add more than 2 players?

    Thank you.

  9. if i use the default server, does my computer need to be on the whole time?
    (I’m 10 and I just want to make a online multiplayer game to play with my friend. So please reply)

Comments are closed.