Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 15-04-2009
Member
 
Join Date: Apr 2009
Posts: 12
How to make Multithreading games ?

Hi

I Want to make multithreading game. But i have never used multi threading, so Can anyone provide me information that how to make multithreading game ? I made games for mobile phones.
Reply With Quote
  #2  
Old 15-04-2009
Member
 
Join Date: Oct 2008
Posts: 54
Re: How to make Multithreading games ?

Multithreaded programming doesn't seem as hard as it used to, but it's still challenging to wring the greatest amount of performance out of multiple processor cores.
Reply With Quote
  #3  
Old 15-04-2009
Member
 
Join Date: Oct 2008
Posts: 55
Re: How to make Multithreading games ?

Most games were designed to run in a single-threaded environment because of the state of the market i.e. a single CPU PC. Multi-threading incurs an overhead on the single CPU so game developers chose single threading. I think the difficulty they talk about is that they need to take apart the single thread game engine (i.e. the traditional infinite game loop - everything that happens up until you display a frame, then it starts all over again) and do some of those steps in parallel. The difficulty lies in resolving dependencies between steps in an iteration of a game loop to ensure they can happen exclusive of each other. Data also needs to be shared between threads so you have to ensure your objects/characters etc behave the same way as if the process was single threaded.
Reply With Quote
  #4  
Old 15-04-2009
Member
 
Join Date: May 2008
Posts: 71
Re: How to make Multithreading games ?

Your game starts and runs on a single thread, so all the tasks run sequentially one after the other. Thus, the total running time of a frame will be equal to the sum of the running times of each task done during that frame.

Using multiple threads would mean taking some of these tasks, and running them in parallel, at the same time as other tasks are running. In this configuration, the total running time of a frame will be roughly equal to the running time of the slowest of these parallel sets of tasks. Thus, the overall frame time is lower than when using a single thread, so the performance of the game is higher, yielding better framerates and smoother animations.
Reply With Quote
  #5  
Old 15-04-2009
Member
 
Join Date: May 2008
Posts: 181
Re: How to make Multithreading games ?

The only benefit to multithreading during the Update stage that I see would be to get update tasks done faster. But all the threads would have to finish up their work before moving on to drawing.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to make Multithreading games ?"
Thread Thread Starter Forum Replies Last Post
Multithreading in intel IPP Assasin boy Motherboard Processor & RAM 9 26-09-2010 03:25 AM
Multithreading and ArrayList Logan 2 Software Development 5 09-02-2010 05:16 AM
run method of MultiThreading beelow Software Development 3 14-11-2009 10:18 AM
Problem with Multithreading in C Language Jagdish Gada Software Development 4 09-03-2009 02:10 PM
forks and multithreading invincibledj20 Software Development 0 12-11-2008 07:55 PM


All times are GMT +5.5. The time now is 05:14 AM.