Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4115186
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:32:59+00:00 2026-05-20T22:32:59+00:00

I don’t need it to be too secure. Even md5, which is generally broken,

  • 0

I don’t need it to be too secure. Even md5, which is generally broken, is safer than what I need (as long as a collision cannot be found within 2 minutes, it should be 100% fine).

I need it for a videogame we’ll be making in a hackathon this weekend. We have a server which will simulate the core parts of the game and we need to synchronize the several players (we’re using socket.io and nodejs as comet server) and make sure no player is cheating by modifying values. Thus the checksum (if they send a valid checksum, which will compare to the one generated in the server, the user has the right stuff).

So, as long as the checksum is not too easily reverse engineered, it should be fine.

Also, since I don’t have much experience with online games (I have used sockets for some time in C, Java, Python and even PHP, though), it would be awesome if someone could recommend some readings on general patterns followed. All I found was a paper explaining why Age of Empires 2’s online kinda sucked 🙂

Thanks a lot

More ellaboration:

Every client has variables (objects with properties and etc.). Events happen at the client and thus states change. Depending on the states, the variables change. So, the client sends the states and a hash of the variables to the server. The server takes the new states from the client (which could be, for example, “right arrow is pressed”), checks if they are valid and then generates new values on the variables. Checks if the hash corresponds to the one sent by the client. If it doesn’t, it sends a synchronization message to the client, giving him new values to it’s variables. Then saves it all and sends updates to the other clients on the shared variables. (since not all variables can be seen by other clients)

The hashing is mostly for synchronization. I don’t know if it’s the best method, but it’s what came to mind. However, I don’t want a prick messing with the values if they are just a simply checksum (CRC32 for example) and not something more difficult to fake. That way I feel like synchronization will be easier.

Again, I don’t have experience with networking on videogames, but from other stuff I’ve done, this sounded logical. I appreciate all feedback.

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:32:59+00:00Added an answer on May 20, 2026 at 10:32 pm

    Don’t trust the client. Use the server as a central authority, not for core parts but for all parts. Replicate as much of the game state as you can server side, and feed the clients that data. Don’t do any processing/as little as possible client side. No matter what values the clients modify the server will reject them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't ask me why but I need to do the following: string ClassName =
Don't know if anyone can help me with this or if it's even possible.
Don't ask me why but i can't use this method because I need to
Don't yell at me! i have seen many threads claiming that HTML cannot be
Don't need to do this right now but thinking about the future... What would
Don't need to go so far, just install Devexpress 11.2.5 and run the GridDemo(
don't know if the title describes anything about what I'm trying to say but
Don't ask me how but I'm in a situation where I have DCPs published
don't know what happened in my jcrop selection. I think I pressed some keys
Don't be scared of the extensive code. The problem is general. I just provided

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.