Jump to content
  • Advertisement
Sign in to follow this  
Nitrogenycs

Server/Client code sharing and security

This topic is 4328 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I wonder how I should deal with sharing code between server and client. There are a lots of components (singleton, factories, different other patterns, priority queue, special property class etc) that can be shared amongst the two. However that seems to expose quite some security risk. Once somebody found a way to hack its own client's code, the same attack could be played on the server. What to do in this situation? -Matthias

Share this post


Link to post
Share on other sites
Advertisement
It's not a security risk at all if you validate the data when it reaches the server. Always assume someone will work out the format of whatever data is being sent, and they don't always do this from the code anyway.

Share this post


Link to post
Share on other sites
The moderator's right. As long as you don't trust anything the client says, there's no risk (exceptin' the normal risks you always get with server/client communications of any sort). Don't let the client report where he is, make him report what he'd like to do (Client say "I'm moving forwards, and I'm holding the fire lasers key"). The server, in turn, says "Ok".

Also, if your game is going to be a fairly small release, you may consider not worrying about cheaters. It takes a lot of effort to set up a game for cheating, and for a small indie game, why would they bother, and what would it cost you? Still, if you want to do it the "right way," then yeah, don't trust anything the client says.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!