Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> Help:Now THIS is simple...right?, Sprite changing and Animation end?
United States
cappy
Posted: Dec 29 2007, 10:58 PM
Quote Post


remember, cappy loves you.
[*]

Group Icon
Group: Members
Posts: 959
Member No.: 3489
Joined: 27-March 07

Status: (0d) [--]


I know I know, The title sounds like a difficult question, but in fact is the
opposite.
OK, Heres the lay down for this one, I'm getting deep with in my game I'm working on and stoped at a certian part of the game where I would need too use
more then just one sprite in a jump pose. I'm going too use the "Up" pose, and then the "Down" pose. I'm sure I'll use more then jus 2 simple sprites later in the game so I would like too ask:
BOTTOM LINE
How can I make both sprites animate only once, the the last sprite
gose back too the first one. I also seen this done in a cupple of engines...
I'm sure one of them was Ultamate Mario Engine...I think.
THINGS I TRIED
None so far..well none that would come close too helping me...


--------------------
QUOTE (Mr. Aforcer @ Sep 21 2009, 09:51 PM)
Bootylicious even.
PMEmail PosterMSN
Top
United States
Grant
Posted: Dec 29 2007, 11:06 PM
Quote Post


John Freeman said
[*][*][*][*][*]
[*][*][*]

Group Icon
Group: Members
Posts: 8260
Member No.: 2900
Joined: 31-October 06

Status: (0d) [--]


I'm sorry, but I don't quite understand what you want to do, from your description.

Could you try explaining in more detail how each sprite (Up pose and Down pose) is supposed to animate?

Try explaining it in terms of specific subimages, like Image 0 and Image 1 and any other subimages of the animation of each, if each sprite has more than one animation subimage.


--------------------
user posted image

QUOTE (oh youtube trolls)
u guys r retarded hippocrates

QUOTE (Piemanthe3rd)
Pie is not random. I wish people would realize this.
PMEmail PosterUsers WebsiteAOLMSN
Top
United States
cappy
Posted: Dec 29 2007, 11:14 PM
Quote Post


remember, cappy loves you.
[*]

Group Icon
Group: Members
Posts: 959
Member No.: 3489
Joined: 27-March 07

Status: (0d) [--]


QUOTE (Grant @ Dec 29 2007, 11:06 PM)
I'm sorry, but I don't quite understand what you want to do, from your description.

Could you try explaining in more detail how each sprite (Up pose and Down pose) is supposed to animate?

Try explaining it in terms of specific subimages, like Image 0 and Image 1 and any other subimages of the animation of each, if each sprite has more than one animation subimage.


Ok.
user posted image
Mario's going up^^

user posted image
...And then down^^
Pretty much only 2 images. I'm not sure you'll need the speed but...0.2
-2 subimages


--------------------
QUOTE (Mr. Aforcer @ Sep 21 2009, 09:51 PM)
Bootylicious even.
PMEmail PosterMSN
Top
United States
Grant
Posted: Dec 29 2007, 11:17 PM
Quote Post


John Freeman said
[*][*][*][*][*]
[*][*][*]

Group Icon
Group: Members
Posts: 8260
Member No.: 2900
Joined: 31-October 06

Status: (0d) [--]


So wait, are those subimages of the same sprite?

Or are they two different sprites, with one subimage of each shown?


And are you just trying to make Mario be in his jumping pose when he's going up, and his falling pose when he's going down? Because there's an easy way of doing that.


--------------------
user posted image

QUOTE (oh youtube trolls)
u guys r retarded hippocrates

QUOTE (Piemanthe3rd)
Pie is not random. I wish people would realize this.
PMEmail PosterUsers WebsiteAOLMSN
Top
United States
cappy
Posted: Dec 29 2007, 11:29 PM
Quote Post


remember, cappy loves you.
[*]

Group Icon
Group: Members
Posts: 959
Member No.: 3489
Joined: 27-March 07

Status: (0d) [--]


QUOTE (Grant @ Dec 29 2007, 11:17 PM)
So wait, are those subimages of the same sprite?

Or are they two different sprites, with one subimage of each shown?


And are you just trying to make Mario be in his jumping pose when he's going up, and his falling pose when he's going down? Because there's an easy way of doing that.

Same sprite. But with 2 subimages.


--------------------
QUOTE (Mr. Aforcer @ Sep 21 2009, 09:51 PM)
Bootylicious even.
PMEmail PosterMSN
Top
United States
Grant
Posted: Dec 29 2007, 11:36 PM
Quote Post


John Freeman said
[*][*][*][*][*]
[*][*][*]

Group Icon
Group: Members
Posts: 8260
Member No.: 2900
Joined: 31-October 06

Status: (0d) [--]


In that case, if what you want to do is change the image to the jumping one when he's moving upward and to the falling one if he's moving downward, then this is what you could do:

Each time Mario is jumping or falling, set the image_speed to 0. Each time he is walking or doing something else which requires an animation, set the image_speed to the ordinary value that you use for Mario's sprites.

Set the image_index to 0 if Mario's vspeed is less than 0 (i.e., if he's going up), and set the image_index to 1 if Mario's vspeed is greater than 0 (i.e., if he's falling down).


This way, Mario won't animate (no animation speed) if he's in one of the up/down poses, so he won't flip back and forth between the animations repeatedly while he's jumping. Also, the specific subimage of Mario's sprite will be set appropriately based on if he's going up or down (it will be Subimage 0 (jumping) if he's going up and Subimage 1 (falling) if he's going down).

This post has been edited by Grant on Dec 29 2007, 11:36 PM


--------------------
user posted image

QUOTE (oh youtube trolls)
u guys r retarded hippocrates

QUOTE (Piemanthe3rd)
Pie is not random. I wish people would realize this.
PMEmail PosterUsers WebsiteAOLMSN
Top
United States
cappy
Posted: Dec 29 2007, 11:48 PM
Quote Post


remember, cappy loves you.
[*]

Group Icon
Group: Members
Posts: 959
Member No.: 3489
Joined: 27-March 07

Status: (0d) [--]


Thanks shas! This will help my coding as well!



--------------------
QUOTE (Mr. Aforcer @ Sep 21 2009, 09:51 PM)
Bootylicious even.
PMEmail PosterMSN
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0521 ]   [ 14 queries used ]   [ GZIP Enabled ]   [ Server Load: 0.52 ]