Jump to content

Ticker FPS


insig
 Share

Recommended Posts

  • 2 weeks later...

Yeah but speed has nothing to do with calling update function. My question was about performance issue. I dont need check interaction 60 times per minute as well as I dont need update animations so often. So value of delta constant does not solve anything for me :/

Link to comment
Share on other sites

  • 1 month later...
5 hours ago, QuinTRON said:

Is there a way to always persist the app.ticker.speed = 1;

I worry people will alter this during an online multiplayer game and they will reap some benefits from it

Cheers

IF the player can change their client to affect the outcome of your multiplayer game you may want to rearchitect. Not only do you have to assume all clients are malicious, but its JS and even easier to modify; and there is nothing you can do to stop people.

Link to comment
Share on other sites

With JavaScript in the browser, you have to take the attitude that every line of code delivered to a user can be changed by them. So, taking away the tickets speed existence wouldn't solve anything, as they could manipulate the time deltas coming in from requestAnimationFrame manually (which is all the speed variable does in a ticker.

You need the server to authenticate everything that the client is sending to the server. Validation on when the client is sending data to the server; ranges for how many times a second for example....and validation on every bit of data send to the server. If the client code is set so that it takes a player 1 second to run 100 pixels to the right, the server needs to validate this; if a client was x pos -500 one moment then x pos 500 the next, you know something fishy is up!

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...