Author Topic: Authoritative server and server side collisions  (Read 7003 times)

chilly

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Authoritative server and server side collisions
« on: May 27, 2013, 11:39:52 AM »
ok, here is another concern which i cant get a definite answer by reading forum threads.

tnet server is just a socket server , right? meaning is not aware of physics or collisions from unity right?

so, how can one handle this sort of thing?

reason is avoiding the nasty and typical walk thru walls deal.

as per reading the tnet server is just a socket server which acts as a lobby, is this correct?

now, how can we run an authoritative server to avoid nasty cheats and server side collisions?

will appreciate if someone can elaborate on this topic.

thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Authoritative server and server side collisions
« Reply #1 on: May 27, 2013, 12:09:27 PM »
Yes, TNet does not require Unity. Physics are done on the clients. One client per channel is designated as "host" (authoritative player), and his physics state is considered to be "correct", and should be sent to other players for corrections. Anti-cheating is again custom to each game, so it's up to you to add. Simple checks on the host catching things like player moving too quickly or too far would do the trick, for example.

chilly

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Authoritative server and server side collisions
« Reply #2 on: May 27, 2013, 12:47:01 PM »
well, i was expecting a more concrete replys in my posts.

so basicly tnet is just like photon server a socket based/room based which will be relied as authoritative server to the first host that connects to the lobby, right?

unless you have a static host un the net/cloud to be the authoritative at all times?
so if this host is offline then the first player that connect to the lobby will be authoritative  like photon cloud? but without the cloud service here?


hmmmm...

so in other words is like photon networking cloud without the cloud service offcourse,  but just simplier to use?

i mean, anti cheating i do agree is custom to each game, but isnt speed hacks and walk thru walls concerns in pretty much any type of game?
so i would not say those 2 main concerns are game specific. i mean at least from my end, maybe be not yours.




ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Authoritative server and server side collisions
« Reply #3 on: May 27, 2013, 12:55:38 PM »
Host is an authoritative player, there is one host per channel. You need to approach it from IRC's POV.

In IRC you connect to the server, and you are not in any lobby. You are just connected. You can receive PMs from other users, but that's about it. You can also join a chat room. First person to join a chat room is automatically designated as the channel's operator. Same with TNet -- first person to join is the "host".

With TNet if the host leaves, another player is automatically designated to be the "host", so there is always a host player in the channel. It's all seamless.

Lobby server is an optional component in TNet. Lobby server is like Unity's Master Server -- think of it as an advertisement place for servers. Servers register with the Lobby, and users that connect to the lobby can retrieve this list of servers, then connect to the server of your choice.

For example take World of Warcraft as a template. Lobby Server would handle player authorization and would give the player a list of individual servers, with the number of players in each server. The player chooses one server, and hits Connect.

Once connected to the server, the player can now join a channel. For example going into Ironforge would join the Ironforge channel. Instancing would be done the same way. Too many players in the Ironforge channel? Join Ironforge #2. Players in the same channel can see and communicate with one another.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Authoritative server and server side collisions
« Reply #4 on: May 27, 2013, 12:58:38 PM »
In regards to "isnt speed hacks and walk thru walls concerns in pretty much any type of game?"

I created a game called Starlink: http://starlink.tasharen.com

In Starlink, there are no colliders, no walls, and no "going through" anything. How would such checks apply for this kind of a game?

chilly

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Authoritative server and server side collisions
« Reply #5 on: May 27, 2013, 01:13:02 PM »
In regards to "isnt speed hacks and walk thru walls concerns in pretty much any type of game?"

I created a game called Starlink: http://starlink.tasharen.com

In Starlink, there are no colliders, no walls, and no "going through" anything. How would such checks apply for this kind of a game?

space games only, i dont see any other way, so meaning only 1 genre , ie: space games are the exception.

but other than that all other none space genre games require collisions. you have a terrain/platform  and world object you will collide with.

so i dont see a relevant answer you space genre example,  since you implying because space genre collisionless example, means all the rest should be the same.

bad example bro.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Authoritative server and server side collisions
« Reply #6 on: May 28, 2013, 02:00:53 AM »
Look at the top chart for mobile games, and see how few of them need any collider-based logic. Vast majority do 2D instead of 3D, and often does not use physics at all.

Anyway I am not here to argue with you. I do support here. Bottom line is, TNet is not what you're looking for.