Game Development Community

Do i have to make various state images same size?

by EeKay · in Torque Game Builder · 09/28/2005 (5:50 am) · 2 replies

Hi,

I've been away for some thime on the forums because of the 1000 things in my live that avoided me from building my own game;

But since i'm back now i got a question:

I made a couple images (no animations yet) for the states standing(with nose left and one for nose right) and one for ducking, also in both directions.

I tried to use a smaller (read: not as high) image for the duck position and tried to resize the player to fit correctly. Then i noticed my character to be resized on both sides (it is made smaller on top and bottom so it appears floating higher then other objects)...

After that i just resized the image for the duck state so its height is equal to the images for the standing state. Is this the good way because it works now (it appears to be ducking instead of shrinking both ways) but i don't know if this is going to cause me trouble later on with collision detection (i dont want my character to die in a horrible whay if its ducking underneath the object, for instance hehe). Or is the PolyCustom just for that problem ?

Thanks and remember: i'm watching you all! ;)

:: EeKay ::

About the author

Recent Threads


#1
09/28/2005 (6:27 am)
I suspect that keeping the image the same size is going to be your best option. You will need to change the collision poly size when the player ducks, but you can do this in your scripts for the key press and key release of the duck action.

Depending on the shape of your character sprite, you might be able to use a PolyPrimitive, but when you scale them, they shrink the same amount on both sides. So shrinking it 50% in the Y direction will leave the top and bottom of the sprite without a collision detection zone. So you will need to use a PolyCustom to ensure that the players feet will still detect collisions.
#2
10/02/2005 (11:45 am)
Ok thanks,

i'm going to try this soon :)

:: EeKay ::