Sprite sheets give me a headache
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 9477
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Sprite sheets give me a headache
They do, you know, because I am sick and tired of spending yonks chopping them up into individual
images to use as backGroundPatterns for a graphic . . .
I am looking for guidance (NO, not THAT kind of guidance) on how I might use a sprite sheet in its raw, unprocessed form
to animate inwith a grc 'frame.
- -
NOT "cutting the mustard."
images to use as backGroundPatterns for a graphic . . .
I am looking for guidance (NO, not THAT kind of guidance) on how I might use a sprite sheet in its raw, unprocessed form
to animate inwith a grc 'frame.
- -
NOT "cutting the mustard."
Last edited by richmond62 on Sun Oct 10, 2021 6:19 pm, edited 1 time in total.
-
- Livecode Opensource Backer
- Posts: 9477
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Sprite sheets give me a headache
Well; here's a crappy solution that uses a grouped image, but presupposes that one knows
where the centre of each image inwith the
sprite image lies (which I don't: hence the crappy result).
At which point, I suppose, I could piss about, chopping up the sprite image
to reposition the sprites to predetermined locations
(one could do that with importing a folder of the chopped up images, grouping them
and then importing a snapshot from the group), which is almost as fun as
banging one's head on the wall, chopping up the sprite image into bits for
backGroundPatterns, or standing on one leg for 25 years.
- Attachments
-
- Sprite Handler 2.livecode.zip
- Here's the stack.
- (71.08 KiB) Downloaded 105 times
-
- Livecode Opensource Backer
- Posts: 9477
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Sprite sheets give me a headache
https://codeshack.io/images-sprite-sheet-generator/
AND, if LiveCode could do that, I could just be lazy and get my sprite sheets from places like this:
https://itch.io/game-assets/free/tag-side-scroller
Err, well, जै . . . I wonder how I can do THIS in my favOUrite coding language (erm: LiveCode)?You can use your favorite coding language to select the coordinates of each image and display them accordingly
AND, if LiveCode could do that, I could just be lazy and get my sprite sheets from places like this:
https://itch.io/game-assets/free/tag-side-scroller
-
- Livecode Opensource Backer
- Posts: 9477
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
-
- Livecode Opensource Backer
- Posts: 9477
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Sprite sheets give me a headache
This, of course, is totally beside the point
[although it is rocky that I found something that chops up sprite sheets quicker than I can cut open
my thumb with a penknife.]
as it does NOT answer my original questions (either of them).
- Attachments
-
- Sprite Handler 3.livecode.zip
- Here's the stack.
- (98 KiB) Downloaded 128 times
-
- VIP Livecode Opensource Backer
- Posts: 35
- Joined: Sat Jan 15, 2011 10:57 am
Re: Sprite sheets give me a headache
Explore this
- Attachments
-
- spritesexample2.livecode.zip
- (168.69 KiB) Downloaded 120 times
-
- Livecode Opensource Backer
- Posts: 9477
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Sprite sheets give me a headache
Thank you very much Kangaroo SW:
1. Very clever.
2. No obvious benefit over using individual images
(just more complicated coding).
1. Very clever.
2. No obvious benefit over using individual images
(just more complicated coding).
-
- Livecode Opensource Backer
- Posts: 9477
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Sprite sheets give me a headache
Thank you.
Very clever, very complicated and ALL for the sake of NOT chopping up a sprite sheet.
The effort, in my case at least, does not seem justified.
Re: Sprite sheets give me a headache
The main benefit as far as i can see is you're managing just 1 image instead of say 12 or 20. It does require extra effort in preparing the images to just one image, as all cells have to be the same size and all images have to be centred in that cell, but that's a 1-time job.richmond62 wrote: ↑Tue Oct 12, 2021 8:50 amThe effort, in my case at least, does not seem justified.
I'm not sure the output is any different/speedier, but when working with an app, managing just one image greatly simplifies things i suppose.
S.
-
- Livecode Opensource Backer
- Posts: 9477
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Sprite sheets give me a headache
These both seem disadvantages as with a series of images of differing dimensions on displaying themall cells have to be the same size and all images have to be centred in that cell
in a graphic as a backGroundPattern one can reset the graphic;s dimensions to take the image
dimensions into account.
Sprites of this sort:
https://aamatniekss.itch.io/fantasy-kni ... r?download
- -
have to be chopped up into individual images UNLESS jiml's Cel-animation
can be modded to change the dimensions of the group containing the sprite sheet for each frame.
-
- Livecode Opensource Backer
- Posts: 9477
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Sprite sheets give me a headache
As I am considering writing a leaflet not called "Making Side Scrolling Games for Morons", that is the title
I will be repeating under my breath.
I will be repeating under my breath.
Last edited by richmond62 on Thu Oct 14, 2021 9:32 am, edited 1 time in total.
Re: Sprite sheets give me a headache
Your Warrior sprite doesn't need to change size for each sprite.
One Size to Rule them all You can make SpriteSheets with ImageMagick
or cut it into pieces
The active part of that sprite is the sword
Is enemy character within the rect of the sprite container? Is sword attack animation active? Take damage.
Is enemy character within the rect of the sprite container? Are they left of the center? Are they attacking? Warrior dies!
Wawawa
One Size to Rule them all You can make SpriteSheets with ImageMagick
or cut it into pieces
The active part of that sprite is the sword
Is enemy character within the rect of the sprite container? Is sword attack animation active? Take damage.
Is enemy character within the rect of the sprite container? Are they left of the center? Are they attacking? Warrior dies!
Wawawa
Re: Sprite sheets give me a headache
I did that years ago and not to avoid chopping a sprite sheet but to get blindingly fast animation in LiveCode.
You're welcome!
You're welcome!
-
- Livecode Opensource Backer
- Posts: 9477
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Sprite sheets give me a headache
Ah, I understand, but, nothing I ever do is blindingly fast.to get blindingly fast animation
Not always!One Size to Rule them all
- -
Great source: https://craftpix.net/