Issues with Fade In / FadeOut / Player Leaves Room in 3.0 / DX9

Started by Ali, Sat 08/03/2008 15:29:34

Previous topic - Next topic

Ali

Hi,

I've run into a couple of problems with fade ins and fade outs which I couldn't find when searching. I'm not using the beta, because I'm still getting to grips with the 3.0 release. These problems have become apparent while working on creating a parallax effect.

GetViewportY seems to return 0 until the screen has faded in. This means that my parallax objects appear in the wrong places momentarily and then snap into position after the fade in. I don't know if calling GetViewportY in a BeforeFadeIn script was possible in earlier versions.

I have a Player Leaves Room Event in a module, and using DX9 the script executes before the fadeout. This means that the player character vanishes and my parallax objects reset their positions. Using DX5 the screen fades out normally and the changes happen invisibly.

I hope those problems are genuine, and that I haven't just overlooked something.

Pumaman

QuoteGetViewportY seems to return 0 until the screen has faded in.

Ah yes, the viewport is not calculated until after the Before Fadein event is run. This has always been the case, but I'll change it for the next version.

QuoteI have a Player Leaves Room Event in a module, and using DX9 the script executes before the fadeout. This means that the player character vanishes and my parallax objects reset their positions. Using DX5 the screen fades out normally and the changes happen invisibly.

Hmm, interesting. The Leaves Room event has always been a Before Fadeout event, but with the DX5 driver it doesn't redraw the screen before fading it out. With D3D, however, it has to redrawn the screen whilst fading out so the changes will become apparent. I'm not sure of the best way to deal with this...

Ali

Thanks for the swift response. I'm afraid I probably have no useful suggestions regarding how to deal with the DX9 fade out.

Would it be difficult to have the leaves room script called after the fadeout? Also, would that make animation / character movement during fadeouts a possibility?

Pumaman

QuoteWould it be difficult to have the leaves room script called after the fadeout?

That would be possible, but then would have the potential to break people's games if they are relying on the current behaviour (eg. a Display() command wouldn't work After Fadeout).

I guess the ideal answer would be to have two events -- Leaves Room Before Fadeout and Leaves Room AFter Fadeout. Are you using on_event in a module rather than the in-room Player Leaves Room event?

Ali

Ah, that's tricky. The event does run from a module and not from a room script.

SMF spam blocked by CleanTalk