To animate with canvas, you have to redraw the whole affected section each frame, or your objects will leave a trail behind them. Each animation frame, before the sprite moves, you have to redraw the three or four tiles just behind him I'd suggest adding some extra states to your drawing function so that for each frame, some temporary distances are updated and the relevant tiles and sprite are redrawn. A global variable would block key input while the animation was running I'm too lazy to write it myself, but you should be fine.
Have fun!
To animate with canvas, you have to redraw the whole affected section each frame, or your objects will leave a trail behind them. Each animation frame, before the sprite moves, you have to redraw the three or four tiles just behind him. I'd suggest adding some extra states to your drawing function so that for each frame, some temporary distances are updated and the relevant tiles and sprite are redrawn.
A global variable would block key input while the animation was running. I'm too lazy to write it myself, but you should be fine. Have fun!
– Neurofluxation May 8 at 15:16 1 I'm sorry, but I don't have time to write it. – Nicholas Wilson May 8 at 20:24 Ok, so I tried and I still can't get this to work... – Neurofluxation May 9 at 10:52.
Here's an example. It isn't too accurate because I made it real quick. Basically when a user pressed a button you want to initiate a countdown where each successive tick of the clock moves it (+1,+2) etc towards its goal.
After some number of ticks it stops moving. Edited to use Nick's modified example. See comments.
1 Fixed a few drawing bugs jsfiddle. Net/tTyFB/8 – Nicholas Wilson May 10 at 15:30 +1! Thanks nick!
– Simon Sarris May 10 at 17:16.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.