GhoulofGSG9Join Date: 2013-03-31Member: 184566Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Reinforced - Supporter, WC 2013 - Supporter, Pistachionauts
edited September 2017
Time for a little tech talk!
First of all NS2 utilizes multiple threads to run various tasks at once. With the upcoming 64bit build (which is available at the 64bit steam beta branch but not stable yet) NS2 gets better in distributing those tasks across all CPUs. Also NS2 is able to run more at once because no task has to wait to be able to allocate enough memory to run. Left aside that every task runs a little bit faster thanks to being able to fully utilize the modern CPU now with 64bit instructions.
The image below shows the CPU usage of the 64bit client:
Now some may wonder why not all cores are used by 100%. That's because tasks depend on each other. The render tasks only start after the world has been updated and that depends on various other tasks to finish in time (physics simulation and i/o tasks).
For those of you interested to see details about those things in action type profile into your console and hit space:
That will allow you to see how much time each of the main render pipeline task needed to render given frame. You can also expand each thread's call trace by clicking on the + symbols to see what exactly takes all the time. Use a and d to navigate between frames and space to continue profiling.
Enter profile again into the console to close it.
To make it short as soon as one task takes significant more time to process it slows down every other task depending on it. And that's the issue with NS2. The world update routine is written in Lua using no co-routines and is not very optimized at all. Which means all world entities are updated in order and updating each takes significant CPU time.
So increasing the world updates per second is not feasible without a lot single core power to make sure the world update finishes in time even after the 64bit update.
Though we have been working on optimizing the game logic code in the last year and hope to get those changes out after the 64bit migration has been done.
However there is another reason most who have tried increased rates discarded the idea after testing. There is a lot of game logic code that was not written with the possibility of higher tick rates in mind. So e.g. you have logic routines causing players to take twice as much damage over time when the tickrate gets doubled. To really support higher update rates those lines of codes need to be fixed as well.
Which all in all is a lot of work. We will continue working on it slowly but steady and will let you know if we think higher update rates are finally not only possible but also feasible.
Edit: Added a screenshot and some details about the ingame profiler
Wow nice n clear write-up.
Maybe if making the 'world update routine' faster by rewriting it is too complicated instead apply bottlenecks, building limitations and such to limit how complex the 'world' can be. the 0/200 building caps could be brought to 100 etc
Because 60 is really the sweet spot here. For anything that vaguely competitive and fast paced.
It's one of the number 1 complain from new players getting hit behind covers is it not? that's only the tip of the iceberg.
-Delay for feedback on hitting or getting hit
-Superbullets (2 pistol shots during the same update)
-Weird player to player collision and weird player movement because of the high interpolation
-1 packets lost has big effects
Also if I may add something unrelated because Im too lazy to make another thread, devs should consider removing Aura from the game or nerfing it until it's at equal value with other upgrades. Because since you made shade hive 1st meta with your extreme halucination buff, parasite has become basically irrelevant and alien gameplay, more dumb.
>Because since you made shade hive 1st meta with your extreme halucination buff, parasite has become basically irrelevant and alien gameplay, more dumb.
I always love how different of an experience different people have.
This is not the experience I've had on the servers I play on. Generally on the server(s) I play on losing out on speed or silence means you die before you can get a bite, and this has to be weighed as a cost when going shade first, where you have to prioritize camping and an overall loss of mobility in order to gain either the extra intel, invisibility, or the extra bite power.
And generally, most skulks choose focus over aura. aura is generally reserved for mid lifeforms to avoid walking into a trap, at the cost of healing bites or extra powerful bites. Even in that case it ends up being a clutch because it deprives the team of a focus fade or a focus lerk.
Different strokes for different folks I guess. The overall lesson here should be that we should never assume our experiences are universal.
kk.. and could anyone that actually knows what theyre talking about comment on that?
So as Ghoul just said, Server-side is largely single-threaded. Do note that my use of the word "largely" meant that I considered it the primary bottleneck. You can admit you're wrong now .
... instead apply bottlenecks, building limitations and such to limit how complex the 'world' can be.
- limits implemented
- comm drops a whip late-game
- server: I'm sorry Dave, I'm afraid I cannot do that
Haha funny that late game is exactly when the lag hit the most, 5 gorge biling a base, 10 jetpackers GL rushing a hive, what have you, cant have it all. And notice that's already the way things work right now, you hit 200 servers says nope. It's more a matter of adjusting for the greater good than turning fascist.
Other thing is the number of buildings per room > salvage code from sentry. And also the the player count per server, anything above 10v10 >> deport that lagfest to the arcade tab or AT LEAST force unranked.
Well, if friendly fire were turned on, there wouldn't be that much GL spam going on on the large servers
Unfortunately friendly fire wouldnt solve everything and incidentally would have the potential to have the the opposite effect, not sure. The main issue I guess with GL's is how splash damage (lag) + delay (cheese) + rebound (unpredictable) + high burst (dangerous) + detonate on impact (inconsistent) form almost the perfect combination to outline the weaknesses of the engine/netcode, which is made worst by the fact that structure and player health weren't intended for >7v7 and do not scale. This also makes having many GL less risky because .. there's more of them so less likely to all be reloading so less vulnerable AND more expendable. Then there's also the issue that lag doesnt impact everyone the same (not talking hardware differences), GL jetpack shooting a static target while dodgin around does not have it nearly as hard as the aliens trying to melee them with 3fps. This creates an incentive to look for situation that add lag to your opponent.
HandschuhJoin Date: 2005-03-08Member: 44338Members, NS2 Playtester, NS2 Community Developer
edited September 2017
Well, simply said, No, I don't care about lag in that case...
Just one thing... imagine playing on any 10+vs 10+ server on tram... Marines want to Arc Warehouse - 7 Arcs are rolling and the marines have 2+ GLs constantly spamming GLs into the arcs... what can you do as aliens? Baserush of course, but defending Northtunnels feels like a fucked up game...
I think it's a poor designchoice to have the possibility to do splashdamage inside of your own marines like that with that high playerdamage... you blow up a fullhp lerk with onehit, but the marine with 30 hp beside him doesn't die? Even if it would only damage the marines armor would be fine... Anything which involves random "spam" like that is just the antidefinition of "fun" for me.
@Handschuh Well for starters you can bilebomb and ink and healwave. But yea it's not an easy hold. With or without grenade launchers. Actually in a way I think the scenario you put forth, a flamethrower is way more aggravating than GLs. As 1 flamethrower can cancel all the bilebombs.
But why ignore everything that let up to the situation where aliens LET marines get 7 arcs AND an advanced armory. That's well over 100 tres investment, including observatories and armory blocks and robo. Easily the difference between 0/0 and 1/3 upgrades in terms of resources. If marines got their upgrades _first_ before getting these arcs, then I think it's fair to assume that aliens also have all their lifeforms up at this point, including onos and umbra.
You could just as easily have said, imagine playing on any 10+vs 10+ server on any map, and skulks just come in and xenocide over and over and contaminate... what can you do as marines? Context is missing.
Even in competitive games, where we have FF, do you EVER find yourself in a situation where you worry about splashing on your team mates? Iirc it's like 33% FF, there's nothing wrong with shooting grenades in to your team mates or arcs for that matter in comp. You just medpack him and weld him up in worst case scenario. Hell I'll even shotgun team mates if there's a chance I can make a shot on a lifeform Idc. Now grenadelaunchers are not that common in comp, but it's sure as fuck not because people are scared of the FF.
Add friendly fire, in the grand scheme of things, I don't really care either way. I just wouldn't expect it to solve _anything_ at all.
Not true it would fix the nonsense and braindead aspect of shooting AOE nukes blindly at your teammates without repercussion which feels weird, too easy, broken and unfair.
FF in public games would matter more because less and less accurate meds, more people to med.
HandschuhJoin Date: 2005-03-08Member: 44338Members, NS2 Playtester, NS2 Community Developer
I think spamming just takes away any chance to play the game with niveau or skill
Of course there are options but any kind of situation where GL spam leads to a win is mostly zero fun for the alienside at all.. especially with the flaws the gl provides... dodging it is as weird as dodging spits as marine and the superbig grenade hitbox does the rest
quite some games on pubs are funnily enough won by this because you cannot run from any gl as lifeform...
Personally i think i can deal with it because I don't wait to see or hear the gl shoot like i did in ns1 but rather I expect when he shoots and dodge like that
but seeing a lot of ppl leave mid-game once marines get several GLs should make you wonder
@Handschuh
I won't go so far as to say it takes away skill. But yes GL spam is frustrating, even in games where they are considered well-designed like Quake!
NS2 is primarily a hitscan game, for better or for worse, and any amount of projectiles will add frustration, whether they work well or not. I don't think there is a good solution to this problem. I'm generally a person that's for removing content that causes too many problems, but in this case, NS2 is already deprived of projectile style gunplay, and I consider that one of NS2's major flaws in appealing to the mainstream.
I do have one radical suggestion though. The railgun exo is insanely frustrating as well. So how about we kill two birds with one stone. Change railgun exo in to a Rocket launching exo (This could radically reduce spam), and remove Grenade launcher and perhaps replace that with something different, maybe even a handheld SINGLE-railgun? Single railgun is considerably less frustrating than dual railgun and you you retain the squishiness of a marine so it's actually killable.
To recap, the benefits of this change is:
1. Reduce grenade spam, because exos are more expensive and riskier to buy in bulk and non-recycable.
2. Increase the viability of a projectile style weapon.
3. Makes railgunners more squishy and less powerful and actually killable (and ammo dependent! No more rail spamming.).
4. The work is probably not easy with new animations and whatnot, but I will say the railgun code is mostly already there, and the rocketlauncher should just be a slightly modified grenade launcher.
Comments
First of all NS2 utilizes multiple threads to run various tasks at once. With the upcoming 64bit build (which is available at the 64bit steam beta branch but not stable yet) NS2 gets better in distributing those tasks across all CPUs. Also NS2 is able to run more at once because no task has to wait to be able to allocate enough memory to run. Left aside that every task runs a little bit faster thanks to being able to fully utilize the modern CPU now with 64bit instructions.
The image below shows the CPU usage of the 64bit client:
Now some may wonder why not all cores are used by 100%. That's because tasks depend on each other. The render tasks only start after the world has been updated and that depends on various other tasks to finish in time (physics simulation and i/o tasks).
For those of you interested to see details about those things in action type profile into your console and hit space:
That will allow you to see how much time each of the main render pipeline task needed to render given frame. You can also expand each thread's call trace by clicking on the + symbols to see what exactly takes all the time. Use a and d to navigate between frames and space to continue profiling.
Enter profile again into the console to close it.
To make it short as soon as one task takes significant more time to process it slows down every other task depending on it. And that's the issue with NS2. The world update routine is written in Lua using no co-routines and is not very optimized at all. Which means all world entities are updated in order and updating each takes significant CPU time.
So increasing the world updates per second is not feasible without a lot single core power to make sure the world update finishes in time even after the 64bit update.
Though we have been working on optimizing the game logic code in the last year and hope to get those changes out after the 64bit migration has been done.
However there is another reason most who have tried increased rates discarded the idea after testing. There is a lot of game logic code that was not written with the possibility of higher tick rates in mind. So e.g. you have logic routines causing players to take twice as much damage over time when the tickrate gets doubled. To really support higher update rates those lines of codes need to be fixed as well.
Which all in all is a lot of work. We will continue working on it slowly but steady and will let you know if we think higher update rates are finally not only possible but also feasible.
Edit: Added a screenshot and some details about the ingame profiler
Maybe if making the 'world update routine' faster by rewriting it is too complicated instead apply bottlenecks, building limitations and such to limit how complex the 'world' can be. the 0/200 building caps could be brought to 100 etc
Because 60 is really the sweet spot here. For anything that vaguely competitive and fast paced.
It's one of the number 1 complain from new players getting hit behind covers is it not? that's only the tip of the iceberg.
-Delay for feedback on hitting or getting hit
-Superbullets (2 pistol shots during the same update)
-Weird player to player collision and weird player movement because of the high interpolation
-1 packets lost has big effects
Also if I may add something unrelated because Im too lazy to make another thread, devs should consider removing Aura from the game or nerfing it until it's at equal value with other upgrades. Because since you made shade hive 1st meta with your extreme halucination buff, parasite has become basically irrelevant and alien gameplay, more dumb.
I always love how different of an experience different people have.
This is not the experience I've had on the servers I play on. Generally on the server(s) I play on losing out on speed or silence means you die before you can get a bite, and this has to be weighed as a cost when going shade first, where you have to prioritize camping and an overall loss of mobility in order to gain either the extra intel, invisibility, or the extra bite power.
And generally, most skulks choose focus over aura. aura is generally reserved for mid lifeforms to avoid walking into a trap, at the cost of healing bites or extra powerful bites. Even in that case it ends up being a clutch because it deprives the team of a focus fade or a focus lerk.
Different strokes for different folks I guess. The overall lesson here should be that we should never assume our experiences are universal.
So as Ghoul just said, Server-side is largely single-threaded. Do note that my use of the word "largely" meant that I considered it the primary bottleneck. You can admit you're wrong now .
- limits implemented
- comm drops a whip late-game
- server: I'm sorry Dave, I'm afraid I cannot do that
Haha funny that late game is exactly when the lag hit the most, 5 gorge biling a base, 10 jetpackers GL rushing a hive, what have you, cant have it all. And notice that's already the way things work right now, you hit 200 servers says nope. It's more a matter of adjusting for the greater good than turning fascist.
Other thing is the number of buildings per room > salvage code from sentry. And also the the player count per server, anything above 10v10 >> deport that lagfest to the arcade tab or AT LEAST force unranked.
"We can reduce GL spam. We have the technology."
Unfortunately friendly fire wouldnt solve everything and incidentally would have the potential to have the the opposite effect, not sure. The main issue I guess with GL's is how splash damage (lag) + delay (cheese) + rebound (unpredictable) + high burst (dangerous) + detonate on impact (inconsistent) form almost the perfect combination to outline the weaknesses of the engine/netcode, which is made worst by the fact that structure and player health weren't intended for >7v7 and do not scale. This also makes having many GL less risky because .. there's more of them so less likely to all be reloading so less vulnerable AND more expendable. Then there's also the issue that lag doesnt impact everyone the same (not talking hardware differences), GL jetpack shooting a static target while dodgin around does not have it nearly as hard as the aliens trying to melee them with 3fps. This creates an incentive to look for situation that add lag to your opponent.
Just one thing... imagine playing on any 10+vs 10+ server on tram... Marines want to Arc Warehouse - 7 Arcs are rolling and the marines have 2+ GLs constantly spamming GLs into the arcs... what can you do as aliens? Baserush of course, but defending Northtunnels feels like a fucked up game...
I think it's a poor designchoice to have the possibility to do splashdamage inside of your own marines like that with that high playerdamage... you blow up a fullhp lerk with onehit, but the marine with 30 hp beside him doesn't die? Even if it would only damage the marines armor would be fine... Anything which involves random "spam" like that is just the antidefinition of "fun" for me.
But why ignore everything that let up to the situation where aliens LET marines get 7 arcs AND an advanced armory. That's well over 100 tres investment, including observatories and armory blocks and robo. Easily the difference between 0/0 and 1/3 upgrades in terms of resources. If marines got their upgrades _first_ before getting these arcs, then I think it's fair to assume that aliens also have all their lifeforms up at this point, including onos and umbra.
You could just as easily have said, imagine playing on any 10+vs 10+ server on any map, and skulks just come in and xenocide over and over and contaminate... what can you do as marines? Context is missing.
Even in competitive games, where we have FF, do you EVER find yourself in a situation where you worry about splashing on your team mates? Iirc it's like 33% FF, there's nothing wrong with shooting grenades in to your team mates or arcs for that matter in comp. You just medpack him and weld him up in worst case scenario. Hell I'll even shotgun team mates if there's a chance I can make a shot on a lifeform Idc. Now grenadelaunchers are not that common in comp, but it's sure as fuck not because people are scared of the FF.
Add friendly fire, in the grand scheme of things, I don't really care either way. I just wouldn't expect it to solve _anything_ at all.
Not true it would fix the nonsense and braindead aspect of shooting AOE nukes blindly at your teammates without repercussion which feels weird, too easy, broken and unfair.
FF in public games would matter more because less and less accurate meds, more people to med.
Of course there are options but any kind of situation where GL spam leads to a win is mostly zero fun for the alienside at all.. especially with the flaws the gl provides... dodging it is as weird as dodging spits as marine and the superbig grenade hitbox does the rest
quite some games on pubs are funnily enough won by this because you cannot run from any gl as lifeform...
Personally i think i can deal with it because I don't wait to see or hear the gl shoot like i did in ns1 but rather I expect when he shoots and dodge like that
but seeing a lot of ppl leave mid-game once marines get several GLs should make you wonder
@Handschuh
I won't go so far as to say it takes away skill. But yes GL spam is frustrating, even in games where they are considered well-designed like Quake!
NS2 is primarily a hitscan game, for better or for worse, and any amount of projectiles will add frustration, whether they work well or not. I don't think there is a good solution to this problem. I'm generally a person that's for removing content that causes too many problems, but in this case, NS2 is already deprived of projectile style gunplay, and I consider that one of NS2's major flaws in appealing to the mainstream.
I do have one radical suggestion though. The railgun exo is insanely frustrating as well. So how about we kill two birds with one stone. Change railgun exo in to a Rocket launching exo (This could radically reduce spam), and remove Grenade launcher and perhaps replace that with something different, maybe even a handheld SINGLE-railgun? Single railgun is considerably less frustrating than dual railgun and you you retain the squishiness of a marine so it's actually killable.
To recap, the benefits of this change is:
1. Reduce grenade spam, because exos are more expensive and riskier to buy in bulk and non-recycable.
2. Increase the viability of a projectile style weapon.
3. Makes railgunners more squishy and less powerful and actually killable (and ammo dependent! No more rail spamming.).
4. The work is probably not easy with new animations and whatnot, but I will say the railgun code is mostly already there, and the rocketlauncher should just be a slightly modified grenade launcher.