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

Re: using the Quad core

Postby Brainsaw » Tue Dec 27, 2011 6:51 am

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.
User avatar
Brainsaw
 
Posts: 1045
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Re: using the Quad core

Postby Granyte » Tue Dec 27, 2011 7:57 pm

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
Granyte
 
Posts: 520
Joined: Tue Jan 25, 2011 11:07 pm

Re: using the Quad core

Postby hendu » Thu Dec 29, 2011 4:19 pm

And I was thinking just being lazy and using OpenMP.
hendu
 
Posts: 1619
Joined: Sat Dec 18, 2010 12:53 pm

Re: using the Quad core

Postby Mel » Sat Dec 31, 2011 12:20 am

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.
http://santiagong.daportfolio.com/
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
User avatar
Mel
Competition winner
 
Posts: 1788
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: using the Quad core

Postby Granyte » Sat Dec 31, 2011 2:29 am

the problem is you still need to update the nodes from the other threads
Granyte
 
Posts: 520
Joined: Tue Jan 25, 2011 11:07 pm

Re: using the Quad core

Postby 3DModelerMan » Sat Dec 31, 2011 3:04 pm

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/3DModelerMan/replicator#tipjar
User avatar
3DModelerMan
 
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Previous

Return to Game Programming

Who is online

Users browsing this forum: No registered users and 1 guest