Jump to content
  • Advertisement

Recommended Posts

Advertisement

You mean anti-cheat.

Exact implementation would depend on the game, but the basic idea is that the user can modify what the client does, so the server needs to verify everything the client says and correct anything that doesn't line up. The best thing to do would be to find some libre multiplayer games and check out what they do. I think Minetest and Xonotic are good examples.

Share this post


Link to post
Share on other sites

That depends on what kind of game you're doing.

If it's a game with well-defined rules and no real-time response, you can run the entire rule set on the server, and simply use the game client for user interface to gather commands and show results. Board games and RTS games and turn-based games will work well in this model. (RTS games may seem like they're real-time, but there's typically a significant queuing delay for each command, during which the units play a "yes sir!" animation, before the command takes effect.)

If your game is real-time, in the sense of a first-person shooter, a racing game, or a fighting game, then you need to still run the game simulation on the server, but you also need to hide the latency on the client somehow -- show an immediate outcome of the action on the player's screen, while waiting for the server to verify that the action succeeded. Then you need to figure out how to show it when the action fails (say, the person you were shooting at suddenly jumped or dodged.)

How to build the server, in code, depends entirely on what game engine and language you're using. Some game engines (such as Unreal Engine) come with server functionality built in. Others (like Unity) have some support for networking, but generally requires addition of some third party helper to get good. Most of them don't actually solve the bigger questions of "how do I find a player to play with or a game to join" which needs additional helper libraries (Steam, or Apple Game Center, or Google Play Services, or whatever.)

 

Share this post


Link to post
Share on other sites

Consider first learning how other people's games got hacked, in particular games similar to your own. Learning how an attacker thinks and what can be exploited is invaluable if you're going to develop the kind of defensive / paranoid mindset needed to compensate for such attacks.

Share this post


Link to post
Share on other sites

There's a lot that could go wrong. That is in logins, persistance, networking stuff... and what if the server isn't authoritative. These four things you can research more. Cryptography for logins, databases for persistance, packet stuff for networking (overflowing? tcp quirks maybe?)... and server architecutre (authoritative or client-side).

Edited by RnzCpp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!