My top-down game has place-holder images that need to be animated sprites at some time. The sprite is a person moving about on all degrees (not just 8 directions). My original thinking was to have sprite frames (images) I can cycle through with dt and use a simple graphics.draw with rotation. I could also do this with sprite sheets I guess.
Grove has an animation library for frames but it might not do rotation.
You guys use spite sheets most times I assume? I haven't done that before but I understand there are tutorials and rather straight forward. Could I use a sprite sheet with rotation?
Do you suggest sprite sheets or frames?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Do you suggest sprite sheets or frames?
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
-
- Party member
- Posts: 512
- Joined: Wed Oct 05, 2016 11:53 am
Re: Do you suggest sprite sheets or frames?
You can use a sprite sheet with rotation, no problem. You'll load a single image as your texture (the sprite sheet), define and draw quads (which represent the individual frames from your sprite sheets). Quads can be rotated as they're drawn. Sprite sheets help with batching draw calls (lowering the total number of draw calls in a frame), improving performance if you need to draw a whole bunch of sprites from the same sprite sheet.
There's other benefits too, but in general you'd rather want to use a sprite sheet, unless maybe if you have only a few frames at most to deal with.
On the topic of Grove, looking at its source code it supports rotation, and whatever other options you might want to feed to the love.graphics.draw function.
There's other benefits too, but in general you'd rather want to use a sprite sheet, unless maybe if you have only a few frames at most to deal with.
On the topic of Grove, looking at its source code it supports rotation, and whatever other options you might want to feed to the love.graphics.draw function.
Who is online
Users browsing this forum: Ahrefs [Bot] and 182 guests