Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

I don't know which language and engine you are using, but for a 32 grid size wouldn't it be x=32*round(x/32) and y=32*round(y/32). Or you can use floor() instead of round() to always round up below. That's what I usually do