How to display animated 2D graphics?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Weng
Posts: 97
Joined: Tue Oct 03, 2006 4:23 pm
Location: Singapore

How to display animated 2D graphics?

Post by Weng »

I would like to create a 2D game with animated animals. But it seems like Irrlicht does not support the gif format as the program crashes when I tried it out.

Is there other way to display animated 2D images? :?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, have a look at the examples that come with the Irrlicht SDK. There's even one named 2dgraphics. And the (tech)demo also contains an animated portal (drawn in 3d, but using 2d techniques). Animated GIF is a pretty lousy format for gameplay (especially because it's just a set of images, there's no special feature which would make animated gifs advanced over any other format.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

I think someone should add an official image animator into the sdk.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

There is an official image animator... it's the texture animator that you can apply to billboards (or any scene node i suppose..).

Weng, I used this website to get the source images of a .gif seperated out into individual images and then used the texture animator to play the animation in irrlicht.
Image Image Image
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

it's the texture animator that you can apply to billboards (or any scene node i suppose..).
How about non-texture one? I mean for 2dgraphics.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Non texture one? You mean like draw2DTexture instead of using a billboard?

Using a billboard is probably easier but if you don't want to then you could always just handle the animation yourself, it's not particularly hard, just update the texture to the next one in the chain every X milliseconds.
Image Image Image
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

I did simple animated sprite class, you may look at it:
http://irrlicht.sourceforge.net/phpBB2/ ... highlight=
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

http://hge.relishgames.com/

for pure 2d games.

Im not discrediting irrlicht in any way at all...
BUt this is a 2d engine.

Someone port it to irrlicht, its free and OS
Post Reply