devloglogan / MultiplayerFPSTutorial

A Simple Godot 4 Online Multiplayer FPS Prototype
MIT License
202 stars 40 forks source link

UPNP issue [Invalid Gateway] #8

Open brwxisme opened 1 year ago

brwxisme commented 1 year ago

what i did Download this project Enable UPnP on my Router Run the Game from godot [as host]

Invalid Gateway [freeze]

try to export run it

player.gd not found

change player.gd to Player.gd export run it [.console.exe] as host debug says

SCRIPT ERROR: Assertion failed: UPNP Invalid Gateway! at: upnp_setup (res://world.gd:63)

run another .exe anyway [as join]

success [can move shot everything]

as long as i dont join as hosts, the error wont show up

BUT if i run it in Godot [as host], it will always freeze. anything to fix this ?

devloglogan commented 9 months ago

Apologies on not responding to this! Just merged a change that fixes the player.gd naming issues. Unfortunately, I won't be able to help you with this problem. UPnP is not a networking solution that is going to work for everyone / all machines. Some routers, even with a UPnP enabled setting, will respond with an Invalid Gateway error. I don't consider it to be a huge problem since UPnP should never be the production networking solution of a shipped game, just a fast and dirty prototyping option.

I'll keep this issue open in case someone more knowledgeable than myself comes along and is able to contribute something. Thanks!

AndrewDonelson commented 8 months ago

Damn :( Same issue, no UPnP issues with other Apps. I'm at a loss. Was great tutorial though

TerraBaddie commented 2 months ago

https://pastebin.com/pzmfVPZT

or

https://drive.google.com/file/d/1XEyYoNkkpBttFQ6qItx4z8WtbMNvZl26/view?usp=sharing

world.gd multiplayer fix referenced from:

https://docs.godotengine.org/en/stable/classes/class_upnp.html

Made a fork too for the github but I think you need a github account to view it: https://github.com/TerraBaddie/Multiplayer_LAN_Fix_for_FPSTutorial

So I put a pastebin / google drive download at the top Feel free to update your code with the world.gd fix DevLogLogan! I love your guides so fast and efficient compared to other guides I have been learning from! Tried posting it to youtube video but YT hates me and my comments never show up. :(

REMINDER IF USING THIS FIX PORT FORWARD port 7777 on your router most routers have a built in tab if you have a modern router Port Forwarding Example Enable UPnP Example

https://www.lifewire.com/how-to-port-forward-4163829