insig Posted January 3, 2017 Share Posted January 3, 2017 Hi, is there any way how can I set only 30 FPS for PIXI ticker? Might it help for better performance? I use a lot of sprite animations and interactivity but 60 FPS is useless for my purposes. Thx. Quote Link to comment Share on other sites More sharing options...
cnwerb Posted January 4, 2017 Share Posted January 4, 2017 I'm also interested in getting an answer to this question Quote Link to comment Share on other sites More sharing options...
insig Posted January 16, 2017 Author Share Posted January 16, 2017 Nobody didnt deal with it?? Any idea? Quote Link to comment Share on other sites More sharing options...
xerver Posted January 16, 2017 Share Posted January 16, 2017 Did you read the docs? You can modify `speed` to get different rates. http://pixijs.download/release/docs/PIXI.ticker.Ticker.html#speed labrat.mobi 1 Quote Link to comment Share on other sites More sharing options...
insig Posted January 16, 2017 Author Share Posted January 16, 2017 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 :/ Quote Link to comment Share on other sites More sharing options...
xerver Posted January 16, 2017 Share Posted January 16, 2017 Then use setTimeout or a custom ticker. Ticker is a requestAnimationFrame wrapper, if you don't want to use requestAnimationFrame then you need to use something else. You could also just do the frame limiting on your side by tracking delta time. Quote Link to comment Share on other sites More sharing options...
QuinTRON Posted February 25, 2017 Share Posted February 25, 2017 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 Quote Link to comment Share on other sites More sharing options...
xerver Posted February 25, 2017 Share Posted February 25, 2017 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. Quote Link to comment Share on other sites More sharing options...
QuinTRON Posted February 25, 2017 Share Posted February 25, 2017 Thanks Xerver, I have an Authoritative server but it is only as good as my found test cases are. So after reading your comment I assume there is no way -in this particular case, to shred the ticker speed's existence and always keep it to 1? Cheers Quote Link to comment Share on other sites More sharing options...
themoonrat Posted February 25, 2017 Share Posted February 25, 2017 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! Quote Link to comment Share on other sites More sharing options...
QuinTRON Posted February 25, 2017 Share Posted February 25, 2017 Thanks Quote Link to comment Share on other sites More sharing options...
d13 Posted February 25, 2017 Share Posted February 25, 2017 There's also this: https://github.com/kittykatattack/smoothie QuinTRON 1 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.