|Topic was automatically imported from the old Question2Answer platform.
I’m working on a multiplayer 2D Shooter, and I managed to make it support multiple players locally pretty well. Currently it supports up to 6 players, and I don’t intend to put much more than that.
But I have no idea how to port it to the online network and enable players to create their room/servers, and I didn’t found any good content about this.
- Do you want to host the game servers?
- Or do you want the players to host their own server?
I would write a “game tracker” (which could be an http server) which keeps track of the opened games.
Then if a player wants to join, the game tracker has to provide the ip of the server.
For 1. you have to start the server when a player “creates” a new game. (Register it on your game tracker). Then tell the players the ip.
For 2. the server creator tells your tracking server that there is a new server it must track.
Then make shure (maybe with godots new miniUpnp wrapper) that the port is forwarded on the servers network. Then the players ask the tracking server for the ip, then connect like normal.
Oh yeah, I want the players to host their own servers.
Thanks for the tips!
I’ll start the search now. Let me know if you know some good sources/tutoriais for me to apply it to my project.
I’ve written a prototype a few month ago. We also need something like this for our new game, maybe i could opensource it. (but don’t nail me on this please )
David Krause | 2018-06-28 14:58
This sounds great. Let me know if you made it opensource xD