Author Topic: Can I separate players with different version of game on server TNet?  (Read 175 times)

DioAlias

  • Newbie
  • *
  • Thank You
  • -Given: 43
  • -Receive: 1
  • Posts: 45
  • Russia, Kazan
    • View Profile
TNet server have TNPlayer.version (Protocol version)
If I update the game build - I should update server TNet(with new protocol version)

But its not conveniently, because: 1) some players can try to play on old version 2) I want to have many games on server, and If I update one of them - I should update all of there.

Can I separate players on one protocol with different game version?

for example: TNManager.Connect(serverAddress, serverPort, gameVersion);

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 261
  • -Receive: 1125
  • Posts: 21,784
  • Toronto, Canada
    • View Profile
Re: Can I separate players with different version of game on server TNet?
« Reply #1 on: December 31, 2016, 01:28:13 PM »
There is no need to change the TNet's protocol version at all. I don't use it in either Windward or Sightseer. The protocol version only needs to change if you changed something server-side, like adding a new packet.

What I do instead, is have a local game version (Game.version constant for me). When a player connects it checks it against the TNManager.GetServerData value, and if it's lower than required, doesn't allow the player to keep going. The server data value is set by me automatically when I connect to the server after an update (as I am an administrator, so can use SetServerData on connect).

devomage

  • Full Member
  • ***
  • Thank You
  • -Given: 5
  • -Receive: 58
  • Posts: 214
    • View Profile
Re: Can I separate players with different version of game on server TNet?
« Reply #2 on: December 31, 2016, 06:32:46 PM »
in most cases when the protocol version changes - versions are *not* backwards compatible