Author Topic: Dedicated Host: Proper Method?  (Read 4972 times)

Kuliu

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 16
    • View Profile
Dedicated Host: Proper Method?
« on: March 09, 2017, 09:56:35 AM »
Whats the proper method to having a dedicated host in the game that isn't the player? I'm currently thinking wrapping a lot of the code in an "IsDedicated" variable so I build the game once and have a server and a client. This seems pretty convoluted and I wanted to know if their is any other methods that would work.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dedicated Host: Proper Method?
« Reply #1 on: March 10, 2017, 12:02:11 PM »
First player to join the channel is that channel's host, so if your dedicated player joins first, they will remain as such. Are you building a headless client for your game?

Kuliu

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Dedicated Host: Proper Method?
« Reply #2 on: March 10, 2017, 12:19:15 PM »
First player to join the channel is that channel's host, so if your dedicated player joins first, they will remain as such. Are you building a headless client for your game?

Yeah this is what I was planning on doing. I was just asking if there is an other options then this.  ;D

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dedicated Host: Proper Method?
« Reply #3 on: March 15, 2017, 01:36:45 PM »
You can always transfer host status at will -- although only the current host can give it away to someone else. That said, the "host" doesn't have that much authority than any other player. It's just a flag that all players can check while in the same room. I am not sure what your intended usage is going to be.