Multi Thread Programming

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
davidthefat
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 529
Joined: Mon Nov 10, 2008 3:51 pm
Current Project: Fully Autonomous Robot
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: California
Contact:

Multi Thread Programming

Post by davidthefat »

Is it a good investment to start learning on the theory and other stuff about multi threading while still in highschool? I mean with the Moore's law, every day pcs will all be multi processor by the time I get into college (Im a sophomore) and Its never to early to learn isnt it? :lol: Also the game industry, its all multi processor now, with the PS3 and 360, and the next gen will have even more cores and processors, by the time I graduate Highschool, getting pretty complicated in the industry isnt it?
K-Bal
ES Beta Backer
ES Beta Backer
Posts: 701
Joined: Sun Mar 15, 2009 3:21 pm
Location: Germany, Aachen
Contact:

Re: Multi Thread Programming

Post by K-Bal »

The principals of multi-threading are very easy. The hardest part is synchronizing your variable access so that multiple threads still give you a performance boost. I would recommend you just try it in your next project. I.E. try to do the logic and the rendering in two threads.
User avatar
GroundUpEngine
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 835
Joined: Sun Nov 08, 2009 2:01 pm
Current Project: mixture
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Location: UK

Re: Multi Thread Programming

Post by GroundUpEngine »

Defiantly man multithreading is the way forward! When I first tried it I did something similar to that example and carried out 3D rendering on one thread and client-server packet transfer on the other, the result was really optimized! :shock2:
User avatar
Kros
Chaos Rift Regular
Chaos Rift Regular
Posts: 136
Joined: Tue Feb 24, 2009 4:01 pm
Current Project: N/A
Favorite Gaming Platforms: PC, Playstation/2/3
Programming Language of Choice: C++
Location: Oregon,USA
Contact:

Re: Multi Thread Programming

Post by Kros »

Yes.
Isaac Asimov wrote:Part of the inhumanity of the computer is that, once it is competently programmed and working smoothly, it is completely honest.
YouTube Channel
User avatar
davidthefat
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 529
Joined: Mon Nov 10, 2008 3:51 pm
Current Project: Fully Autonomous Robot
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: California
Contact:

Re: Multi Thread Programming

Post by davidthefat »

One thread for rendering and another checking collision and getting input and ect? Any books focusing on multi threading out there?

multi threading in other words is a team of processes acting as one program?
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 447
Joined: Sun Sep 21, 2008 1:34 pm
Current Project: "Triangle"
Favorite Gaming Platforms: PC
Programming Language of Choice: C/C++
Location: UK
Contact:

Re: Multi Thread Programming

Post by RyanPridgeon »

davidthefat wrote:One thread for rendering and another checking collision and getting input and ect? Any books focusing on multi threading out there?

multi threading in other words is a team of processes acting as one program?
Yep.

I think it's probably worth noting here that SDL can only pump and process events in the main thread. Kinda gay, but oh well.
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
Post Reply