Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Sprite movement and animation problem plz help me!!

Author
Message
Long Striker
20
Years of Service
User Offline
Joined: 16th Apr 2005
Location:
Posted: 16th Apr 2005 10:53
The sprite animation is moving way to fast because of the sync is 30
but if i have it lower the sprite dose not move to the right smoothly. So how do i get smooth movement and and slower animation??
Long Striker
20
Years of Service
User Offline
Joined: 16th Apr 2005
Location:
Posted: 17th Apr 2005 06:19
Sorry there was a error with the code but here it is agine.
JoeB
21
Years of Service
User Offline
Joined: 9th Aug 2003
Location: Maine, USA
Posted: 19th Apr 2005 01:05
First problem I noticed is you are going through all of your frames in each loop. It probebly won't be a problem right now since animating your sprite is the only thing your program is doing right now. But it will definitly be a problem when you add other elements to your game. Here's what I would do.

take out the FOR ... NEXT in your loop. and do the following.




I slowed the framerate by using a timer. I'm not sure if this is the most efficient, but it works well for me. You can adjust the spead of the animation by chaning the following line.



I hope that helps you out.
Long Striker
20
Years of Service
User Offline
Joined: 16th Apr 2005
Location:
Posted: 20th Apr 2005 06:52
Thank you so much it really help me alot!!!!!!!!

Login to post a reply

Server time is: 2025-05-17 09:36:58
Your offset time is: 2025-05-17 09:36:58