Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Would this approach to movement mean that your speed is capped by the framerate? Since you're moving one pixel at a time. It's a very interesting way to do collision detection though! Solves the overshooting issue.

The total movement is still the same. Instead of moving 5 pixels per frame in one go I split those 5 pixels up into 5 separate 1 pixel movements. That simplifies some things: Instead of moving 5 pixels and seeing "oh, now I'm overlapping something, where do I go now" I can just go "can you go to the next pixel? Yes? Move." Pixel is actually the wrong word here because a screen pixel is made up multiple subpixels internally but the idea is the same. You should really take a look at the linked blog post because the idea is very interesting but only works for integer based positions I guess so it lends itself to pixel art.