Author Topic: Sprite Issues with Movement and Jumping  (Read 7141 times)

Retro

  • Visitor
  • *
  • Posts: 3
    • View Profile
    • Email
Sprite Issues with Movement and Jumping
« on: 2007-10-06, 10:14:36 AM »
My first issue has to do with my sprite running constantly - even when he is standing still.  I have checked the box to reset the sprite to initial stance when he isn't moving, but that frame of him standing still is still in the running animation.

My second issue has to do with him jumping.  When you press up to jump and hold it down, he flys.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Sprite Issues with Movement and Jumping
« Reply #1 on: 2007-10-06, 06:09:04 PM »
Under frames tab: check "Correlate animation speed with velocity" to solve the animation problem

Under motion tab: check "Up requires solid" to solve the flying problem
Edward Dassmesser

Retro

  • Visitor
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Sprite Issues with Movement and Jumping
« Reply #2 on: 2007-10-08, 04:42:23 PM »
I appreciate the help, but I don't think I worded my first question properly.  When my "player" runs..  the pose that he should be at while stationary is repeated in the sequence, so it looks like he is running properly but when it loops it displays the frame of him standing as well.  Paired to that, when the motion stops, it does not go back to the frame of him standing still - the sprite stops at whatever frame he is currently in.

You did fix the jumping issue, thank you.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Sprite Issues with Movement and Jumping
« Reply #3 on: 2007-10-08, 05:07:49 PM »
There is no feature in GameDev 1.x to assist in excluding the standing image from the running animation.  The purpose of the "reset" checkbox is to allow you to reset the image to the frame that most closely resembles standing (by making it the first frame and checking the box) rather than just stopping on any arbitrary frame that was active when the player stopped moving.  But it's not smart enough to exclude the standing frame from the running animation.  I'd suggest eliminating the standing frame, and just make sure that the first frame of your running animation is one that looks OK when the sprite is standing still.

Also, if the sprite is not resetting to the first frame when the sprite stops moving, double-check that the checkbox is actually checked (it sounds like you saw no change between this and the box being un-checked).  It's easy to forget to press Update after making a change.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Sprite Issues with Movement and Jumping
« Reply #4 on: 2007-10-08, 08:21:31 PM »
You can also have different states for accelerating and not accelerating.  That may be what you're looking for.
See the Forest graphics sample to see how this works with the Player sprite (2nd in the list)
Edward Dassmesser