Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Need your Help About Sprite Movement Algo?
Old 06-22-2009, 06:49 AM Need your Help About Sprite Movement Algo?
Novice Talker

Posts: 11
Name: Jay Paul
Location: US
Trades: 0
Hi Friends,

as I know that most of the users of this forum are pretty well-informed when it comes to games.

The problem I am having is to do with making the Sprites move in an animated way when a control is pressed. For example, like most games, there is a sprite sheet and when the sprite moves you want the program to loop between two images to give the appearance that the sprite is actually walking/moving.

How are these types of things generally incorporated into the standard animation loop?

Thanks
Paul
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
jaypaul is offline
Reply With Quote
View Public Profile Visit jaypaul's homepage!
 
 
Register now for full access!
Old 06-23-2009, 05:37 PM Re: Need your Help About Sprite Movement Algo?
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
You could use an animated gif... that's probably the easiest. Another alternative would be to set a timer for movement and for swapping the image with a variable to track which image is available. If it's only 2 images, though, I'd go for the animated gif.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 06-25-2009, 02:10 AM Re: Need your Help About Sprite Movement Algo?
Novice Talker

Posts: 11
Name: Jay Paul
Location: US
Trades: 0
Hi

Thanks for your reply, you are right, i've doubled checked about this type issue and Animated gif is the right direction of set a timer for movement

appreciated your answer.

Thanks
Paul
jaypaul is offline
Reply With Quote
View Public Profile Visit jaypaul's homepage!
 
Reply     « Reply to Need your Help About Sprite Movement Algo?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24744 seconds with 12 queries