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.

Newcomers DBPro Corner / Animated 2D Sprite

Author
Message
Igglepud
14
Years of Service
User Offline
Joined: 14th Aug 2010
Location:
Posted: 22nd Aug 2010 21:20
If I load an animated GIF will it play automatically or do I need to somehow give it commands on when to switch frames? I searched for some things about it, and some say I can't even use GIF files while others say I can. All I want is for the image to appear, run its animation once or twice, then disappear.

www.dustinmcmurry.com
luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 22nd Aug 2010 22:56
Myt best bet is to try if it's possible to use GIF image for whatever you need it.In case it's not you can try to rip all frames out of it and make one normal image with them all then make animated sprite within dbpro.I'm sure there could be software for frame extraction, even free one.If there isn't i'm positive there is other way to do this manually.In any case you can do it!

Coding is My Kung Fu!
And My Kung Fu is better than Yours!
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 23rd Aug 2010 02:00
Yeah, .gif won't load anymore. It's much better to do what Luskos says. Rip out the individual frames and make it a .png.

Igglepud
14
Years of Service
User Offline
Joined: 14th Aug 2010
Location:
Posted: 25th Aug 2010 08:01
I ended up using three different JPG files with a wait command between them. Kind of sloppy, but it worked.

www.dustinmcmurry.com
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 25th Aug 2010 11:58
.jpg are the worst to use because they change colors. It's better to use .png.

Look at the attached image. The picture is a screen capture of Paint Shop Pro. The image on the left side is saved as a .png the one on the right side is the same image saved as a .jpg.

I used a tool called the magic wand to highlight an area with the same colors. I clicked on the .png in the pink area then I clicked in the same area on the .jpg image. On the .png it was able to find the entire pink area but on the .jpg it could not because the colors were changed in the .jpg saving process. Using .png will also allow you to create transparent areas... something .jpg and .bmp don't do at all.

Attachments

Login to view attachments
Igglepud
14
Years of Service
User Offline
Joined: 14th Aug 2010
Location:
Posted: 26th Aug 2010 02:10
Good lord...I'm a photographer and I didn't know that. I always wondered why when I convert my TIF files to JPG for my desktop BG at work they look different. Now I know.

www.dustinmcmurry.com
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 26th Aug 2010 08:51
For backgrounds .bmp would be better since it doesn't change colors like .jpg does. But for programming .png or .dds is the way to go. .dds is supposed to load faster in Darkbasic Pro and allows transparencies too but I mainly use .png because the version of Paint Shop Pro I use doesn't save/load .dds files.

Igglepud
14
Years of Service
User Offline
Joined: 14th Aug 2010
Location:
Posted: 27th Aug 2010 02:05
I'll stick with .png since I am familiar with them.

www.dustinmcmurry.com

Login to post a reply

Server time is: 2024-11-23 10:57:23
Your offset time is: 2024-11-23 10:57:23