User avatar
Crimguy
Lieutenant
Posts: 144
Joined: Sun Jun 17, 2007 4:49 am

One more question - multithreading AACW/NC

Tue Nov 13, 2007 4:54 am

I brought this up back when AACW was first released - any plans on adding multiprocessor/multithreaded support? It seems that a game like this would actually have tangible speed improvements if it could assign tasks to different processors. I'm not a programmer, but it seems logical.

User avatar
Gray_Lensman
Posts: 497
Joined: Mon Jun 18, 2007 4:04 am
Location: Who is John Galt?

Tue Nov 13, 2007 6:46 am

deleted

Guru80
Colonel
Posts: 311
Joined: Tue Oct 02, 2007 5:34 am

Tue Nov 13, 2007 7:07 am

Multi-threading seems logical due to what has to be cpu intensive algorithms. I am sure that is something that would benefit any game using the same engine. Maybe AGEOD has already looked into it however and decided it wasn't worth the effort.

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Tue Nov 13, 2007 6:54 pm

This is a feature we will investigate for VGN, where one AI will be put on each thread, to speed up thinking time. As ACW has only a single AI for each side, for now there is no plan to port the feature, if we do it, to it.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

jam3
Private
Posts: 31
Joined: Mon Jul 09, 2007 7:35 pm

Wed Nov 14, 2007 11:47 am

As much as I think the game could benefit from it for the non programmers out there its not like you simply go into the code and change a value to "on". You have to declare seperate threads and then actively put the language around the part of the program you want to run on that thread.

The KEY part to understanding how difficult this can be is that threads running on seperate processors have very very limited ways of communicating with one another. So if you want to have a process running on a thread that sets a condition that another part of the program running on a seperate thread can then use you have to use timers and other thread conditional logic.

In other words coding a single application to use multiple processors is ALOT of work. Multiple processors mainly benefit when seperate programs run on different processors that have no need to communicate to the other program. Like running IE and Word simultaneously and allowing the OS to put those programs on seperate processors. This is the simpliest and most commonly used application of multiple processors and in some cases can simply be switched "on" by a game, like telling the sound or video driver to run on the other processor and this is really only available when the driver programming itself allows for it Basically this is the difference between changing the cover sheet of your thesis or going into every page and re-editing every sentence.

Although full architechting of games from day one of coding to fully integrate multiple threads on multiple processors can have HUGE performance increases, you can very easily see this in Supreme Commander.

Sorry for the diatribe just wanted to step in and point out that what your asking is for reverse engineering of a completed game is an enormous amount of work. Not to mention that thread IPC (inter process communication) can be a real nightmare to debug. Putting serious multi threaded code into an existing single threaded engine could potentially be more work than simply re-writing the game from scratch.

Return to “AGEod's American Civil War”

Who is online

Users browsing this forum: No registered users and 14 guests