Development Blog Update - Multi-threading dev video
Flayra
Game Director, Unknown Worlds EntertainmentSan Francisco Join Date: 2002-01-22 Member: 3Super Administrators, NS2 Developer, Subnautica Developer
Comments
so it got rejected by ensl.org :(
btw.: for HalfLife there is a metamodplugin which bypasses the hardcoded 1000fps limit from the server
and a friend of mine runs a cs server on an i5 with 3,4ghz at around 40 000 fps!
and a friend of mine runs a cs server on an i5 with 3,4ghz at around 40 000 fps!<!--QuoteEnd--></div><!--QuoteEEnd-->
Counter-Strike doesn't have a lot going on in comparison to NS1\2, so while Lua does bugger up NS2's performance generally, it's gameplay-mechanics are still pretty heavy. If it was written in C\C++ like CS we certainly wouldn't be seeing performance anywhere near (a hypothetical) 40.000 FPS.
As for the multi-threading, the video told most of it pretty much, everything that is easily threaded already is at this point (level-loading, physics, netcode, file-IO), the thing that is really holding the performance down is the game-logic (eg. the Lua-script), and multi-threading that in a conventional manner is neigh impossible. Well... strictly speaking not impossible, in fact pretty easy, keeping the cores buzy with USEFUL work however (eg. not waiting for mutex-locks all the time) demands very clever engineering-design.
Multi-threading would be a preferred method, as something along the lines of LuaJIT with FFI might still not yield enough performance in terms of C interacting with Lua (which is a pending problem with Spark, and I've started to really run into it myself).
<a href="http://www.youtube.com/watch?v=Dt8_lShjatg" target="_blank">http://www.youtube.com/watch?v=Dt8_lShjatg</a>
Im against using multi threading on online changes, server processes and some other sync based cloud operations which must be sync between server and clients. Because that makes line busy, much more lags, chokes, regs etc. That is important point.
On the otherhand multi-threading, multi-core, multi-cpu, multi-gpu is highly needed for;
- Physics (all collisions, kinematics, particullar eftects etc.)
- Rendering and Lighting
- Water effects (3D waving or some navier-stokes equation applications, shining, transparency)
- Gas and some other effects
- Other matrix based real-time effects or calculations (may be in infestation effects etc.)
are the must.
In conclusion multi-threading is only good if its results are not used in online send packages.
Also this slogan can be used (with a good grammer) :D
"NS2 is not only powerfull by its engine but also by its multi-treading."
PS: I listen video but I didnt understand all cuz u speak too fast :D Forgive me if I miss something
PS2: Please enable Physics-GPU, Thanx
Single cores can do any kind of multi-threading (even slightly faster, due to the lack of overhead, eg. scheduling et cetera). Multi-threading however is very often less efficient, and makes up for that by throwing a lot of power (cores) into the process, thus allowing in the end a better performance than single-cores (but again, worse efficiency). Simply put, if single-threaded code is re-written\designed for multi-threading, chances are a single-core CPU will indeed experience worse performance (due to the less efficient design, which is capable of utilizing multiple cores, but that advantages does you no good with just 1 core).
Yes, multi-threading must be available for multi core, gpu systems. If there is one core, all effects should be off or should be low with users options.
And multi-threading can be done with many single core cpu based PCs via internet, but it is not usefull for an online game like NS2,CS, HL games :D
U dont need to write whole code for multi threading. i.e. u can write for only water calculations. Engine of this game is really heavy for a single core in comparision with MW3, Skyrim, BF3 .
PS: Please remember, while most of us have multi core CPUs, most of us don't have multicore GPUs....and I wouldn't expect that to change by time of release. Maybe one of those '1 year later out of the blue shock my socks off patches' for multi GPU, and just focus (pardon the game pun) on multi core CPUs in the mean time?
It is standard for anything you want to run fast, but most people seem to think it's just a magic line of code "multithread this", while it is actually a very complex problem.
It is for physics\file-IO\networking\sound and such, not for game-logic.
now back on topic, "When will we get to see the first build with multi threading enabled?"
This is because they're not finalized yet. If there had been a requirements list for just a few versions ago, it would have been much higher than for build 19x.
now back on topic, "When will we get to see the first build with multi threading enabled?"<!--QuoteEnd--></div><!--QuoteEEnd-->
PC capable of running 60fps cost me 420 €. Not including peripherals, monitor, etc. 3k is quite an overstatement if you speak in euros or dollars.
you have the slow debug mode with live lua and the gaming mode with compiled lua...
so you can play with a little bit of stuttering to develop and debug
and then play fast with compiled code...
Further research suggests it will run as long as your CPU is capable of HTT [Hyper-Threading Technology] (Make sure it is enabled in your BIOS) but if your single core is not capable of HTT it will crash.