GodotSteam / GodotSteam-Example-Project

An example project for GodotSteam and Godot version 3 / 4.
https://godotsteam.com
MIT License
86 stars 13 forks source link

Running example with latest GodotSteam release #11

Closed tuimz closed 3 months ago

tuimz commented 3 months ago

Hi,

I was trying to run the latest example with GodotSteam latest release. That didnt work however, the 2nd player that joins (I just run the project twice) never really joins. No debug output either,

Any ideas?

Gramps commented 3 months ago

Hey there! Were you running the lobby or networking portions? Which version were you using?

tuimz commented 3 months ago

Im sorry, I realize that the issue I created was not containing a lot of information. I downloaded this GodotSteam release: win64-g422-s159-gs48-mp.zip

I am running the example from the multiplayer-peer branch: https://github.com/GodotSteam/GodotSteam-Example-Project/tree/multiplayer-peer

At first I tried it in my own project following your Youtube tutorial but that gave me the same result. Then I tried this branch and also has the same result.

The UI dissapears after clicking the join button, but no player is spawned. Nor is there anything in the debug logging or output.

Gramps commented 3 months ago

Ah, this may be a @greenfox1505 question then. I haven't used any of the MultiplayerPeer stuff still and haven't dug too far into it. Was it @MichaelMacha YouTube tutorial? He may be another good person to ask. Another good resource is our Discord channel where they discuss MP and SMP.

tuimz commented 3 months ago

Right, I have not paid attention at all.. This was caused by YOU CANNOT ADD A PEER THAT IS YOU!

Gramps commented 3 months ago

Ah, all good!

MichaelMacha commented 3 months ago

@tuimz Hey, I'm glad you got it figured out! But yeah, this is an artifact of how Steam's relay server works. It doesn't look at IP addresses and doesn't expose them directly; it looks at Steam accounts. Moreover, you can only have one Steam account online per IP address, so you can't really run it locally.

My tutorial shows how to go about most of the work using ENet and port over to Steam with a different MultiplayerPeer, but for testing, you're either going to need another account on a laptop, or maybe you could do it with a VM, but that's not really viable for heavy graphical games as it usually cuts off a lot graphics acceleration. Creating another Steam account and using it on a cheap laptop off of eBay is probably your cheapest option, if you don't have one around.

Good luck!