.:HyPeX:. Posted April 5, 2015 Share Posted April 5, 2015 Hello everyone, my idea today is converting a JSON string (created from an array or the array itself depending on the method) to be constantly updated, To indicate the player's pressed keys. My first thought was element data, the second one was triggerEvent. Wich is the best and fastest method to do this? (Lowest latency / delay) Greetz HyPeX Link to comment
WhoAmI Posted April 5, 2015 Share Posted April 5, 2015 You can do a test with getTickCount ( ) - firstly check element data, secondly trigger and check what method was done with less seconds. Link to comment
.:HyPeX:. Posted April 5, 2015 Author Share Posted April 5, 2015 You can do a test with getTickCount ( ) - firstly check element data, secondly trigger and check what method was done with less seconds. Yeah, i was also wondering if there was any other. (For example, exports) Link to comment
xXMADEXx Posted April 6, 2015 Share Posted April 6, 2015 The best way would to probably use element data, but not synch it with the server-side, unless you really need to. You should make the table only store so much key presses, because the table could get very large, very quickly. ex. only store the last 100 buttons pressed. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now