Author Topic: TNServer design... need some pointers..  (Read 3656 times)

chiblue

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 21
    • View Profile
TNServer design... need some pointers..
« on: September 30, 2013, 01:56:49 PM »
I am using TNServer as it comes with TNET,  but I am looking at changing it... what I want to do is have a list of channels driven from a configuration file,  within each channel I want to define a list of levels that the channel will cycle through using basic level end criteria,  like a game timer...

I would appreciate and pointers on the best approach for this requirement,  I have some ideas but not sure if someone already has done this or maybe it will already do this using the server.dat file...  I cannot find much documentation on using the tnserver so any help on the design or using the server.dat file would be helpful..

speps

  • Guest
Re: TNServer design... need some pointers..
« Reply #1 on: October 01, 2013, 05:39:39 PM »
I don't think you need to modify TNServer to do this.

What you want is something similar to what the MasterServer does in Unity's own networking API. It's a way to have server list like you see in games like CS or Quake Live. This is currently not supported in TNet as far as I know but can be done yourself using some http requests probably (instead of having to run a dedicated server).

Then you'll have to check the end level criteria on the peer that is hosting the game. Once it's reached, you can call TNManager.LoadLevel on the clients to change the level through an RFC call (calling a function on all the clients).

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TNServer design... need some pointers..
« Reply #2 on: October 01, 2013, 07:30:57 PM »
You can have a server list in TNet by simply using the lobby server. That's what it is, basically -- a master server to which you connect and retrieve the list of actual game servers from.

TNet supports both TCP and UDP lobby servers. UDP lobby server will broadcast its presence to LAN. TCP lobby server will allow people to connect from the internet.