Author Topic: Relay Server for multiplayer games ( GSoC suggestion )  (Read 1414 times)

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Relay Server for multiplayer games ( GSoC suggestion )
« on: 13 February 2011, 15:26:21 »
Currently we have the problem that "servers"  need to be reachable from the internet. They have to open ports and all this.
The idea is to craete some kind of relay server which will solve this:

current state while playing MG:
Currently all clientes send their commands to the server. He collects them until next keyframe and distributes them as a command block to all clients. This command block is meant for the next keyframe to be executed. If this keyframe is reached on each client and the server itself the commands included in the command block are executed.

future relay server:
Clients and the server send their commands to the relay server. The relay server collects the commands and distributes them, the way it was done by the server before. So in future clients will connect to the relay server instead of the real server.

-------------------
some brainstorming/problems :
- external game publishing will show the relay server instead of the server
- what about the pause command? ( how will the relay server pause the game if he waits for slow clients? )
- how will the game setup work?
« Last Edit: 16 February 2011, 00:19:25 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Relay Server for multiplayer games ( GSoC suggestion )
« Reply #1 on: 15 February 2011, 15:46:28 »
Two possible ways this could be done might be:

a) add code to run MG in headless mode (so its just a type of automated socket server which proxies games)

b) write something like a PHP (or something else) socket proxy that acts as the middle man. This option is more risky since it means a different set of code from what the game has and means we have to change two places (possibly) when we change some types of things in the game network code. On the other hand it could be more lightweight if it properly abstracts only what is needed to proxy network games.

I think option a may be the most reliable, but either option is worth a try.

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Relay Server for multiplayer games ( GSoC suggestion )
« Reply #2 on: 15 February 2011, 16:09:00 »
b) write something like a PHP (or something else) socket proxy that acts as the middle man.

 I personally prefer a solution b because it's lightweight but I think it should be a executable program (because I think PHP is some kind of too slow / think c++ would fit best because it's the current language of Glest) with something like port-hop for the ports used by glest, when a user connected via glest.

Beside the Relay Server I would prefer a dedicated server (something like a with some administrative functions like the ones mentioned by tomreyn https://forum.megaglest.org/index.php?topic=6469.0)
« Last Edit: 15 February 2011, 18:10:16 by MuwuM »