Note that for the questions I ask, I do not request a detailed explanation on how to do them, but rather is it possible or not as I didnt delve into networking yet. So I am just curious.
I am working on a Fighting game so the game will have max. 2 players (client) and 1 server.
Can I use Steam to publish servers? Or do I have to figure out the servers myself by renting etc?
Can I use the same Steam servers to store data of players, such as talent choices?
Now, considering there is no such a service in Steam; I will make my game 2 players, with one being the server plus a client and the other being only a client.
Does it make sense to have 2 clients, one acting like a server aswell?
Is there a preventation of hacking for the person who is the server? I mean, lets say the player who is acting like also the server was able to hack my game to change variables etc, how would I prevent it? Is there any way for that, or an article to read?
This could also go for client, who lets say increased the talent points to 150 while the limit is 100, how would the server know that?
Apologises if my questions are silly, I just read some of the network documentation but couldn’t see the answers.
Steam (As most game online services) does not host game server, because they too expensive too host them all. So developer need to pay and setup game servers or let users host servers as lot of shooters does or make user client host. But keep in mind that 1 UE4 server need to be created (or reused) for each game session. Steam provides server management services, like server lists and P2P matchmaking as well as other useful services, access to friendlist, achivments, leaderbords and such.
Thats tricky. Steam does provide cloud storage and UE4 support it, but it’s not really suitble to store stats, as at the and it lands to player’s device and can be manipulated or else you do that somehow closed server. The safest play would be some database server where game server sends match data to it and it updates user data based of it. You could also try to exploit ladearboard system to store stats for you or even maybe talents
Only one clinet can work as a server
as there need to be one copy of game
state, or else you make such
protocol that client syncing to
eachother and checking themselfs if
data is correct. UE4 does not
support something like that by
default you would need to do that
yourself
If user have access to server, it can easily hack it and it really hard to protect yourself from that on local machine, remote server where user dont have access to it’s much safer as server can validate data without any outside manipulation. Ofcorse if server got some exploit in protocol it can be used to manipulate server. You don’t need to keep security on unranked servers, specialy is users host them, but ranked servers need to be secured.
Server should be in guard of such things, it server that needs to give talents point to player and client should say what he wants to spend those talent points to server and server should manage those points based on client say. If client say something invalid, for example spend more talent points that he have, server should be programed to refuse that request. Generally server should be on guard of whole game state, validate it on every step and keep it isolated from client (or else client is server then it’s hard to secure it, thats main problem of hosting game by client… well maybe on consoles there such data hard to manipulate, thats why p2p is popular on consoles because its cheaper and a little bit more secured there)
I don’t know what fighting game you working on, but if it’s fighting game liek Street Fighter or Tekken you would need to build your own game protocol, because UE4 replication system is made to sync game state, where fighting games use more button input based protocols to reduce lentecy. So you might end up needing to create your own protocol.
Thank you for all the answers , these answers clear my curiosity enough to have a think about it.
It is obvious that to get proper online gameplay I need my own servers to store data etc.
I would like to ask one thing which I probably didn’t ask proper which is the 4th one.
Let’s say one guy hosts a game and waits for another to join in. Now, the host may have hacked my game and lets say doubled the speed of players. You could say modded it if we need to be more polite.
Well, is there any way to prevent the guy from hosting servers if he made a change that wasn’t allowed normally? I mean you can surely prevent if someone made a change and wants to join in after all as you just need to check variables.
My idea is, the client should also have the numbers checked on the server, and not join if the variable values are not matching.
Yes you could do that check if something is in desync, also check if host doing something bad, trying to change variable it should not change, but you should not punish people by detectio by that way because other client could use it to punish people. Simply disconnect them saying something went wrong