var correction = function(time, state, input, entity, rk4) { ... if (Math.abs(state.x - lastMove.state.x) > 2) { ... var currentTime = time, currentInput = input; entity.setState(state); // Rewind entity state var move, // Current move frameTime; // Time between correction and stored move for (m = 0; m < moveCount; m++) { move = moves[m]; frameTime = (move.time - currentTime) / 1000; // Update physics based on corrected time, input and state ... currentTime = move.time; currentInput = move.input; move.state = entity.getState(); }; }; };
check host rawkets.com with address 127.0.0.1 start program = "/etc/init.d/rawkets start" stop program = "/etc/init.d/rawkets stop" if failed port 8000 type tcp for 2 times within 3 cycles then restart Monit script
Rob Hawkes Rawkets.com HTML5 & WebSockets game Twitter sentiment analysis Delving into your soul RECENT PROJECTS Rawkes.com Personal website and blog MORE COOL STUFF ExplicitWeb.co.uk Web development podcast Rawket Scientist Technical Evangelist at Mozilla @robhawkes
Become a canvas master RAWKES.COM/FOUNDATIONCANVAS Out now Paperback and digital formats Learn how to animate Make two cool space games Foundation HTML5 Canvas
November is HTML5 canvas Every month Next month is CSS Media Queries Win prizes (like an Android) DEVELOPER.MOZILLA.ORG/EN-US/DEMOS/DEVDERBY Mozilla Dev Derby
Hand-picked experts @ASKMDN & #ASKMDN ON TWITTER One hour every fortnight Web development topics Great discussions Ask MDN ASKMDN onGameStart special (hopefully)