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! / character moving

Author
Message
Mr Inquisitive
20
Years of Service
User Offline
Joined: 5th Feb 2005
Location: Who Cares?
Posted: 10th Apr 2005 18:20
attached is my game in-progress. I know i used a complicated way to make my guy animated(which doesn't really work that well. Someone help me make that so it goes when the key is being pressed. As long as the key is being pressed.)i want to make the character i have made move down. I'll work from there. By the way, i use DB Classic

Horus Game Developments
freewebs.com/horusgames
D Ogre
21
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 11th Apr 2005 02:17 Edited at: 11th Apr 2005 02:21
Use the SPRITE command to animate your sprites.

Look up the command sytax under the HELP menu.
It should look like this:

SPRITE SpriteNumber,XPos,YPos,ImageNumber

Here is and example loop:



i = your image number or animation frame.
You must increment your frame number to get animation.
Mr Inquisitive
20
Years of Service
User Offline
Joined: 5th Feb 2005
Location: Who Cares?
Posted: 11th Apr 2005 05:28
yes, but that doesn't make it move!!!!

Horus Game Developments
freewebs.com/horusgames
D Ogre
21
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 12th Apr 2005 08:35
SPRITE SpriteNumber,X position,Y position,FrameNumber

You have to calculate the X and Y and sync update your loop to make a sprite move. You also have to draw each frame of your 2D sprite animation (walk, run jump, or whatever).

I told you I have source code for this in the 2D platformer post. YES, It works with DBC too!
UnderLord
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 15th Apr 2005 14:04
if upkey()=1 then inc sprite spritenumber,x,y,framenum

maybe that will work? or you could check out my tutorial in the thread another tutorial that is basically just movement but set in 2d space

When we talk to god, we're praying. When god talks to us, we're schizophrenic.
Schizophrenic beats eating alone.

Login to post a reply

Server time is: 2025-05-17 15:59:44
Your offset time is: 2025-05-17 15:59:44