freke1981SWE Posted August 26, 2014 Share Posted August 26, 2014 Hello! I´m creating a simple tilemap game, how can I move the player on tile at the time. Now I move the arcade body the full tile width and get a smooth transition. I want a more choppy one, like how the tetris bricks fall down on an old Gameboy. Link to comment Share on other sites More sharing options...
freke1981SWE Posted August 26, 2014 Author Share Posted August 26, 2014 I´ve solved it by saving this.time.elapsed into a movement timer and checking the value against a threshold in the update loop: this.currentMovementTimer += this.time.elapsed; if (this.currentMovementTimer > this.intSpeed) {this.currentMovementTimer = 0; By lowering the intSpeed I also can adjust the choppy movement. Link to comment Share on other sites More sharing options...
Recommended Posts