Door animation

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
FireCross88
Posts: 14
Joined: Wed Jul 04, 2007 4:57 am

Door animation

Post by FireCross88 »

Hi,

I'm trying to make a door animation in AVI format that plays whenever the player presses the 'Action' button at a door. (Similar to the style in earlier versions of Resident Evil.)

Does anyone have code samples on transitioning between playing the game, playing the door video, and then resuming the game?

Thanks!
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

What you'd do is fade out the scene and then fade in the video. When the video finishes you'd fade out and then fade back into the new scene on the other side of the door.

There's a fader gui element i think which you can use to fade in and out, check the API.
Image Image Image
FireCross88
Posts: 14
Joined: Wed Jul 04, 2007 4:57 am

Post by FireCross88 »

Thanks for the reply. But yes, I know about fading in and fading out. What I need to do is find out HOW to get the video to play automatically.

Like:

(if doorState == "open")
video::video.play("Door animation.avi");

Or whatever.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

well, you can't play avis with standart Irrlicht...
but there is a thread about playing avis in a texture !!! ;)
search the forums for this...

or if you're using Irrlicht v1.2 you also can use my IrrExtensions, there I included an avi player !!! ;)
(and for Irrlicht v1.3 you'll have to edit the sources "by hand" then)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
FireCross88
Posts: 14
Joined: Wed Jul 04, 2007 4:57 am

Post by FireCross88 »

Edit the sources by hand? What do you mean? Why would something be supported in the earlier versions of Irrlicht and then later removed?

I don't really think it's better to play the avi in a texture. That's kinda a weird way of doing it.

Cos then I have to add a timer to automatically remove myself from the map with small room and a floating texture after 5 seconds (the time taken for the door) or something.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

If not using a texture what do you think you can use? IMHO the idea of doing a door animation as an avi movie is the weird point in this setup.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

FireCross88 wrote:Edit the sources by hand? What do you mean?
you'll have to edit the Irrlicht source code (add the new features) and recompile the dll...
and as far as my IrrExtensions only work up to version 1.2 of the engine you'll have to edit the sources directly...
for v1.2 my IrrExtensiins does this for you... ;)
FireCross88 wrote:Why would something be supported in the earlier versions of Irrlicht and then later removed?
no, this was never supported by Irrlicht, it's a feature I added by my self (like all of my extensions), this is why you have to edit the sources...
FireCross88 wrote:I don't really think it's better to play the avi in a texture. That's kinda a weird way of doing it.
this doesn't mean the avi is attached to a mesh (but you could), it's because you need to store the graphics data from the avi somewhere and a texture is used for this...
FireCross88 wrote:Cos then I have to add a timer to automatically remove myself from the map with small room and a floating texture after 5 seconds (the time taken for the door) or something.
no, you can draw the texture over the whole screen and use the playing time as the timer (check when the avi is ended)...
hybrid wrote:IMHO the idea of doing a door animation as an avi movie is the weird point in this setup.
I agree with this ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
miha
Posts: 32
Joined: Tue Jun 26, 2007 9:27 pm
Location: Serbia

Post by miha »

Maybe you could do a scene with black clear color, and a door
that opens, -directly in engine...It's the way i would do it.
But maybe using avi you get better loading speed for the
next scene ? try it man...
Post Reply