Like Ludo game multiplayer online game

Hello there, I wish to make my game online and multiplayer like Ludo game that anyone in all the world can get in the game. But the only tutorial that I found doesn’t explain that.
Can anyone helps me found another one for that, Any advice can help me.
Thanks

Okay, In that platform ( peer to peer ), I can not understand, How two players start the game, I mean when player1 sends his IP to player2, What can player2 do with it?
Is the game on a webpage? or on mobile?
How can they start it to play?

Check out the GDevelop P2P networking example - it’s fully functioning and if you look through the events they will provide answers to your questions.

1 Like

At first thank you, I watched it but didn’t know where the game is published to enable players to get in?
If it was on a webpage and player1 started it, Then he sent his IP to another, How can the other be in the game? It is opened - only - on the player1 device.

Both players run the game on their own devices.

You can test this yourself by running the example in 2 different browser tabs, and using the id from the first browser tab in the second browser tab.

1 Like

Hi, This is the game on a webpage( An example), I tried to copy my ID but failed, And my friend tried to do that on his device but failed too, Can You try it to tell me what I miss. Bytheway it is copied rightly in the app only, But not on the web.

The P2P on webpages doesn’t work for me (and neither do any of the P2P examples), I get the following error :

Which is fine as it’ll be my browser’s settings. However,I can do P2P when I run it as an application on my machine.

I suggest you check for errors in your browser (use the browser’s developer tools) and fix them, or compile the app and use it as a stand alone game.

How to make it as stand alone game?

Use the “Export and publish to other platforms” option under File :

image

That was what I did I think, And I choosed Html mode, And I converted it to a zip file, Then I uploaded it to itch.io.
I wonder if p2p doesn’t work on webpages what is it’s useful for people?

Now I tried it as exe for windows, It connected but what happens here doesn’t appear there, So what is the mistake?

So you’ve done the following :

  1. You have 2 devices each with the .exe on it. Lets call them device 1 and device 2.
  2. You copied the ID from device 1 to the exe in device 2.
  3. then you pressed connect on device 1 and device 2.

No, I press it on one only. I’ll try it by pressing them both.

When I press connect in device1 it automatically starts the game on both of them, I mean that there is no chance to press connect in another device2, And still every device’s events are different.

I may have mislead you. Copy the ID from device 1 to device 2. Press connect on device 2 :

P2P

Sorry, Copy and paste don’t work with me. It just works in the app (Gdevelop) itself not on the puplished app.

I opened up 2 instances of GDevelop, and ran them at the same time on one device to produce the gif in my previous post.

If copy and paste won’t work, the try just typing in the id.

1 Like