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 / Need help with 2d animation image

Author
Message
PowerFang
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location: Australia (But currently in the USA)
Posted: 6th Feb 2004 22:00
I'm trying to make an animated sprite using only 1 image instead of 3 i'm doing currently.

Now its a horse running so it goes image: 1,2,3,2 rinse and repeat

So i put the 4 images into 1 image organised like this:

1 2

3 4

Each is 10 * 10 so the new image is 20 * 20.

My question is this:

How do i then turn that image into an animated sprite. I tried using the Animated Sprite command but i'm either not doing it right or something. Could someone write a quick snippet of code to show me how?
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 7th Feb 2004 00:30
I believe DB pro's Animated Sprite command uses .gif files. You can have your own animation function. Every loop call a function that checks to see if enough time has gone by, and if it has, then get the next part of the image and use that. I'd provide you with code, but I'm a DBClassic dude.

good luck,
crazy donuts

Juvenile Industries
Current Project: KillZone(FPS)
Soon to come:An rts, and a snowball fight game
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Feb 2004 00:39
Nope. It uses standard formats, but there are problems with animating (see the bug forum )

The easiest way is to load your images individually and animate them yourself.



For free Plug-ins, source and the DBPro Interface library for Visual C++ 6 and .NET
http://www.matrix1.demon.co.uk
PowerFang
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location: Australia (But currently in the USA)
Posted: 9th Feb 2004 01:35
yeah thanks...thats what i have been doing but i wanted to try and cut down my code to make it more efficient.

Login to post a reply

Server time is: 2024-11-26 04:30:35
Your offset time is: 2024-11-26 04:30:35