2
« on: November 07, 2017, 01:49:53 PM »
Hello, I've loaded up the GameServer solution and have gone through the code a bit, though I'm still not sure of the best way to go about modifying the GameServer to my needs.
So I'm aiming to make a competitive 1v1 turn based tactics game with dummy clients and an authoritative server. Upon startup, the client will connect to a master server(potentially connected to a service like GameSparks) for authentication and to retrieve player data (likely level, all obtained units, currency, stored teams, etc). Any menu actions (modifying or creating new teams, purchasing new units, etc) are triggered by the client, checked server side, and then either completed or rejected by the server. When loading into a match, the server will tell each client which map to load and which units + information to display to the player. I'd like for any action taken by the player to send an RFC out to the server, which will then perform validation and calculations before sending out the necessary information to either or both client(s). For example, if player 1 clicks on their unit, the server triggers an OnClick which will return to the client all information and available options, such as all hexes the unit may move to.
Essentially, what I'm aiming for is a completely untrusted client that will send the proper RFC to the server, which will process the packet(s) and then utilize the classes in a GameLogic folder I will have added to the solution. The functions called from the GameLogic classes will return information that will be packaged into a packet and sent to either one or both clients, along with an RFC id that will trigger the functions necessary to display the data to the user. This is at least my understanding or best guess in regards to what kind of solution I will need.
It sounds like the only modifications I need are to adapt the current RFC based structure such that the server processes the packets and then uses the RFC data to call the proper functions located in the GameLogic classes, and then have the server stream the resulting information or changes to the game state to the clients(Is it possible for the server to be sent one RFC id and then send out a different one because the server and clients are performing different functions? And would it even be necessary?).
My question is how I should go about modifying the GameServer solution to work this way? It seems like a very minimal amount of changes need to be made to the GameServer due to my attempts to make it as flexible as possible(potentially being able to reuse the customized executable for another game with a different set of classes in the GameLogic folder). Do you have any advice regarding which classes and methods to change and a general idea of how to go about changing them?
I hope I have included enough information, as other responses in regards to modifying the GameServer executable have only said it's possible and easy, but that it shouldn't be done; I was hoping I might be able to get a more insightful or thorough answer that provides a better idea of how one would actually go about implementing these changes. In regards to the question of why I need an authoritative server, I want to maintain competitive integrity of the game, as there are only going to be 2 clients per channel. I want to build some safety against cheating into the system from the start, and from my understanding, an authoritative server should be one of the best options for doing so (or at least it seems to be the best fit for my game specifically).