Gannett [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=69079 How do you move a sprite 8 pixels then stop? <p>I'm creating a small game where a player is on a grid of tiles. I want the player to move smoothly from one tile to the next, not appear instantly in the next tile. I tried to create a delay loop in the update function when the direction key was pressed, but the sprite still appears instantly 8 pixels to the left, right, etc. </p> <p>The sprite is drawn, then when I hit, say, right, then the loop increments the x position, but it doesn't draw the sprite again until the loop is completed. How would I go about moving the sprite 1 pixel per frame for 8 pixels then stop?</p> <p>I can sort of imagine what I need to do, but it's just a sort of jumble in my mind right now!</p> https://www.lexaloffle.com/bbs/?tid=49110 https://www.lexaloffle.com/bbs/?tid=49110 Tue, 30 Aug 2022 21:04:49 UTC