More sprite width issues...

ModKeen mods Tiles and Sprites in all episodes of Commander Keen.
Post Reply
Snaily
Posts: 26
Joined: Sun Oct 19, 2003 11:06 am
Location: West of swEden

More sprite width issues...

Post by Snaily » Mon Apr 05, 2004 4:35 pm

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?

User avatar
adurdin
Site Founder
Posts: 546
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

Post by adurdin » Mon Apr 05, 2004 8:51 pm

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.

Snaily
Posts: 26
Joined: Sun Oct 19, 2003 11:06 am
Location: West of swEden

Post by Snaily » Tue Apr 06, 2004 6:53 am

Right. It's no problem, really, but I'm afraid I'll run into the infamous memory limit with all these big images.

Ilsoap
Posts: 197
Joined: Tue Sep 02, 2003 4:04 am
Location: Canada
Contact:

Post by Ilsoap » Tue Apr 06, 2004 7:04 am

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.

User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord » Tue Apr 06, 2004 9:54 am

Picture please.

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

Snaily
Posts: 26
Joined: Sun Oct 19, 2003 11:06 am
Location: West of swEden

Post by Snaily » Tue Apr 06, 2004 5:10 pm

So, wait, a sprites position is calculated from its hitbox? How would that work when the hitbox changes?

Post Reply