Scrolling Game Development Kit Forum

SGDK Version 1 => General Discussion => Topic started by: billybob884 on 2005-06-12, 08:52:18 PM

Title: Quick question
Post by: billybob884 on 2005-06-12, 08:52:18 PM
Quick question, a sprites speed is uniform through all of its states right? like theres no way (w/o scripting, thank you :) ) to make maybe a few states like 1/2 speed? The only reason I ask is becuase today i started working on a crouching state and a crawling state for the down accellerating and down left/right accel. states, and itd look a little odd to have in crawling at regular walking speed, but then again, how many chameleons do you see walking on their hind-legs? heh, i guess it really wouldnt be that odd. oh well, just curious
Title: Quick question
Post by: Eastfist on 2005-06-12, 10:08:29 PM
It is just animation after all... just put more instances of that frame in.
Title: Quick question
Post by: billybob884 on 2005-06-13, 04:33:18 AM
No, no. I meant the walking speed
Title: Quick question
Post by: bluemonkmn on 2005-06-13, 06:44:19 AM
I have two ideas:

1) You could make a global function that activates when the player is pushing down and right that teleports the player left 1 or 2 pixels (relative to where he is), and another for when the player is pushing down and left that teleports the player right 1 or 2 pixels.  This should slow him down a bit.

2) Switch to another sprite definition when the player presses down to crouch.  Switch back to the normal state when he presses up.
Title: Quick question
Post by: billybob884 on 2005-06-13, 01:04:34 PM
i may try #1, the only reason i dont like #2 is becuase when the player switches to a hurt sprite, and something changes the player again before the "timer" runs out, it always seems to screw up the change back to the regular sprite.