Mirage Engine
A smooth transition ... - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51)
+----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44)
+----- Thread: A smooth transition ... (/showthread.php?tid=3144)



A smooth transition ... - Inuyasha22 - 21-09-2009

... between day and night. How to do that? I tried changing the night tile and thought it could be done this way but it doesn't let me change it ~~ it's stubbornly taking the same tile everytime...

So is there any way to do this without that night tile?
Or how do I get a really clean animation between day and night?


Re: A smooth transition ... - Labmonkey - 21-09-2009

What engine are you using?


Re: A smooth transition ... - Inuyasha22 - 21-09-2009

I use my own engine, based on Elysium Debugged...


Re: A smooth transition ... - Robin - 21-09-2009

Inuyasha22 Wrote:I use my own engine, based on Elysium Debugged...

So, you're using the old night code?

No way to get a decent transition in.


Re: A smooth transition ... - GIAKEN - 21-09-2009

Unless you do a DX8 hybrid or maybe Direct3D7 can do transparencies?


Re: A smooth transition ... - Inuyasha22 - 21-09-2009

So DirectX8 could do that? Is that right?


Re: A smooth transition ... - GIAKEN - 22-09-2009

With DX8 you could draw a rectangle over the screen that's slightly transparent to change the color of the map possibly and when changing you just fade the rectangle out so it becomes invisible, changing night into day.

I may write a tutorial for it.


Re: A smooth transition ... - Inuyasha22 - 22-09-2009

I_I' But in my moddirectX there's some method called DD_Backbuffer.drawbox and DD_backbuffer.setfillstyle ...
Why don't they work? I put them into the Sub Night while commenting out the usual way of blitting the night tile...

Then it doesn't do anything, even if that drawn box should be filled pure black I__I
That's if I set the fillstyle to transparent of course...


Re: A smooth transition ... - GIAKEN - 22-09-2009

DX7 doesn't support transparency...unless you do alpha blending.


Re: A smooth transition ... - Robin - 22-09-2009

DirectDraw7 doesn't support alpha blending.

Do a DD and D3D hybrid and it works fine.


Re: A smooth transition ... - Inuyasha22 - 22-09-2009

If it doesn't support transparency, how comes that with that night tutorial (with that blue bmp) creates a blue overlay instead of a completely blue screen?


Re: A smooth transition ... - GIAKEN - 22-09-2009

It uses a horrrrible method. Brings me from 32 to 2 FPS on an ED2 game I used to play.


Re: A smooth transition ... - xp79 - 22-09-2009

Some people don't quittteee understand what hes getting at Tongue
are you aiming to have it transition over a few seconds or have it gradually get darker as time goes on?


Re: A smooth transition ... - GIAKEN - 22-09-2009

I think he wants it to fade in to dark then out to light when day / night comes in...


Re: A smooth transition ... - Matt - 22-09-2009

GIAKEN Wrote:It uses a horrrrible method. Brings me from 32 to 2 FPS on an ED2 game I used to play.

If you use an image to blend, yes. You take a severe fps hit. If you blend a blue box you draw with directdraw, you only take a few fps hit.


Re: A smooth transition ... - Robin - 22-09-2009

It's got that horribly GetDC code.

You could edit that to alpha blend, but it's sooo much quicker to do a D3D overlay.


Re: A smooth transition ... - Inuyasha22 - 22-09-2009

Robin Wrote:It's got that horribly GetDC code.

You could edit that to alpha blend, but it's sooo much quicker to do a D3D overlay.

oO' How do I express this in VB?