Page 1 of 1

More sprite width issues...

Posted: Mon Apr 05, 2004 4:35 pm
by Snaily
Yes, my widths are a power of 24 =).

I have another problem: it seems Keen:Vorticons (atleast) can't handle differently sized sprites for different animation frames. Is this an issue with ModKeen or is it inherent to Keen itself?

Posted: Mon Apr 05, 2004 8:51 pm
by adurdin
It can certainly handle sprites of different *heights* in different frames, but sprites with different widths? I wouldn't be surprised if the engine wouldn't handle that. It's not a problem with ModKeen, but with the Keen engine, so you'll have to work around it.

Posted: Tue Apr 06, 2004 6:53 am
by Snaily
Right. It's no problem, really, but I'm afraid I'll run into the infamous memory limit with all these big images.

Posted: Tue Apr 06, 2004 7:04 am
by Ilsoap
Well, sometimes you can creatively use the pink-on-grey hitbox thing. In Lego Keen, when I brought in the sprite animation that replaces the Vorticon's death animation, I realized I calculated wrong, and that I'd need a width of 49 for it to animate correctly (instead of 48). Fortunately, though, I had an extra couple of pixels on one side, and so I moved the hitbox over by one pixel, and everything aligned perfectly.

A better way to describe this would be if you had a sprite that waved around a large hammer. In frame 1, his arm is holding his hammer behind his head, but in frame 2, his arm is holding his hammer in front of his head. If the pictures are, say, 24 pixels wide, you would probably have to have an area 32 pixels wide for the picture to be in for it to line up properly, but if you just move the hitbox to a new position, it will line up, and you won't have to waste pixels on the left or right side of your frame.

I don't think any of that made sense... a picture would definitely be worth a thousand words here... oh well.

Posted: Tue Apr 06, 2004 9:54 am
by levellord
Picture please.

(Hammer to the right, up a bit,... Say cheese!)

Posted: Tue Apr 06, 2004 5:10 pm
by Snaily
So, wait, a sprites position is calculated from its hitbox? How would that work when the hitbox changes?