Vinny Posted August 9, 2023 Share Posted August 9, 2023 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. Quote Link to comment Share on other sites More sharing options...
resamvi Posted August 9, 2023 Share Posted August 9, 2023 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.