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 / help with animated 2D images please

Author
Message
Gyrich
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: Here, obviously.
Posted: 7th Feb 2006 10:21
Hello all

Wanted to know:

a) is it possible to have one animated 2d image, and play certain animations for that image whenever their needed? or is it necessary to save the seperate animation sequences as seperate files? i need to be able to call a specific animation of the image into play when certain criteria are met, such as a key being pressed or collision being detected.

b) regardless if it is possible or not, what image format would be best to use for animated images. this is for a 2-d game, with 1 800x600 background image, and 37-40 smaller images so performance is the focus. i know gif's can be animated, dunno if dbpro will take them tho...in any case, any help you guys can offer will be much appreciated.

Thank you.

DBPro User
PC: WinXP, AthlonXP 2100+ 1.7ghz, 80gb HD, Nvidia GeForce FX 5200 (128mb onboard RAM), 512mb DDR400 system RAM. Thank you for your help.
crighton
19
Years of Service
User Offline
Joined: 5th Nov 2005
Location: In your soup.
Posted: 7th Feb 2006 14:54
yes. sprites.

Have you tryed my work in progress, if not go and grab it. (populous WIP), near the end of the messages is the latest.

Anyway, wether you play it or not after you down load it, Look in the bitmap folder, there is 2 major items i think you are after.(good.bmp, evil.bmp)

both these have my guys drawn in every pose i needed so far for that game, then in db, i just load it up and cut into sections of 48*64(i think).

i use something like this to get the image's


then to animate a sprite, all you do is, at timed intervalls change the image number to that of the anim sequence. eg.



Of course you can do more controlled animation's for when walking and jumping ...ect

And the same process could be used for animated backgrouds/guis....ect.

Well thats the basics, hope this has helped.



Why are the forgotten always remembered? But no-one remembers me?!
Gyrich
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: Here, obviously.
Posted: 7th Feb 2006 18:20
niiiice crighton, thx. I can use that i think...

Have a good one.

DBPro User
PC: WinXP, AthlonXP 2100+ 1.7ghz, 80gb HD, Nvidia GeForce FX 5200 (128mb onboard RAM), 512mb DDR400 system RAM. Thank you for your help.
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 7th Feb 2006 21:21
If you are going to use the images as sprites (which I would recommend) then you don't even need to split the image up before hand.

There is something in the sprite commands that does it for you. I'm not near a DBP installed computer at the moment so I can't check but have a look in the sprites section of the help files.


Gyrich
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: Here, obviously.
Posted: 7th Feb 2006 21:43
i'll have a look scraggle, thx a lot. if, at any time you happen to find exactly what it is you are referring to, please feel free to point it out to me any way lol, but in the mean time i'll have a look and try to fig it out for myself. I'm not real informed on how sprites differ from bitmaps or other 2d images in dbpro, but don't feel the need to explain unless u just want to. I haven't searched the forums yet so i have no right to ask for help lol, im sure it's been explained before.

Have a good one.

DBPro User
PC: WinXP, AthlonXP 2100+ 1.7ghz, 80gb HD, Nvidia GeForce FX 5200 (128mb onboard RAM), 512mb DDR400 system RAM. Thank you for your help.
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 8th Feb 2006 11:44
CREATE ANIMATED SPRITE is the command I was thinking of. Then use PLAY SPRITE when you want to animate it. The help files for these commands are actually quite good and explain them well (a rare thing indeed!), so have a look and then feel free to ask again if you are still having problems


Gyrich
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: Here, obviously.
Posted: 8th Feb 2006 21:56
great, thx. just as a refresher, for the PLAY SPRITE command, i have to put it in a loop to play successive frames right? thought i read that somewhere...

DBPro User
PC: WinXP, AthlonXP 2100+ 1.7ghz, 80gb HD, Nvidia GeForce FX 5200 (128mb onboard RAM), 512mb DDR400 system RAM. Thank you for your help.

Login to post a reply

Server time is: 2024-11-27 06:42:08
Your offset time is: 2024-11-27 06:42:08