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.

Dark GDK / db Create Animated Sprite function

Author
Message
ecurbed
15
Years of Service
User Offline
Joined: 2nd Aug 2009
Location:
Posted: 4th Aug 2009 23:00
I am trying to display an image but it is very small. How does the height and width work?
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 5th Aug 2009 00:37 Edited at: 5th Aug 2009 00:47
EDIT: sorry misunderstood the question, I have not used animated sprites for a while and I dont have the documetation in front of me.

I will get back to you if no one else steps in.

Here is what I remember, sorry its not much.
Your image should be a lot of smaller images representing your animation frames, is that what you have?

Then you use the command to tell it how many images(animation frames) you have in your image.

Ive just remembered, the first tutorial shows you exactly how you do it, take a look at that.
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 5th Aug 2009 07:11
You tell it the file name and how many frames wide it is and how many frames high it is and it figures the size evenly.

New Site! Check it out \/
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 5th Aug 2009 08:33
There is a good example of using and setting up animated sprites in the Dark Invaders tutorial that comes with DarkGDK.

Alot of the sprites in that game are animated, I think it should give you a basic understanding of how to setup your own animated sprites. Then, once you know how they are working, I dont think it would be too hard to customize the techniques to do what you want or to work with different image types.

Also, the very first DarkGDK "Hello World" tutorial(the one matty halewood is referring to I think) uses a very basic animated sprite method to rotate a pic of an earth globe.

Both of those tutorials have well written PDF docs that you should be able to find somewhere in the folders for the tutorials. The PDF's walk you through, in a step by step, written for new DarkGDK users manner , how the tut's work and how the commands work and how to set them up etc.

Hope it helps

If it ain't broke.... DONT FIX IT !!!

Login to post a reply

Server time is: 2024-10-01 10:24:43
Your offset time is: 2024-10-01 10:24:43