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! / Plat4m Help

Author
Message
Punisher
21
Years of Service
User Offline
Joined: 20th Mar 2004
Location:
Posted: 30th Mar 2004 16:06
I have having trouble with the playable character. What I want to do is ake the character breathe (image 1 and 2) with he isn't moving and make the character appear as if he is walking / running when you press the right or left arrow keys (images 1 and 3-10). Please help. Also I would appreciate it if you could tell me or show me how to make him jump so that he lands on the fround without floating up like he is flying and how could I make it so, when he jumps, he lands on a platform? Mych appreciated.

Frank Castle is Dead
Punisher
21
Years of Service
User Offline
Joined: 20th Mar 2004
Location:
Posted: 30th Mar 2004 17:36
no reply?

Frank Castle is Dead
Code Stealer
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 30th Mar 2004 18:37
you need to set up a system that feeds the correct frame of animation in when you draw your sprite. for example:

do

if playermove=standstill
frame=frame+1
if frame<0 then frame=1
if frame>2 then frame=1
endif

if playermove=walking
if frame<0 then frame=3
if frame>2 then frame=3
frame=frame+1
endif

if playermove=jumping
frame=jumpframe
endif

sprite 1,x,y,frame

sync
loop


of course, the best way to do it is with an array or data statement, where each data particle is a frame number, like for your walk cycle I assume you want it to be this

data 1,3,4,5,6,7,8,9,10

However, Im not sure how to properly set the data read statement, but Im going to look into it this weekend...I need to get my graphics working, and Im gonna need to manage about 3000 frames...

GIve me more power!
Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 31st Mar 2004 03:42
You might want to set a timer in that loop so that the sprite doesn't animate so fast that it's just a blur. Like put a "framerate=timer()+150" in your if/endif and a condition in the actual if statement that includes the timer like "and timer() = > framerate". Unless there's a built in framerate for sprites... I never use sprites, so I wouldn't know... I use a tile system and refresh all my images manually using paste image.

Quote: " Timesoft - Your wife is death. How? NO idea.
But it is murder. REVENGE!!!!!!!!!"

Hands down the funniest synopsis for a game ever. All your base are belong to us!

Login to post a reply

Server time is: 2025-06-30 07:33:38
Your offset time is: 2025-06-30 07:33:38