Optimizing games for multiple processors
I know in general this isn''t even considered for most games, but I''d like to take a stab at it with mine. It''s going to be a little tough debugging since I don''t currently have a dual processor machine.. But what kinds of optimizations can be done, especially for people running dual processor Intel or AMD processors using Windows and more importantly, how would these optimizations be accomplished?
Ideally I''d love it if I could get one processor to do all the calculations, and another to handle I/O from/for the user. Is this accomplished using different threads (I''m thinking threads always start on the same processor as the parent process)? If it is the process layer, would that be accomplished by putting the calculation logic in a DLL and keeping the I/O running through the main process?
I''m just really curious if anyone has attempted this before or if anyone had any ideas about multi-processor programming in general.
I''m no expert on this, but my understanding is that all you need to do to take advantage of multiple processors is (easier said than done ) use multiple threads. New threads are divided up among however many processors are available, so if you create a second thread to process input or network code, it will most likely get sent to a different processor than the main thread, resulting in less total work for each of them.
quote:Original post by Anthracks
I''m no expert on this, but my understanding is that all you need to do to take advantage of multiple processors is (easier said than done ) use multiple threads. New threads are divided up among however many processors are available, so if you create a second thread to process input or network code, it will most likely get sent to a different processor than the main thread, resulting in less total work for each of them.
Cool, if this is true, I''ve already got it programmed that way . Can anyone else second what Anthracks has said?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement