using the Quad core

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Re: using the Quad core

Post by Brainsaw »

Granyte wrote:actualy doing physics in a thread require some sort of mutex itself because when the physics update a node position while smgr->drawall() is runing you will still get a wonderfull crash
That's why I'm planning to use a Event based approach. I do already have an event queue, I just need to make it thread-safe.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: using the Quad core

Post by Granyte »

interesting for now i'm using atomic operation on bool to lock some operation from the rendering loop and other from the physic loop depending on what the other thread is doing
it's primitive but it works if i start to need more thread i might implement it as a thread/flag manager


and i'm actualy thinking on making a 3rd thread for my game loop instead of having it in the render loop and since bullet seem thread safe to some extent
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: using the Quad core

Post by hendu »

And I was thinking just being lazy and using OpenMP.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: using the Quad core

Post by Mel »

The simplest thing, as it has been said many times, is to keep all the Irrlicht related stuff in the main thread, and use the rest as you see fit.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: using the Quad core

Post by Granyte »

the problem is you still need to update the nodes from the other threads
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Re: using the Quad core

Post by 3DModelerMan »

If you use an event system then it shouldn't be too big of a problem.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Post Reply