Posted: 25th Mar 2021 17:19
I have lately developed a fascination with the eat-and-dodge genre. Since Pacman is the original of this, I thought it would be fun to combine the the gameplay of Crystal Quest with the Pacman visuals.

So, I try to create a pacman which can turn in 32 directions, via 32 spritesheets.

Alas, replacing the sprite images and running SetSpriteAnimation ( puckSID, 13, 13, 5 ) every frame caused the sprites physics to go bonkers. No clue why. Also, I don't like having to calculate the spritesheet every frame.

I guess I could make the physics sprite invisible, and then have place one of the 32 sprites one on top of it. But is there a smarter way?
Posted: 25th Mar 2021 23:33
personally speaking I would pack them all into a single image but if that is not an option then go with your latter idea and have the physics sprite as the control sprite and use SetSpriteImage, SetSpriteFrame, DrawSprite to show the correct frame

or is it possible to have a single set of animations and adjust the sprite angle for its direction.
Posted: 26th Mar 2021 0:23
A single image image of 160 frames sounded crazy, so I tried it, and it works! Thanks, wouldn't have thought that up!
Posted: 26th Mar 2021 9:05
By the way, if you ever need a 32 direction pacman, here's the sprite!
Posted: 26th Mar 2021 13:09
The old days of computing they would put a complete sprite list into one image

The addspritetoframe command is handy for what you are doing aswell
Posted: 28th Mar 2021 11:39
The more images you can pack into a single image the better as there are less draw calls, also, thats a fairly simple animation, you could have just rotated/flipped the sprite for your directions.