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! / 2D Sprite animation

Author
Message
Crystal Darkness
21
Years of Service
User Offline
Joined: 7th Feb 2005
Location: United States
Posted: 14th Oct 2005 20:06
I am having trouble with sprite animation. I guess i just learned that you cannot just use load image to load in an animated GIF. Well, I am not sure how to do it, then. Could someone give me some insight?

Regards,
Crystal Darkness
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 14th Oct 2005 22:41
Since you didn't say if you were using Classic or Pro i'm going to assume Classic.

When you want animations in Classic you load up a picture with all the different images in a row and grab each one as a separate image. Then in code you use a variable for the image the sprite uses. In this case MA is the variable thats a number from 100 to 113... which represents image numbers 100 to 113.

Hope this helps.

Crystal Darkness
21
Years of Service
User Offline
Joined: 7th Feb 2005
Location: United States
Posted: 17th Oct 2005 19:56
Oh, I do apologize. I am using DBPro

Regards,
Crystal Darkness
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 17th Oct 2005 21:31 Edited at: 17th Oct 2005 21:36
np In Pro it is a bit easier because you can use "create animated sprite" and have the computer figure out the size of each image... all you have to do is make sure each image in the graphic you create is exactly the same size.

Syntax: create animated sprite spritenumber,filename$,number of frames across,number of frames down,image number

To animate: play sprite spritenumber,first frame of animation,last frame of animation,time delay

This uses the same graphic as my first message. The play sprite command must be in the do/loop so that it animates... it shows a new frame each time the play sprite command is ran and the delay has been reached.

Crystal Darkness
21
Years of Service
User Offline
Joined: 7th Feb 2005
Location: United States
Posted: 18th Oct 2005 20:01
Great! Thanks! ... you'd think they'd allow you to put in an animated GIF, huh? Oh well! Thanks again!

Regards,
CD
kombucha
20
Years of Service
User Offline
Joined: 6th Nov 2005
Location: n00b-land
Posted: 10th Nov 2005 02:58
wait wait wait - can bmps have animation in them? they also can't have transparency - here, let me explain my problem (it is very similar).

I have an animated .gif file I want to use as a sprite and I am using DBPro. What is the simplest way to import this looping the animation and keeping (index) transparency? Thanks!

Your signature has been erased by a mod, NO political signatures please.

Login to post a reply

Server time is: 2026-07-06 20:50:13
Your offset time is: 2026-07-06 20:50:13