Hi, TNet forum and Aren.
I was wondering, how do I prevent cheating with TNet? I won't pretend I know a lot about networking or setups. I have used Unity's default networking and Photon to create some tests but TNet seems much better. For example when I use interpolation techniques to smooth out clients movements and animations in player's views, no matter what I did, TNet's examples still were way smoother even with my best techniques. So it seems I have a lot to learn and I will settle with what I know for now. And so I was reading the forum for threads about server setups and mainly, to prevent cheating, but I don't quite understand.
At first I saw that you do not recommend setting up an authoritative server setup as opposed to default authoritative host setup that TNet is. But then I also read that other people are trying to do the former or something similar but even after several threads I haven't pieced enough information to understand. I realize that to do an authoritative server setup, I would need something like the Photon Server where I write server side code and lobby and put that on the server, then clients connect to the Photon server and request to start rooms. Logic is then handled by clients sending requests to the server and performing prediction on clients to make them seem smooth with the responses coming from the server correcting mistakes/also preventing cheating. To do that with TNet I would have to create a game instance with each request to create a room/channel so the game instance in the server would be authoritative instead of any of the clients as the first creator is the authoritative host, but this is not feasible even with a few dozen concurrent players in a day. I'm not sure if that is even possible.
And as far as I know, with a client authoritative setup, the host client may be a cheater. If so he can just do whatever he wants, manipulate players, inflate scores to be sent, etc. especially if there are only 2 players in one room any checks would be impossible against the host player anyway. To be honest, I am not making an MMORPG or something super complicated like that, however I plan to have a multiplayer only game, similar to MOBAs, but much simpler with 2 to 8 players in one room(channel) with many games/rooms going on at one time. I want to keep persistent scores, statuses, etc., so cheating is something that must absolutely be dealt with as soon as possible and I it would take a great burden off I know how to build with it in mind. Ideally I'd like to have one server (or do I need a cloud service? Amazon EC2 maybe?) that handles the lobby and game logic and have users request to create rooms on that (would also get TNet to work on webplayer). But again, I do not know how this works and I don't think it's even possible and I'm just being naive.
So, sorry for the tl;dr but how should I approach cheating with TNet and build around that? I realize I kept going on and on but I'm not sure what I needed to elaborate on to sound clear. If there is something I should be more clear please tell me.