A Jumping Ball as Main Character

millerbrother1millerbrother1 Member Posts: 108
edited November -1 in Working with GS (Mac)
I'm making a jumping ball as my main character for a small platform game. Instead of walking across the screen he "hops" and I want the artwork to be smooth "squash & stretch" style animation. I can get my character to "Jump" but I want the artwork to swap out a different points in the arc of motion. See the image on the url below for an example of what I'm talking about.

http://i34.tinypic.com/25z5yll.jpg

My question is, how do I swap out images mid jump?

Chris

Comments

  • HachikoHachiko Member Posts: 330
    yargh, that doesn't seem that easy :\
    I think you could have an animation starting when the jump start (so, when Motion.Y is greater than 0), an animation that doesn't loop and that doesn't restore the actor image (or that it restore, depends on what actor image you have).
    This animation should have that "bouncy" effect at the start, and end with the simple ball. Then, when the ball start falling (when motion.Y is less than 0), have another animation effect, probably the same one but inverted. It start with the ball, and it ends with the squished ball.
    That waaay it should work. But it really depends on the height of the jump. If the jump is too big, in the falling it would become squishy in mid air.
    If instead you want just a "squishy" effect every time you jump or every time the ball touch the ground after a jump, make the start animation jump as already suggested, and leave the ball as it is in the falling. When the ball touch the ground after a jump (if you have a jump trigger, like a boolean attribute, this should work), go with animation "squishy".
    hope this helps :)
  • millerbrother1millerbrother1 Member Posts: 108
    Thanks Hachiko -

    I think you were on the right track. I found this post as well. Will try it now.

    http://gamesalad.com/forums/topic.php?id=6825
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    A couple of problems with using animation. One is that it can be tough on FPS if you have a bunch of images. The other is that all of the png files should be the same size which means that you may get it looking great, but as the image changes the actor size is not so therefore the collision area is not changing. So it may be frustrating a bullet appears to miss you and yet GS detects a collision and your ball character dies. I would try playing around with the width and height of the actual actor and not the image.
  • millerbrother1millerbrother1 Member Posts: 108
    You are right Scitunes. While the animation for my hopping character looks great, it creates an invisible larger collision space that will cause premature enemy attacks. (see the attached pic - highlighted animation in red box)

    http://tinypic.com/r/x5bex3/4

    So, my question is...can I accomplish this with some kind of acceleration force on the character when arrows are pressed? I still want the image swap for the "bouncyness" factor.

    Thanks for your advice. I'm a newbie so I'm
  • chosenonestudioschosenonestudios Member Posts: 1,714
    millerbrother1 said:
    You are right Scitunes. While the animation for my hopping character looks great, it creates an invisible larger collision space that will cause premature enemy attacks. (see the attached pic - highlighted animation in red box)

    http://tinypic.com/r/x5bex3/4

    So, my question is...can I accomplish this with some kind of acceleration force on the character when arrows are pressed? I still want the image swap for the "bouncyness" factor.

    Thanks for your advice. I'm a newbie so I'm

    If you have it working the way you want I'd leave it like that. What I would recommend you do is to create a new actor with the size you, want say 50x50 and constrain this actors position to your main actor, and then make everything collide with the invisible actor. I think that makes sense, maybe? Lemme know if you need help. :D

    -Will
  • millerbrother1millerbrother1 Member Posts: 108
    That's a great idea. I think it might work. I'll try it and let you know.

    -chris
Sign In or Register to comment.