Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(4 edits) (+1)

You could improve performance on device by not rotating the image every time. Currently it’s very sluggish. Some options:

  • calculate all 360 rotations at startup (with loading delay you could perhaps disguise with instructional text)
  • caching the rotations in memory after you generate them during play (but this would mean the lock would get progressively smoother to rotate)
  • pre-render all rotations in a sprite sheet (using your game code to spit out the rotated images, or an external tool) and include them with your game. this one is the best method and would be my choice.

Precaching using rotatedImage is a really good idea that I hadn't thought about. I thought about the pre-render solution but couldn't find a quick enough solution for the game jam setting. Thanks for the feedback.

(1 edit)

Pre-rendered is easy - you just save the rotated image to disk after you’ve generated it in the game. You could wrap that code in a loop to spit them all out at once.

(+1)

Thanks for the feedback. That does make things run a lot smoother and prerender loads so much faster than precache.

(+1)

Cool! One more thing, frames ~25 and ~76 see badly aligned.