Jump to content

Recommended Posts

I have a javascript code that displays a monster hitting my character via client side only. It runs every 2 seconds via a setTimeout function.

 

My problem is... A user could just disable javascript all together, or craft their own code to disable the monster attack function.  

 

I want to detect serverside if anything is being altered.  If that makes sense.  

 

This is EXTREMELY hard for me to explain, I have no idea but my game is essentially turn based at this point. THE MONSTER ONLY DOES DMG if a player HITS IT. That way, I can safely, and change the values serverside with MYSQL.

 

What I want is the monster to attack the player every 2 seconds or so (Which I have javascript code for already), but a user could just manipulate that code and then attack the mob and receive only that damage. I want it to be more of an action attack game, where the monster's attack automatically, but securely... If that makes sense, any idea?

 

Would I have to implement some type of timing mechanism or something serverside? Or once the player spawned that mob..? Not sure. (You only have XX Seconds to kill!), but that doesn't really fix the problem..

 

TLDR: Autoattack mob system serverside.

Edited by Monkuar
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.