Jump to content
  • 0

Solving the LAG Issue


Thundercraft

Suggestion

MMO games like Eve online and DDO require players to connect to a central host. Players are the clients and the MMO company's expensive computers with their expensive T1/T2/T3/T4 connections is the host. If there is significant lag, I think it's often due to limitations of the client's connection or hardware. That, or there are software issues or too many players.

 

But multiplayer games like Avorion are not MMOs. Hosting maybe 2 dozen players is not "massively multiplayer". The host is either the hardware and connection of a single player or a paid game server service. Problem is, such hardware and connections can't compete with the hardware and connections of profitable MMO companies. Yet, Avorion is a massive game with a lot of things going on under the hood...

 

From what I can tell, each Avorion client relies on the server or host to do most of the calculations and keep the simulations of all players updated and syncronized. But, with dozens of players and a lot going on, the host can not keep up with such demand.

 

My Experience:

 

Despite a decent ping rate, we've witnessed a lot of lag on the server where I often play whenever the player count goes above 1 dozen or so. Sure, there are various reasons. For instance, very predictable, very extreme lag occurs whenever someone is fighting the last boss in the galactic core.

 

Whenever there is extreme lag, it become frustratingly tedious or impossible to do pretty much anything. Mining an asteroid or salvaging a wreck becomes either frustratingly slow or impossible. (The asteroid or wreck suddenly seems immune to our mining or salvage lasers...)

 

Worse, combat can become nearly impossible. At nearly point blank range, I can shoot and shoot and shoot... and the enemy takes no damage. Then there's how enemies 'teleport' as the host suddenly updates their location to someplace different that our client did not predict.

 

My Suggestion:

 

Instead of requiring the host to do all of the heavy lifting, why not distribute the workload a bit with the clients' hardware? Depending on how this is done, that could relieve a huge amount of the strain on the host's hardware and connection.

 

Specifically: For each player that is currently by himself (no other players) in a given sector, why not allow that player's hardware to be responsible for simulating that sector? As long as said player's client is updated with the server's copy of that sector when the player enters that sector and as long as it updates the server's copy whenever that player leaves or a new player enters the sector, I can not imagine a situation where this would be a bad thing.

 

The benefits are obvious. Requiring clients to simulate their own sectors and keep the server updated (instead of requiring the server to simulate everything and keep clients updated) should eliminate the majority of lag for those clients - no matter how many players join.

 

A multiplayer game really boils down to a shared experience and chat. But as long as players are doing their own thing in their own sectors, there's not much actual sharing going on - besides chat, that is. A bunch of multiplayer players each in their own sector is really not much different than each of those players playing in singleplayer galaxies that happen to be the same galaxy.

 

Granted, when more than one player is occupying the same sector, that situation is different. That would require the host to do most of the calculations just to keep their simulations syncronized. But, in my experience, a majority of the collective experience in multiplayer (Avorion) games is spent with players off doing their own thing in separate sectors. As such, offloading the workload to simulate a sector to the one player occupying that sector would be a huge boon to the host and, thus, all players in form of much less lag.

Link to comment
Share on other sites

8 answers to this suggestion

Recommended Posts

  • 0

I am not sure wether this is a engine limit,poor optimisations or another cause but the hardware isn't even running at 100%.

Sometimes the server load will be 100% while only using about 20-40% CPU and maximum 50% of RAM.

 

This even with all cores (4 i7 4790k cores with 8 threads) assigned to Avorion, which is the first game to run into such problems for me. Most other games are only single threaded and run smoother than smooth on this machine so this shouldn't be a problem on our side.

 

The problem with the server load seems to be that there are too much requests for updates which the code can't handle, which causes a lot of delay between requests.

Examples of this are: Too many fighter crews harvesting/attacking, too many ships in one sector/battle and multiple players fighting bosses.

Link to comment
Share on other sites

  • 0

This is not possible because hack programs like wep

 

If things are done client side they can change packets. So instead of doing 10 dameg they do 50000. Instead of gaining 5 iron they gain 5 mill. They can even buy one  cargo and gain a massive list of free items.

 

As it is the client has to much handled on its side. If I wanted to I could make UI mods that would be down right insane cheats like all scan, mass, mining tool, and trade modules active without even equipping one.

 

The truth is from a programmers point of view we need LESS handled by the client NOT MORE!

 

 

Link to comment
Share on other sites

  • 0

one big bottleneck seems to be 32 bit program cannot handle more than 4GB of RAM or VRAM

about client side or server side handling things - the tiny packets thats just plain numbers can be handled in server side while graphics should be 100% client side , i see no problem there

game probably needs alot of optimizing - like if i build a ship from 50K of blocks (for nice looks) it starts to lag even in singleplayer

and when editing ship and deleting like 10K of tiny thrusters in one go - it can take over 5 minutes before game finishes the operation

i have 4.2Ghz QuadCore i7 + 32GB RAM + GTX1080 12GBVRAM < the game shouldnt lag at all but sometimes it does.

Link to comment
Share on other sites

  • 0

one big bottleneck seems to be 32 bit program cannot handle more than 4GB of RAM or VRAM

 

True, that is a limitation of 32-bit programs. Also, if properly optimized, a 64-bit program should be able to take better advantage of multi-threading (such as with 64-bit bitwise operations). Sadly, I doubt we'll see a 64-bit version of Avorion.

 

This is not possible because hack programs like wep

If things are done client side they can change packets. So instead of doing 10 dameg they do 50000. Instead of gaining 5 iron they gain 5 mill. They can even buy one  cargo and gain a massive list of free items.

 

I thought of that. However, Avorion is not an MMO, where that kind of thing is not uncommon.

 

Avorion is hosted either by a player or a server host company. In either case, it should not be difficult to spot a cheater and have the admin permanently ban their IP. They should also be able to reverse the damages caused, reimburse or replace their ship, etc.

 

Also, even if it was shifted more client-side, it should be possible to at least make cheating difficult or detectable. For one thing, the host can verify that the client copy of the game is current and valid and that it's not using any unofficial scripts...

 

I am not sure wether this is a engine limit,poor optimisations or another cause but the hardware isn't even running at 100%.

Sometimes the server load will be 100% while only using about 20-40% CPU and maximum 50% of RAM.

 

This even with all cores (4 i7 4790k cores with 8 threads) assigned to Avorion...

 

That is... interesting. This does suggest that there is a lot of room left to optimize Avorion. Perhaps part of the problem is Steam?

 

Regardless, I still think that shifting more of the load onto clients' hardware should eliminate most of the lag. But, perhaps after Avorion is closer to 1.0 and gets an optimization pass, it will improve to the point that such a move won't be needed?

Link to comment
Share on other sites

  • 0

 

 

Avorion is hosted either by a player or a server host company. In either case, it should not be difficult to spot a cheater and have the admin permanently ban their IP. They should also be able to reverse the damages caused, reimburse or replace their ship, etc.

 

Also, even if it was shifted more client-side, it should be possible to at least make cheating difficult or detectable. For one thing, the host can verify that the client copy of the game is current and valid and that it's not using any unofficial scripts...

 

 

Sadly it not that simple any cheater worth his salt is not easy to detect and the more that becomes client side the easier it is to hide said cheat.

 

Eventually the cheats will be posted on this site http://www.mpgh.net/forum/index.php and others like it and 20% of your server pop before you know it is using the cheats. :(

 

The game will be unplayable.

 

Not only this the more that things become client side simple mods that are OP can be used as well! On top of all this the server can't mod the game the way they want either because that means every one who tries to join will have to have exactly the same changes made on there side that the server has.

 

 

Link to comment
Share on other sites

  • 0
Not only this the more that things become client side simple mods that are OP can be used as well!

 

Have you tried to use an unauthorized script/mod as a client in a multiplayer Avorion game? I tried, but the game tells me that the script is unrecognized. (I'm talking about a client-side script, not a server-side script.) Avorion is already coded such that only authorized scripts can be run.

 

Are you confident that merely shifting more of the workload onto the client end would break (or allow players to easily circumvent) Avorion's block on unauthorized client-side scripts?

 

On top of all this the server can't mod the game the way they want either because that means every one who tries to join will have to have exactly the same changes made on there side that the server has.

 

That's already an issue now. Heavily modded servers require players to either install the required mods individually, or they must install the server's mod pack.

 

AFAIK, the only thing that shifting more of the workload onto clients would change is maybe exacerbate this problem such that it would require players of all modded servers to install all parts of all of the server's mods, without exception.

 

However, koonschi has been thinking about an actual mod system to make installing and updating mods easier and less problematic. (See his post here.) He does not go into great detail. But, perhaps he will support mods through Steam Workshop, like many other Steam games?

 

Sadly it not that simple any cheater worth his salt is not easy to detect and the more that becomes client side the easier it is to hide said cheat.

 

Eventually the cheats will be posted on this site http://www.mpgh.net/forum/index.php and others like it and 20% of your server pop before you know it is using the cheats. :(

 

Well... You've got me there. You have a point. :(

Link to comment
Share on other sites

  • 0

Update: Either NPC or player use of fighters, particularly lots and lots of fighters, seems to be a leading culprit of lag issues. (See the [Req] -Disable- all NPC fighters mod request topic for details. The admin said he would gladly disable all NPC fighters if he found a way to do this.)

 

It's such that the admin set a rule where players are only allowed 2 to 3 squads of fighters, max - at least when there are lots of players online.

 

Further, it's been noticed that when we find several sectors with ongoing faction wars, the lag becomes much worse. (Faction wars always seems to involve one side using lots of fighters.)

 

Anyway, it seems clear that either reducing the number of NPC fighters / carriers or optimizing the code for fighter AI behavior would go a significant way towards lessening multiplayer lag.

 

Perhaps, in the future, server admins could have a setting to control the maximum number of faction war battles that can occur simultaneously? Reducing that to 1 or 2 should help considerably.

Link to comment
Share on other sites

  • 0

I think 'FIGHTERS' should be fazed out completely and Hangers should allow small ships to dock in large ships. The mass and volume of docked ships would be decided by the size of the hanger.

 

I mean its a no brainier!

 

It would eliminate the problem at its base

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...