Hope Of Better Performance
rmbrown09
Join Date: 2012-10-17 Member: 162592Members
<div class="IPBDescription">+ Far Cry 3 Thoughts</div>This semester I worked a lot in Python. Great language, easily understood. Does some great things in nothing but an interpreter. Its major issue is of course, that it is not a compiled language like C++ or C. No matter how great Python may be, it will never be faster than C++. It's in the nature of how it runs.
(Aside from Jython, but you know what I'm saying)
Now I am not familiar with Lua. From what I understand though it's a lot like Python. Runs slower but is easier to work with. That being said is there any actual hope that the devs can actually optimize the game run at a much better level? I just beat Far Cry 3. Btw an absolutely amazing game. Best single player I may have ever played actually. Far Cry 3 looks gorgeous, huge environments and tons of detail. Runs like a dream. NS2 however while still looking good, runs worse, just under max settings in environments a quarter of the size. I just can't help but think maybe the optimization is near a wall. An asymptote of performance that cannot be surpassed based on what the game was written in. Anyways, hoping someone with more programming // Lua knowledge can fill me in on this.
(Aside from Jython, but you know what I'm saying)
Now I am not familiar with Lua. From what I understand though it's a lot like Python. Runs slower but is easier to work with. That being said is there any actual hope that the devs can actually optimize the game run at a much better level? I just beat Far Cry 3. Btw an absolutely amazing game. Best single player I may have ever played actually. Far Cry 3 looks gorgeous, huge environments and tons of detail. Runs like a dream. NS2 however while still looking good, runs worse, just under max settings in environments a quarter of the size. I just can't help but think maybe the optimization is near a wall. An asymptote of performance that cannot be surpassed based on what the game was written in. Anyways, hoping someone with more programming // Lua knowledge can fill me in on this.
Comments
It's a shame, because so many posts are started on balance, and people always digress from the most obvious sticking point: PERFORMANCE IS BAD. You can not aim with bad frame rates, which is playing as a marine is so much more punishing. This isn't even considering the hit registration anomalies.
- Move stuff in the game code to the engine
- Make the connection between the Lua and C++ layers faster
- Optimize the Lua code
Having been around since the Engine test, UWE has improved the performance of NS2 by over an order of magnitude. Its just an issue of time till they improve it further.
Far cry 3 does <b><u>NOT</b></u> run like a dream, directx 11 performance is crappy as hell.
I wont comment on the "best single player" because thats your personal opinion, which i do <u><b>NOT</u></b> share.
I wont comment on the "best single player" because thats your personal opinion, which i do <u><b>NOT</u></b> share.<!--QuoteEnd--></div><!--QuoteEEnd-->
Well I ran it on ultra at 1440p with no MSAA and had 60 fps the entire time more or less. NS2 I get 50's in infestation, 30's in huge fights and 60's the rest of the time but that's with atmospherics off. After the last patch i turned ambient occlusion to max and held the same rate.
Sorry but personally I am in love with the game. Beat the pants off any Elder Scrolls I have played and I would say that's the closest thing you can really compare too.
I am asking so that I, and perhaps others, can make comparisons between the two games in regards to how they perform.
Thankyou.
I am asking so that I, and perhaps others, can make comparisons between the two games in regards to how they perform.
Thankyou.<!--QuoteEnd--></div><!--QuoteEEnd-->
Nearly every AAA game is written almost (if not) entirely in C++.
edit: so it's most likely C++.
<a href="https://github.com/maxmcguire/rocket" target="_blank">https://github.com/maxmcguire/rocket</a>
(Aside from Jython, but you know what I'm saying)
Now I am not familiar with Lua. From what I understand though it's a lot like Python. Runs slower but is easier to work with. That being said is there any actual hope that the devs can actually optimize the game run at a much better level? I just beat Far Cry 3. Btw an absolutely amazing game. Best single player I may have ever played actually. Far Cry 3 looks gorgeous, huge environments and tons of detail. Runs like a dream. NS2 however while still looking good, runs worse, just under max settings in environments a quarter of the size. I just can't help but think maybe the optimization is near a wall. An asymptote of performance that cannot be surpassed based on what the game was written in. Anyways, hoping someone with more programming // Lua knowledge can fill me in on this.<!--QuoteEnd--></div><!--QuoteEEnd-->
The amount of "faster" you're referencing isn't usually a bottleneck for game programming. Unity is pretty simple with how it handles code to NS2.
Translation : "i don't know much about video games"
Anyway i don't have any hope about perfomance. We'll probably have to deal with that awful fps for many many months if not forever.
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Licensed by: Electronic Arts, Lionhead, Raytheon, Gas Powered Games, Mcafee, Big Huge Games, Creative Assembly, A2M, NCSoft, High Voltage, Playfirst, Riot Games and dozens of others.<!--QuoteEnd--></div><!--QuoteEEnd-->
I assume they are ahead of the pack in terms of Lua usage. Its a pretty slow language to base all the game logic on.
Hopefully UWE will find a black hole they never knew existed and fix it, then we all get rock-stable performance.
CPU? GPU?
CPU? GPU?<!--QuoteEnd--></div><!--QuoteEEnd-->
for my case it's cpu, the game chews my i53570k @ 4.5 like there is no tomorrow.. how do i know? early game is roughly 100 fps, mid game 50-70, end game 20-30. and no graphic adjustment yields any fps increase. graphics card is zotac gtx 680 4gb edition
Python is a programming language that is categorized as "high level", which is pretty much short for "easy to understand and read" as opposed to "low level" which dips down into c# C++ and Assembly.
Python is up there in the ranks of Java, Perl, PHP and Visual Basic / Basic as part of the more 'well known' programming languages, Other than that there's ruby and some other stuff down along the line.
high level means it is first compiled downwards to the level of the 'high' interpreter which can be C++ or C#, of which it receives it's instructions fron and is compiled downwards further into Assembly which is the lowest you can go.
Allright, enough about that, LUA like Actionscript for flash or Javascript for websites or Unreal script (for unreal games) or any thing that has the word 'script' in it is a 'scripting' language. Most of them are based upon populair low level entries like C++ and C# as far as its 'syntax' is concerned.
But they are, and remain scripting languages.
A scripting language basically runs on an engine that incorporates several functions and libraries into a front that you can approach with this scripting language.
Lets say you write a function in C++ and gave it a bunch of paramters, then that function takes care of all the internal memory managing and typecasting and error checking.
Lua uses this function and you can enter its parameters, without the scare of it crashing if you enter the wrong things or leave them empty.
The game engine currently in use by UWE uses this as an interpreter for the core game mechanics which ARE written in C# and C++.
Lua is used as a catalyst in this manner to speed up the process without too much complex designs.
So when you got an idea you can pretty much implement a quick showcase, without months of interior engine design.
The Lua code written is inherent which means it will only be as fast as the parent that runs it, in this case, the engine written in C++.
Whenever you see changes to the game that have much to do with graphical stuff and fixes, it's mostly done so to the engine (which is c++) rather than the game itself. (which is Lua)
Hope that clears things up a little.
Ninja edit:
As far as performance goes that really is the engine running the game currently, it just needs a lot of optimizing. Like i said, the game will only run as fast as the engine allows, so they've got to start cutting corners everywhere to make things run smoother. It just takes time, buy a better rig or upgrade your current one if you want it to make a difference.
I picked up this 1200$ pc last year around this time, and it runs smooth as balls. I imagine what you can get for that price will be twice as good now than it was then.
aaaaaand i had just ordered a rig with 3570k as the cpu in hopes of i could get better fps than my current 5year old q9300.
The fps values you gave are mostly like my current rig.
How can this be? I don't wanna believe this or i will get crushed :<
5yo q9300 @ 3.5ghz = 3570k @ 4.5ghz ?
It's a shame, because so many posts are started on balance, and people always digress from the most obvious sticking point: PERFORMANCE IS BAD. You can not aim with bad frame rates, which is playing as a marine is so much more punishing. This isn't even considering the hit registration anomalies.<!--QuoteEnd--></div><!--QuoteEEnd-->
Why is bringing up farcry 3 a bad thing? It serves as a benchmark for performance, given it looks substantially better, has far more effects (dynamic lighting etc), much more rendered at once and was released at the same time it shows just how poor performance is at the same time. As for it getting better? From here on in I doubt it tbh..
Similar situation happened on EVE Online's servers some time ago. For those that don't know, EVE Online only has one server and it runs on Python. Universe itself is made out of hundreds of star systems and those start systems and everything in them are handled by nodes (instanced dungeons in wow is the equivalent). Problem was, because Python was single threaded, they couldn't allocate resources between different nodes. This means a star system has a fixed node where all calculations are handled by the capacity of that node (generally a single cpu), regardless of the load itself.
EVE Online's shardless environment means, potentially, every single person on the server can enter a single star system and either crash the node (not the whole server cluster), or grind everything to a halt. Trade zones like Jita (1500+ players at any given time) has been given their own special node to combat the effects, but this still wasn't enough because the next door system might have had 10 players in them and the that node would idle at 10% while Jita was suffering. Being unable to allocate resources also meant large scale fleet battles being extremely painful. This was such a problem in fact, CCP (developers) have announced a fleet notification system where an alliance could report where they were going to attack in 3 days advance so that CCP could reinforce the node before hand.
Most of those issues were fixed by developers switching to Stackless Python, which is different Python interpreter specialized on multithreaded applications (or microthreads specifically).
I could go on and describe everything in excruciating detail, but I think I made the point. Important thing to know is, EVE Online's server literally is classified as a supercomputer (largest in gaming history), and they are using Python with it. Over the years performance have made great strides and now even 1.5k+ battles can be played without getting a black screen for 4 hours like it used to 3-4 years ago.
How does this relate to NS2? Well, the server performance is a real issue as you all know, up to the point where servers advertise their overclocked properties on their names. Player performance is also abysmal and playing the game on high settings with 1080p res with 45+ FPS pretty much requires 4Ghz+ CPU, regardless of the core count. LUA and Python is similar enough in this case (both run on VMs), but LUA lacks a solution like Stackless Python. That limits the improvements to either refining the code (which is extremely limited unless the code is a mess which I doubt), or improvements in the Virtual Machine itself, which is rather like biting way more than one can chew. I think I saw them mentioning running multiple virtual machines, but I highly doubt the feasibility of such a project in the long term.
Unless someone comes up with a highly optimized LUA Virtual Machine or, UWE makes one themselves, I highly doubt the performance will improve. Latest patch and performance improvements were actually based on rendering pipeline, which in past, they made it clear wasn't a problem.
I think the unnatural long development cycle of NS2 made UWE bet on the wrong paradigms early on and they couldn't switch once they realized they were wrong, because of how committed they already were. Kind of like SOE and Everquest 2, where early in development (2000-2001) SOE bet on ultra high speed single core processors and the market instead headed towards multicore performance. To this day Everquest 2 barely uses more than 1 core and even Planetside 2, which is loosely based on EQ2 engine still struggles with multithreading.
Edit: When I say multithreading, I mean concurrency and properly implementing it. I don't mean the thread count or process count.
They have touted the LUA nature of the game logic as major selling point, and to be honest it is for alot of us. I can open files and see the logic they are using, change things and make steam workshop mod in minutes. On your end, you can get alot of mods very easily. And mods that can change far more than most games will allow.
Also Uruktos, nice post and I expect you are right. I hadn't thought many games were multi-threaded though, at least not on the client side. Client performance should not be suffering if this is just a server multi-threading issue.
And especially odd is that lot of i5 owners complain about performance (or generally, intel). But my performance is just great, it doesn't get below 60fps and I have 1100t 4.1ghz with GTX670 DiCu II. So yeah, perhaps there is an issue with intel specially?
And I also have not met a game that directly performs better from multiple cores. Reason why some 4-cores perform better than GHZ equivalent dualcores are stuff like FLOPS (which is not only based on GHZ) and also extra processes chew up dualcores while they don't chew up really 3-cores or more.
Shouldn't video settings mostly influence performance if there is a GPU bottleneck?
So maybe there is potential to outsource CPU tasks to GPU?
6 months is a long time. There was a drastic difference in performance from where the game was 6 months ago to what it is now.
Max has a very large list of ideas for ways in which to improve the performance, and there is already work being done off of that list.
<!--quoteo(post=2046300:date=Dec 15 2012, 07:37 PM:name=YMICrazy502)--><div class='quotetop'>QUOTE (YMICrazy502 @ Dec 15 2012, 07:37 PM) <a href="index.php?act=findpost&pid=2046300"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->How much performance do you think they can give us in general? I mean I do not see more than a 10% increase.<!--QuoteEnd--></div><!--QuoteEEnd-->
The stats from this last patch showed an average framerate increase of 12% across the board, on both min and max FPS. Yes, not everyone saw the improvements, since there is a wide variety of different systems out there, but we are moving forward on the performance side. In particular we know we need to target the min framerates that people are getting in combat, and bring that up quite a bit, and that is what we are focusing on. We're doing a lot of profiling, in order to find the biggest offenders in the game causing low FPS.
It is not like there is a wall, that we hit with performance, and suddenly the game can't be optimized any further. There is always more that can be done to optimize the game, depending on how much time and energy gets put into it. So, yes, as we've been saying all along, it is going to take some time, but we can definitely get the game running significantly faster then it currently is for a wider range of people.
--Cory
It is not like there is a wall, that we hit with performance, and suddenly the game can't be optimized any further. There is always more that can be done to optimize the game, depending on how much time and energy gets put into it. So, yes, as we've been saying all along, it is going to take some time, but we can definitely get the game running significantly faster then it currently is for a wider range of people.
--Cory<!--QuoteEnd--></div><!--QuoteEEnd-->
Can't wait to see the difference when my rma comes in next week. I'm just used to playing other games where devs tend to give a 5-10% increase and then nothing so I assumed there were always walls. Glad to hear there is more coming.
- Move stuff in the game code to the engine
- Make the connection between the Lua and C++ layers faster
- Optimize the Lua code
Having been around since the Engine test, UWE has improved the performance of NS2 by over an order of magnitude. Its just an issue of time till they improve it further.<!--QuoteEnd--></div><!--QuoteEEnd-->
The Unreal Engine actually compiles it's UnrealScript scripting language to bytecode that is faster to interpret by the parser than plain text, of course. Very common functions get specific enumerated bytecodes assigned that relate to native C++ implementations of that functions, which are even faster to execute then.
I wonder if Lua does something similar.
I wonder if Lua does something similar.<!--QuoteEnd--></div><!--QuoteEEnd-->
I would imagine so, I work as a programmer with a scripting language and from what I understand, it's fairly standard practice to compile scripts down to bytecode for faster running. A quick search came up with this: <a href="http://stackoverflow.com/questions/8936369/compile-lua-code-store-bytecode-then-load-and-execute-it" target="_blank">link</a> on how to do it. i'm not sure if UW takes advantage of that or if it's something they decided against for other reasons.
I wont comment on the "best single player" because thats your personal opinion, which i do <u><b>NOT</u></b> share.<!--QuoteEnd--></div><!--QuoteEEnd-->
Wow, vent somewhere else.