Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hi! I had a similar problem, and I solved it in a kind of hacky way.

If you match the number of frames to 2 times the width of the planet, so that each frame moves one pixel, it will create a smooth pixel by pixel animation. I wanted 60 pixel wide planets, so I exported the spritesheet with 120 frames. The actual exported sheet was 24 columns by 5 rows.

Doing this lets you have a smooth animation and you can adjust the speed in the code.

Probably any multiple of the planet size would work, so for 400 pixels wide, your case, 800 frames would give a 1 pixel movement, but 400, 200, or 100 frames should work; the movement per frame for those should be 2px, 4px, and 8px. But without any frames skipping. (Any multiple should work, so 80 frames = 10px/frame, etc)

Your mileage might vary, but it worked for my use case. Good luck, and cheers!