1 Replies - 804 Views - Last Post: 18 August 2012 - 10:31 PM Rate Topic: -----

#1 byrandomby1  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 124
  • Joined: 08-March 11

multiplayer network in separate thread?

Posted 18 August 2012 - 08:20 PM

I have a multiplayer game using p2p / udp.
Should the messsage receiving loop be in the main game loop or running on a separate thread?
Is This A Good Question/Topic? 0
  • +

Replies To: multiplayer network in separate thread?

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3719
  • View blog
  • Posts: 5,991
  • Joined: 08-June 10

Re: multiplayer network in separate thread?

Posted 18 August 2012 - 10:31 PM

Ideally in a separate thread. With today's multicore processors, you want to try and take advantage of the otherwise wasted processor power at your disposal. It comes with it's own headaches though, so make sure you learn how to control it properly.

However, if the message loop is cheap, it may not be worth the effort. You'd have to determine that.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1