Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


thread is a must or not

This topic is 5720 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi,im writing a RTS game.but i have problems with multithreading and i wonder if making a game multithreaded is a must or not.why we use threads is for speed, and making code unlinear. for example to make the ai and render and music ..... different threads is good or not? or making every object itself run in its own thread? when i use EnterCriticalSection there are lots of combinations and controls for a linked list of objects in my game.what should i do and how can i easily get rid off deadlocks,consumer producer problems? please tell me your ideas thanks

Share this post

Link to post
Share on other sites
that s a bad idea

in your main thread you keep your game with renderer entities ....

create another one for networking
and you propably want to create 3 stacks for network data

current previous
and next

next is the one where you read your data into the others are used for interpolation

you use a network thread cause you don t want to let your game wait until the next packed arrives

and recent sound implementations create their other thread anyways

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!