I'd like to get an example of a centrally hosted game (using a server).
I want to make a network game in a way that acts as a server from the center to make the rest of the players enjoy the game even if the host runs away (internet disconnected) during the game, any examples or additional help?
//////////////////////////////////////////
construct.net/en/make-games/manuals/construct-3/plugin-reference/multiplayer
Signalling and hosting
The signalling server is a central server where players go to find each other. Scirra host an official signalling server at wss://multiplayer.construct.net. The signalling server does not transmit any gameplay data; it serves only to connect peers to the game host by relaying connection information like IP addresses. Players must connect and log in to the signalling server before they can join any rooms.
The first player in to a room becomes the host. The host acts as the server for the game, transferring actual gameplay data. Any player can be the host. This means games can run without needing any server hosting, saving you from having to pay bandwidth bills to run your multiplayer game.
If you have a large or particularly latency-sensitive game you can still run your game with a dedicated server host to take advantage of its better quality connection. This can be achieved by starting a browser on the server, starting the game and make sure the server is the first to join the room so it becomes the host. Now the server connection will be hosting the game. You can host multiple games on a server by opening multiple browser tabs (a hosted game can continue to work in a background tab). Note this means your server is genuinely running the game - as mentioned, the signalling server only helps peers connect to the room host, and actual gameplay data will be transmitted through your server if it is the room host. It is not necessary to run your own signalling server to achieve this.