Multi Threading Game Speed Question

Put your problem here if it does not fit any of the other categories.

Multi Threading Game Speed Question

Postby tttcowan » Fri Feb 11, 2011 1:51 pm

Hi,

I'm not sure if something similair has been asked but I'm having a bit of "what's the point momment" with regard to multithreading a game I'm working on.

I did have a physics thread and an opengl thread which worked fine ish... To be honest I had to put the physics thread to sleep a lot as it was overrunning the opengl thread a lot. To try at get the thing running as fast as possible I thought, well I only ever wan't the update thread to run once per opengl thread so I decided just to update the physics thread from the opengl thread directly(calling physicsthread.update() from openglthread.draw) and it now runs as fast as possible without the physics thread overrunnning the gl thread...

It's ugly though, is it the best way to do it? Would I see any benefit of splitting the threads out again... I'm struggling to see the point when it's a single core processor to be honest.... Hmmmmmm.
tttcowan
Developer
Developer
 
Posts: 46
Joined: Mon Jul 19, 2010 11:08 pm

Top

Re: Multi Threading Game Speed Question

Postby urbantrad » Wed Feb 16, 2011 10:41 pm

If you only want it to run once per OpenGL cycle, there is no point at all. Easy as that.
urbantrad
Senior Developer
Senior Developer
 
Posts: 104
Joined: Thu Sep 09, 2010 10:19 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 20 guests