Multi-core processors?
by Wysardry · in Torque Game Engine Advanced · 06/24/2006 (4:32 pm) · 10 replies
Does TSE (or will it eventually) support multi-core processors so that server code is run independently of client code?
#2
06/24/2006 (5:50 pm)
I'm almost sure it doesn't do that right now. It's a good idea, since the server/client could, in theory, survive without need to be 100% in sync, but I am sure a lot of changes would need to be done, mostly in the script execution. Objects on both server-group and client-group make calls to the same script space. Also, since the C++ code needs the script callbacks to be fully completed before continuing execution, the server thread would require the client thread to pause execution while running script code.
#3
The main reason I'm asking is that I would like to (eventually) create a large game which has a lot of NPCs and events that move/change regardless of whether a player is there to observe them directly.
06/24/2006 (6:20 pm)
Is it possible for a client version of TSE to start a server version running or vice versa without the use of batch files?The main reason I'm asking is that I would like to (eventually) create a large game which has a lot of NPCs and events that move/change regardless of whether a player is there to observe them directly.
#4
06/24/2006 (8:29 pm)
I believe certain processes in TSE can be moved to another thread(rendering, file I/O, physics, AI, Particle system). Alot depends on the project and it's bottle necks. XBOX 360 titles are breaking up processes between threads already. This will become the standard for multicore processing in games. It would take a good deal change in the engine but should be considered for TSE in the not so distant future.
#5
Identify what your bottlenecks are, and see if you can isolate them into a seperate thread. Launching a dedicated server process in the background on-demand should not be an issue; there are tons of ways of starting one process from within another.
If you're doing an MMO or other special case you may want to consider short-circuiting the current simulation loop and heavily modifying what is written out over the network anyway, so putting the heavy weight processing in a seperate thread oughtn't be a major issue.
You could also do like Ritter did and have Torque just be part of the immediate presentation layer, with all the core gameplay running seperately in Python (or whatever language floats your boat).
06/24/2006 (11:05 pm)
You can always stick your AI/whatever into a thread and push data in/out of it as needed by the client or server. There's no magic here.Identify what your bottlenecks are, and see if you can isolate them into a seperate thread. Launching a dedicated server process in the background on-demand should not be an issue; there are tons of ways of starting one process from within another.
If you're doing an MMO or other special case you may want to consider short-circuiting the current simulation loop and heavily modifying what is written out over the network anyway, so putting the heavy weight processing in a seperate thread oughtn't be a major issue.
You could also do like Ritter did and have Torque just be part of the immediate presentation layer, with all the core gameplay running seperately in Python (or whatever language floats your boat).
#6
http://www.garagegames.com/mg/forums/result.thread.php?qt=41597
actually the whole thread has an incredible amount of information in it.
06/25/2006 (8:30 am)
Read the last post here (it's about threading, i could repost it but you'll get more out of it from the horses mouth):http://www.garagegames.com/mg/forums/result.thread.php?qt=41597
actually the whole thread has an incredible amount of information in it.
#7
06/25/2006 (10:10 am)
This is interesting...but im kind of "Hazy" on what this might mean to my current project...I have just bought a Compaq Proliant Server with 4 900mghz xeon's 12 GIG or RAM a crap load of SCSI drives on a raid array...it was supposed to run the MMO server im writing..or helping to write anyway....are you guys saying that in the current version of Torque(..and you seem to inclued all of them in this post...),are we going to be able to make use of the multi pros. system?...i really hope that i dont have to go though a big re-write of this engine...
#8
06/25/2006 (10:21 am)
You purchased such an expensive server without making sure the underlying technology supports it?
#9
A streamless MMO is a huge undertaking, and if you haven't already started on the design and implementation, you have several years of work ahead of you most likely.
06/25/2006 (10:24 am)
In a zoned MMO, which is relatively easy to implement (aside from the account management and persistence side), you'll be standing up one (or more) game servers per level and linking them via triggers most likely--and in this case, each of those servers will be different processes, and therefore use your cpu's.A streamless MMO is a huge undertaking, and if you haven't already started on the design and implementation, you have several years of work ahead of you most likely.
#10
Those pages should now also apply to TSE since TGE 1.4 features were added to it in MS3.
06/25/2006 (10:58 am)
I've just discovered the What's New and MultiThread pages for TGE 1.4, and they provide info on the additional support available.Those pages should now also apply to TSE since TGE 1.4 features were added to it in MS3.
Torque 3D Owner Tom Bampton
You could, however, run a dedicated server on one core and the client on another. Of course, it's not quite the same as what you're asking, but it's the best you're going to get.
T.