Online Servers list

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Sheppowed

Hello , i want to make a online game and i’m wondering how i can make a servers list with every server online

is there any ways to do it ?

:bust_in_silhouette: Reply From: w411-3

I’m making an online game and have also been thinking about that.

In my case, it is a dedicated server setup when two separate projects for the client and server. But this server is really just a “game” server that tracks game state for one match and handles players in one lobby, it’s not currently finding servers and linking you to them.

One idea I’m thinking would work is to have another separate server project (if you are going to have player authentication, then that functionality could also be here), and its responsibility is actually finding other machines you expect to be running servers; you can setup a way to query them, and they will send info back about what games are being played, how many players, if they have a custom name, etc.

I think that means the “Game Server” here would need to have two networks on different ports initialized, one for the players to connect and one for the auth server to query.

So you’d have connections like

Auth Server ↔ Game Server (GAME_SERVER IP, AUTH_PORT)
Game Server (GAME_SERVER IP, PLAYER_PORT) ↔ Connected Client Playing game

I haven’t implemented this yet so I don’t know if it works/is a good idea, but I think it would be easy to test if your original game server situation is functional. And hopefully the idea makes sense.

:bust_in_silhouette: Reply From: Monkstar

I suppose you will need to develop your own listing server. Most importantly, you need to host it somewhere (e.g., rent a server and run it there).