New answers tagged

2

Just in addition to @Loblums answer: AFAIK socket.io uses WebSocket as its default transport. With WebSocket being relatively new, not all intermediaries on the internet may be aware of it and handle it correctly. With an encrypted connection, chances of a WebSocket connection succeeding increase a lot, since then from the outside it's indistinguishable ...


7

Yes. You definitely should. Use Let's Encrypt to get a free SSL certificate (or as many as you want or need). SSL is always good to have: without it, man-in-the-middle attacks will be launched, by the NSA if no-one else. Most multiplayer games (e.g. Minecraft) just use raw packets. There's little reason to encrypt packets after one is authenticated as only ...


2

One thing a lot of people say here and is pretty fangerous is to have the player send information about his state when he shoots. The server is a machine, he can't decide who cheats and who doesn't. "Yes, I really did stand in front of him for 30 seconds without he noticing it, then I shot him in his eye while he was running around in a thight place, looking ...


4

Note that most of us cannot answers specific questions about either of the games you mentioned. We aren't the authors of that code and can't reasonably know exactly how it was built. Generally speaking, there are multiple approaches. One approach is that the server is authoritative on everything. When a client wants to fire a weapon a round-trip to the ...


17

Always assume the client is a lying, cheating, bastard. The client is responsible for: Receiving input from the player (and sending commands to the server, which validates) Rendering the known gamestate The client is in no way allowed to calculate the gamestate except as client-side interpolation for smooth animations.


4

More than likely, it works like this (major speculations): Client sends Shoot command to server, along with parameters such as position, direction, velocity, type, etc... Server accepts command and broadcasts to all players on next frame. Clients render the shot. If shot hits a player, server broadcasts kill. Can't tell for sure though, as I don't ...


1

There are two different scenario's for keeping data on the client safe from the client The client is not allowed to see the data I'm assuming that you mean encrypted to prevent unauthorized inspection by the end user? If so then the answer is no. This cannot technically be done. It's the reason those DRM systems all get 'cracked'... They were broken to ...


2

Yes, you can create a hash of the players savegame. But it comes with some drawbacks. Any online game which is supposed to not allow rampant cheating needs an authoritative server which handles all game mechanics. In order to do that, the server needs the whole savegame data. That means the client needs to upload the whole savegame to the server on login ...


1

user2962533 this this is an answer, so here it is. Long story short: Always assume that the client is a lying, cheating bastard. i.e. assume that local saves are corrupt, invalid, cheated, shared, hacked and otherwise containing wrong, outdated, or cheated values. No matter how it's encrypted, hashed, or verified, the client executable can always ...



Top 50 recent answers are included