Members | Sign In
All Forums > Development
avatar

Tiered Networking for multiple ships

posted Apr 14, 2013 19:46:13 by hunterap
I recently started playing/hosting this game at my LAN parties. I regularly hook up with other people around the country and let them in on the LAN parties (VPN or just regular internet) to play games together. Artemis seems like it would be a great candidate for this, with each location hosting its own ship.

When considering this, I thought, why not have a master server, (a system that hosts the game itself) with each location's server functioning as the host for the local clients. There could be a button on the server that says, "Connect to Master Server." Any server could function as the master. When the server does it's initial handshake, it checks to see if a client, or another server is connecting to it. Once the game is underway, the master relays the info to the other servers, which will relay the info to the clients.

This would reduce the amount of bandwidth that needs to go through the internet. The, "ship server," would still control it's local net speed, which would allow them to have 20ms latency to its consoles which would keep the consoles fluid.

Latency between the master server, and the local servers can be fixed, or you can make another latency option specific to connected servers.

I realize that there's probably not many people using the game in this way at this point in time, so this idea might not get any traction at all, but I'm throwing it out there anyway.

Great game, thanks for making it!
page   1
6 replies
avatar
drewhabits said Apr 16, 2013 17:10:28
I have several groups of friends who play Artemis and we would all love a reliable option to play together without traveling across countries/oceans/etc to do so, so we would use the absolute BALLS out of this feature if it shows up in future versions
avatar
lucas99801 said Apr 18, 2013 01:43:06
You'd be surprised how many people already use the game this way :)

And while I completely back this idea, I believe it has been discussed (don't take my word) that this concept is off the beaten path of what Thom originally wanted.

Having a master server would reduce the latency overall for stations, but it would also require an extra computer (what Thom isn't keen on). Using VPN/Internet as gateways for a multi-bridged game is still possible, but as you said bandwidth can become an issue depending on the host.

In the past I have had as many as 4 fully-staffed ships connected to a Server hosted on my 9down/2up Internet connection with zero lag issues. Internet traffic. Spanning California to Europe and even Australia, while I am located in Kentucky, USA. And with the internet method, it does not limit the ability of each bridge to have a main screen, they just have to connect their "server" as a client to the Hosting server. (Although you probably already understand that).

But in closing, I agree. Server Main Screen direct connections would increase the quality of gameplay for each bridge, even if it provided just a small decrease in latency.
Hosting a Mumble (Murmur) server @ tsnfenrir.no-ip.org
Having trouble connecting to the TeamSpeak channel: http://tsnfenrir.no-ip.org/ts3
Helm Script for Numerical heading input: https://dl.dropbox.com/u/10193809/ArtemisHelmFSW.zip
Twitter: @lucas99801
Facebook: /lucastarnold
avatar
hunterap said Apr 18, 2013 03:16:10
This wouldn't necessarily add an additional computer to the mix. The Master Server could also act as the main screen for the people who are connected locally.

The benefit here is that a remote machine, acting as a main screen) can host the remote clients, and function as a relay between those clients and the machine that's hosting the game.

Here's an example:

Server 1 (Acting as master) hosts Artemis & 5 Artemis consoles. It also hosts Servers 2 & 3.
Server 2 (connects to Server 1) hosts Intrepid & 5 Intrepid Consoles.
Server 3 (connects to Server 1) hosts Aegis & 5 Aegis Consoles.

You should be able to trust the remote servers to handle their consoles, and only relay select updates to Server 1. For instance, Server 1 doesn't need to know what the power levels of the Intrepid are. Server 2 takes care of that, and simply relays the speed, orientation, shield power, etc to Server 1. This would greatly reduce the amount of data being delivered, and would be much more lenient in terms of latency. (having 200ms+ latency between the servers really wouldn't be a problem)

If this were a typical online game where you had to worry about cheating, I wouldn't recommend this approach. However, I don't think that the Artemis crowd is your typical online gamer, looking for any edge to make the grind easier. There's no grind here, and I believe that the people playing Artemis rather enjoy the challenge.
avatar
lucas99801 said Apr 18, 2013 05:46:15
The master server would require all data from all vessels, or it wouldn't be able to handle damage calculations or death events, unless I'm missing some key feature here.

Server 1 would have to handle all ship-ship interactions, and therefore would require all data from all vessels. Locations, speed vectors and shield power aren't enough to perform the calculations of a battle. Even energy levels are crucial to know.

So regardless, the same amount of data would be sent to the Master Server, just from fewer clients (the bridge Main Screen/Server). Of course, fewer connected client may slightly reduce latency, but I don't think it would have as large of an impact as you'd think. I really don't see a way to reduce the amount of data the master server receives, all that would change is you could maybe perform some calculations on Server2 or 3 and report the results to the Master Server, but even that situation could be handled by optimizing the calculation code in Artemis (sometimes a much easier solution than rewriting/tweaking the client/server connection code).

Now I honestly don't know which situation is better in terms of latency, 35 clients sending small amounts of data to one machine, or 5+5 machines sending a nearly equivalent amount of data to one machine. But I honestly doubt at this point it would be worth the effort to implement the suggested method.

Are you personally having troubles with latency when connecting multiple bridges over the internet?

Cause honestly I haven't seen any saturation problems, even with 15+ clients connected with only myself playing on the LAN, all other clients connected via WAN.
Hosting a Mumble (Murmur) server @ tsnfenrir.no-ip.org
Having trouble connecting to the TeamSpeak channel: http://tsnfenrir.no-ip.org/ts3
Helm Script for Numerical heading input: https://dl.dropbox.com/u/10193809/ArtemisHelmFSW.zip
Twitter: @lucas99801
Facebook: /lucastarnold
avatar
hunterap said Apr 18, 2013 15:19:35
I can't speak for how Thom's code works, but from prior multiplayer game development experience, if you can trust the source, you don't need as much info. For instance, in the case of the engines, the master server doesn't need to know what the impulse engines are set at, nor does it need to know what the energy level is set at for the engines. All the master server needs to know is what the bearing of the ship is, and at what velocity it is moving at.

In terms of weapons and combat, the master wouldn't need to know what the power levels of the torpedos, energy weapons, etc are at. The ship server can simply inform the master that it is firing at such and such ship at x power. The pertinent data that would need to be sent would be how the ship is interacting with the universe.

I will repeat my earlier caveat... If this was a game where we were concerned about cheating, I would agree with you that the master server needs to know everything, all the time. But if we trust the players, then we can get away with trusting the separate servers to manage the individual ship consoles properly so that it does not need to relay every piece of data to the master.

As far as me having trouble, other than the console latency, no. But the console latency is noticeable, especially at the helm and weapons consoles.
avatar
clunkyman said Apr 19, 2013 00:08:20
I don't think anyone's brought it up, but if this was implemented into the game, it could pave the way for some pretty epic battles over the internet. If it does reduce latency for more people, what's to stop an increase in the max ship limit from 6? It's probably just wishful thinking, but I'm imagining multi-ship, human-controlled fleets going head to head on an epic scale. I believe Thom's said this is a game he wants people playing physically together, and I agree. But in a multi-ship game, I think connecting over the internet could be a significant improvement.
Login below to reply: