Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Multithreading in voxel games


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 dustin321   Members   -  Reputation: 154

Like
0Likes
Like

Posted 02 September 2012 - 02:34 PM

Hello, I am going to be using a voxel engine for my current game. The engine that I will be using uses multithreading; threads for main game updates, loading/saving chunks, building the chunk vertex data, and physics updates (water, etc.). Is there any downsides to this, or error handling that I should to make it work on different systems? The reason I ask is because I have never used multithreading in any of my games before. All of my previous games have been much smaller scale.

Sponsor:

#2 nfries88   Members   -  Reputation: 259

Like
0Likes
Like

Posted 02 September 2012 - 04:11 PM

make sure you lock around access to any shared data. Each piece of shared data should be given its own lock.

Aside for that, experiment. You may find benefit from more threads, you may find that you've got too many.

Generally speaking, I would recommend keeping physics updates in the same thread as game updates (to minimize lock waits); but depending on how you're going to use your volumes that might not be practicable.

Edited by nfries88, 02 September 2012 - 04:11 PM.

Looking for paid or open-source C++ programming work. Been programming since 2005. No degree.

#3 riuthamus   Moderators   -  Reputation: 5629

Like
0Likes
Like

Posted 02 September 2012 - 04:15 PM

We are currently doing this and this is why we get such great performance.

Generally speaking, I would recommend keeping physics updates in the same thread as game updates; but depending on how you're going to use your volumes that might not be practicable.


Very true, it gets tricky when you try to spread the load and keep it balanced. I would stay away from that as much as possible.

Ultimately, for us it seems to be a very very big bonus... but dont take my word for it, go try it and see what happens. Right now, no negative downsides that we can see.

#4 dustin321   Members   -  Reputation: 154

Like
0Likes
Like

Posted 03 September 2012 - 11:38 AM

Ultimately, for us it seems to be a very very big bonus... but dont take my word for it, go try it and see what happens. Right now, no negative downsides that we can see.


Well, as long as it won't cause any major issues, I'll try it out. It seems that using multithreading could be very useful

Edited by dustin321, 03 September 2012 - 11:38 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS