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.

DarkBASIC Discussion / animating sprite

Author
Message
Dark Dragon
19
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 10th Jul 2007 20:44
Hey guys, how do you make animations for sprites?
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 10th Jul 2007 23:01 Edited at: 10th Jul 2007 23:02
Ideally with a sprite animation program, though some paint programs have animation capabilities. Animation Shop that comes with Paint Shop Pro springs to mind.

I'm writing a sprite designer for my 2D Scrolling System but as it's not yet finished, it's not going to help you at the moment.

You can always do it manually in a paint program too. Just create a grid, draw the first animation frame, copy it to the second frame and modify it. Repeat until you have all the frames you require.

Save the whole grid as an image then load it into DB and cut out each frame - saving them as separate images ready to load and use with the sprite...

TDK_Man

Dark Dragon
19
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 10th Jul 2007 23:50
could i have an example? I dont follow.....
Dark Dragon
19
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 11th Jul 2007 15:14 Edited at: 11th Jul 2007 15:14
Never mind.... I figured it out(what you said), I think
LBFN
19
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 11th Jul 2007 15:34
@ DD

Using a paint program, draw your sprites and load the subsequent bitmap (.jpg) into your program. You then write the code so that your program will 'pull' images off of the loaded bitmap.

There are at least a couple of ways you can do this. If all of your sprite images are going to be the same size, simply make a grid of that size on your bitmap, draw the images within this grid and put the code in to grab the images. You can also pull random sizes of sprites by using data statements. An example:



Hope this helps.

LB
Dark Dragon
19
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 11th Jul 2007 17:06
Hmmm...that did help! Now I get it!

Login to post a reply

Server time is: 2026-07-06 03:25:30
Your offset time is: 2026-07-06 03:25:30