DejaVu
Archangel/1B
Posts: 122 Joined: 10 Apr 2006, 13:43
|
Let me explain what I have learned and noticed over the years of playing DXMP, doing server side optimizations, and even scripting mods with net optimizations.
DX is based on Unreal Engine, which was made in 1998. Back in 1998, not many players had cable, DSL, most of them used 56k modems or similar slow connections. Bandwidth usage was big issue for any kind of gaming back then. Games couldn't afford sending and receiving anything larger than 8kb/s, because that would completely fill their connection resulting in high pings and lag.
Now, to completely understand the issue, we need to study how game networking actually work. All actors in game can be replicated or not. Being replicated means, that there is some communication between player and server about that actor (opened channel in stat net). When designing MP game or mod, you need to make only actors that really NEED to be communicated between player and server, to be replicatable. All other actors should NOT be replicatable. Every additional actor will cause more bandwidth usage and more net utilization and if that is not needed - get rid of it.
So, which actors do truly need to be replicated then? Obviously, first one is Pawn of the player. Then, weapons, and pickups. Glass that breaks when being shot? Yes - if you don't replicate them, then shooting glass will not be seen to other players. With this information, imagine UT game. What is replicated there? What I counted here. So, for each player, around 10 actors if he is stacked with all weapons plus about 20 actors as being pickups on map. Anything else? Not really. 10 players in server means 10*10 + 20 = 120 actors. And these are NOT constantly replicated to all players. Unreal engine has optimization - relevancy of replicated actors. If the actor is not relevant as if not being visible eg. being on other side of the map - why bother replicating it? So, in UT game, there is approx. max 40-50 actors being replicated to each player - in fights!
Let's take a look @ DXMP now. DX was first SP game only. And it was scripted that way. SP scripters never considered DX being MP game once, so they were doing BIG optimization flaws - that is - creating new actor for every "peace of metabolic end product". Every aug is actor, every skill category is actor. This is NOT needed at all. These augs and skills could be simple objects only and not actors. When extending DX to MP, actors for augs and skills stayed. And what is worse, these actors are all being created uppon login whether player actually gained any or not yet. How many augs DX has? 20. And 10 skill sets. Plus aug manager actor and skill manager actor - Are you counting? That is more than 30 for every single player!
DXMP has also other stuff UT doesn't. Furniture, barrels, more pickups, more movers. Instead of usual 40 actors being replicated to each player, in DXMP, there are 200 or more being replicated.
Another crucial mistake original scripters did are visual effects actors. Yes, we do need visual effects to be actors (because they fly around, are destroyed over time etc), but they SHOULD never be created on server and then replicated to players. Yes, it is easier to make such code, but it is hogging servers performance like a bitch. Imagine - all bullets, shellcasings (in AssaultRifle like 5 per second?), blooddrops, and all various visual effect metabolic end product which is NOT needed for proper gameplay at all. All this is created on server as actor and then replicated. These visual effects only need to be unreliably informed to players to be spawned on their side only. Nothing more.
I hope you understand now why, there is still no servers CPU able to host 32 players server in DXMP (when not using latest miniMTL) - so many actors creation and destruction being performed during fights that CPU utilization goes exponentially high with growing number of players.
Actor spawning and destruction causes additional bandwidth utilization.
DXMP creators back in 2000 needed to reduce bandwidth usage - because game was completely unplayable for modem users. Instead of fixing these replication issues I mentioned, they did something else awfully wrong - they modified movement code - so players weren't updating their position so often (upload saturation is the main issue of high pings and lag). Unreal engine has movement code made completely in scripting language. I compared UT movement code with DXMP and figured this out. In my CBP mod (base for AvsH mod), I commented these lines out - and guess what happened? No more movement jittering and lag that we were so used to (I am sure that you have noticed how in DXMP, your movement is constantly being "corrected" for a bit). It is true, that upload in stat net doubled or even trippled, but like I said, who does still use 56k today?
The community back in around 2006 or 2007 wanted to improve gameplay of DXMP, because large portion or maybe even all players already got better PCs and faster net connections (cable, DSL), probably noone used 56k anymore. There was one guy named DestroyerZero who was acting really smart, like he knew everything, but in fact, he was a total phonie and newb. He was saying that the issue of all DXMP net problems were in native library IpDrv.dll (when in fact this library has hardly been changed by DX creators) - it is probably 99% same as in UT game. DestroyerZero recommended upping TickRate. And so servers started using 60 tickrate, sometimes even 100. In UT, even 40 is considered high and only recommended for top servers. In DXMP is no different - if you want smooth gameplay, just scripted net code has to be fixed, nothing more.
As for netspeed. I strongly advise you to use max value - 20000. Why? I am sure your connection can handle 20kb download and 20kb upload or no? If yes, there is no reason to use lower values. Lower values would just cause bandwidth saving, when this is not needed at all and reduced online gaming experience.
It is true that netspeed is somehow linked to framerate. This is certainly engine issue and I have no idea why these vars are linked.
Technology changed so much in 13 years that different approaches need to be used these days. Bandwidth saving is not so important anymore - we only need to target for better gameplay performance, smooth, low ping, quick responses and even if we have to sacrafice larger bandwidth utilization.
|