Natural Selection 2 News Update - On NS2 performance
Flayra
Game Director, Unknown Worlds EntertainmentSan Francisco Join Date: 2002-01-22 Member: 3Super Administrators, NS2 Developer, Subnautica Developer
Comments
but the pessimist in me says people will be satisfied with a 4-5GHz 30-tick server.
Let's assume that Spark and as such NS2 is here to stay for a while.
And CPU's are usually there to stay and have an higher lifetime in terms of "performance" then GPU's have.
So a PC game being mostly CPU limited is always an good thing to me, means that down the line many people will be able to play on "average computers" as CPU speeds/core numbers keep increasing at high rates. So future PC's will have an easier time running this baby without having to depend too much on an "high end gaming GPU" being inside that same PC.
Kinda reminds me of Raytracing in some ways and why it would be a great thing to use for videogames.
I also like how the NS2 seems to outsource a lot of logic to the server CPU, this is akin to the general trend of cloud computing that outsources a lot of logic/workload to the server side to remove some strain on the client side calculations. But i don't have any deep programming experience so i'm not sure how stupid/wrong the correlations and observations i'm making here actually are ;)
They are still getting faster overall, you can't ignore that "clock speeds" between architectures also don't translate seamlessly in terms of performance.
Newer architectures usually work more efficient/performant with slower clockspeeds compared to older architectures at the same speeds. Regardless of number of cores.
And as such a CPU limited game usually tends to be one with more "lasting appeal".
Most office and budget PC's cut down on the GPU as the GPU is an piece of hardware that iterates more often compared to the CPU. But performance jumps between GPU generations are usually not the drastic compared to performance jumps with new CPU generations. Anyway, it's great how many sentences we can write and end up basicly arguing for the same thing ;)
On another note I am asking this because I have no background in programming but say if I wanted to create a game using this engine and LUA, and the game logic isnt as complex as the one in NS2 ( I am talking about the whole layer so including UI, how structures work, weapons etc ) lets say something like Counter Strike for argument's sake will the client/server run smoother if it has less lines of code giving that it is allso well optimized? and will it be a huge difference or very small and barely noticeable?
It's also great to hear you've got the main culprit of the performance issues pinned down! I'm sure you'll figure a way to make it work before summer's over.
Just trolling :P
As I remember the Luajit approach did not work out and I see how migrating some parts of the game code to another language is neither a clean solution nor does it help the ease of modding that you want to pursue, but if there is no other way to squeeze out performance, would that be possible?
Migrating just the most called functions like line of sight-tracing or the pathing of AI entities to precompiled code sounds like last measure method with a huge potential.
Apart from that, which networking model is NS2 using? I have recently seen an interesting talk from one of the programmers at Bungie about their networking with a priority system based on analyzed player stats where many entities would not even be considered for a refresh for several seconds. I imagine such a priority system would be possible to write pre-compiled as modders really don't need to touch that (assuming the server is written entirely in Lua atm).
Quake 3 was a 30 tick game and Quake Live only uses 40, I've always wondered why Source games ran at such high tickrates to feel good for hitreg.
What about the dot functions (e.g. Alien.GetFrictionForce), are those written in lua ? I'm a bit confused because methods are normally called with colon in lua (Alien:GetFrictionForce).
I'd love to have more technical informations about the lua vm optimization, sounds like an interesting subject.
offtopic but this line instantly made me think of a piece of art.
"...and explains where we are, how we got here, and where we're going."
Paul Gauguin - Where Do We Come From? What Are We? Where Are We Going?
Let's just hope UWE don't suddenly have enough of all of us and run away to Polynesia with no money but lots of talent.
I am a big fan of NS1 and preordered NS2 already back in 2009 (for me and a friend) and want NS2 to succeed.
In my opinion you should consider extrem drastic actions like getting rid of LUA/FLash/etc almost entirely (except for some perfomance uncritical parts)
and rewirtting the code in C++.
I know that this is a lot of work and would also make modding very hard, but you should always keep in mind that the shooter part of your game is only fun if it is fluent and it makes up for a big part of the gameplay.
98% of all mods will be something like siege maps for NS1 that dont need a lot of LUA scripting to make them.
If the server start lagging with 16 player and you dont get a fluent FPS experience with a typical high end pc, then the rest of the game does not matter any more.
Short Version:
Modding capabilities should always come second to the perfomance of NS2
(excuse my bad english :>)
I am a big fan of NS1 and preordered NS2 already back in 2009 (for me and a friend) and want NS2 to succeed.
In my opinion you should consider extrem drastic actions like getting rid of LUA/FLash/etc almost entirely (except for some perfomance uncritical parts)
and rewirtting the code in C++.
I know that this is a lot of work and would also make modding very hard, but you should always keep in mind that the shooter part of your game is only fun if it is fluent and it makes up for a big part of the gameplay.
98% of all mods will be something like siege maps for NS1 that dont need a lot of LUA scripting to make them.
If the server start lagging with 16 player and you dont get a fluent FPS experience with a typical high end pc, then the rest of the game does not matter any more.
Short Version:
Modding capabilities should always come second to the perfomance of NS2
(excuse my bad english :>)<!--QuoteEnd--></div><!--QuoteEEnd-->
Kinda agree here. This:
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->That is what Max is spending much of his time on right now. In fact, a programmer who shall not be name believes that the new 'Lua Virtual Machine' could cut Lua CPU usage in NS2 by 50%. This would yield a performance improvement of 25% at least, and likely more. Add that to the 'Hydra' style Lua optimisation and the improvement numbers start to look very, very attractive.<!--QuoteEnd--></div><!--QuoteEEnd-->
So, <b>at best</b>, this will result in a 25% performance increase (btw. I thought this was already done).
Of course this increases FPS and playability, but i.e. on the server side, at least a 100% perf. increase is needed (which is your goal for release apparently).
I hope you can pull it through but I also urge to think about more drastic actions. And the argument that being CPU bound is a good thing must be the joke of the week. CPU being the bottleneck is the worst thing that can happen to your game, since players can not "fix" it by lowering the graphics settings (especially important for competitive scene).
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->What about the dot functions (e.g. Alien.GetFrictionForce), are those written in lua ? I'm a bit confused because methods are normally called with colon in lua (Alien:GetFrictionForce).<!--QuoteEnd--></div><!--QuoteEEnd-->
Rewriting everything would probably take way too long. But I agree that performance is more important that moddability; if the game don't run well nobody will want to mod it anyway.
allso can someone with knowledge of programming answear my question on the first page post nr: 12
Why? Unless you're going to provide some arguments to back you up, I'm going with w0dk4's argument:
<!--quoteo(post=1925604:date=Apr 15 2012, 01:10 PM:name=w0dk4)--><div class='quotetop'>QUOTE (w0dk4 @ Apr 15 2012, 01:10 PM) <a href="index.php?act=findpost&pid=1925604"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->CPU being the bottleneck is the worst thing that can happen to your game, since players can not "fix" it by lowering the graphics settings.<!--QuoteEnd--></div><!--QuoteEEnd-->
---
If there are problems, let's be honest about them and see what can be done about them rather than trying to see a silver lining in places where it doesn't exist.
You've explained it to the bone.