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.

DarkBASIC Professional Discussion / Sprite animation?

Author
Message
Mugen Wizardry
User Banned
Posted: 2nd Jan 2011 15:55 Edited at: 2nd Jan 2011 15:55
Hi all, I would like to make the attached bitmap as a sprite, and animate it in a 3d world, facing the camera. can i please have a small example?

Thanks!

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Mugen Wizardry
User Banned
Posted: 2nd Jan 2011 16:03
Here is an avi of the animation.

It should work EXACTLY like this, except a TRANSPARENT background, and a MUCH bigger sprite animation.

It also needs to work in a 3d world

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Mugen Wizardry
User Banned
Posted: 2nd Jan 2011 16:18 Edited at: 2nd Jan 2011 16:19
i have some code for avi.

but i want it to be a transparent background sprite
that animates.



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Mugen Wizardry
User Banned
Posted: 2nd Jan 2011 17:58 Edited at: 2nd Jan 2011 17:59
New code, but I still can't turn it into one continuous, transparent background animated sprite..



the sprite is attached to 1 of the older posts

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 3rd Jan 2011 05:36
you're not gonna display sprites in a 3D environment, sprites are meant for 2D games. If you want to display it in 3D, break the image up so each frame is a separate image. Texture a 3D plane with an image then continuously loop through retexturing with another image in the sequence. Use a timer to control the speed of the animation.

"Only the educated are free" ~Epictetus
"Imagination is more important than knowledge..." ~Einstein
bitJericho
23
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 3rd Jan 2011 11:14
Quote: "Texture a 3D plane with an image then continuously loop through retexturing with another image in the sequence. "


This is very slow. You're better off using a sprite sheet and changing the UV coordinates that the plain uses for texturing.

[center]
Join the TGC Group!
http://tehcodez.groups.live.com
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 4th Jan 2011 19:47
Or make the animation an animated GIF file, and play it to the object.

My signature is NOT a moderator plaything! Stop changing it!
Mugen Wizardry
User Banned
Posted: 4th Jan 2011 20:42
i played it to an mpeg

thanks guys

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!

Login to post a reply

Server time is: 2026-07-19 03:41:50
Your offset time is: 2026-07-19 03:41:50