Jump to content

How would I prevent cheaters in my multiplayer game?


Vinny
 Share

Recommended Posts

Hello! I had a question. I’m developing a  massive multiplayer online turn-based board strategy card shooter, (say that one 5 times fast) and I was wondering how I would prevent cheaters. Since it’s JavaScript, it would be really easy to just set a hp bar, right?

a solution I thought of was to have the server remember who is online by their IP, and get the player data from the login, so when they want to use an item in their inventory, they can just send a request to use that item from their inventory and make sure that they actually have it.

I just wanted to know if that would work in all cases, such as movement and attacks, or if I’m missing anything.

Link to comment
Share on other sites

Quote

 they can just send a request to use that item from their inventory and make sure that they actually have it.

Yes. You've basically answered it. Using an authoritive server instead of peer-to-peer multiplayer allows for validating user inputs and keep a consistent state of the game that doesn't allow moves like using non-existent items

 

Quote

such as movement and attacks

It would work for anything. Your server would be running a "headless" version of the game basically and run any simulation (physics if your game has that). Then it just sends the complete state (or just its changes - whatever the protocol may be like) to connected clients

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...