Mirage Engine
Night - 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: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Night (/showthread.php?tid=1785)



Night - mustorze - 25-05-2008

how can darken the screen of the game?
as if night.??

Thx Big Grin


Re: Night - mustorze - 25-05-2008

yes, I want to develop my game this code wanted to do this I will do so:
6:00 am until 6:00 pm daily, 6:00 am until 6:00 pm tonight.
when I finish I will post here: D

Thx


Re: Night - Robin - 25-05-2008

Converting to DX8 will allow for variable darkening. Simply have all the Vertices have their lighting colour loaded from global variables and have these global variables darken/lighten through time. Would be a nice effect.


Re: Night - mustorze - 25-05-2008

bad is that I do not understand directx ...
I know only visual basic even I did a game in visual offline after the show you and I am thinking of using the same system to make layers dark ..


Re: Night - Dragoons Master - 26-05-2008

Robin Wrote:Converting to DX8 will allow for variable darkening. Simply have all the Vertices have their lighting colour loaded from global variables and have these global variables darken/lighten through time. Would be a nice effect.
Easier to just add one big black shape and alpha only this one.


Re: Night - Robin - 26-05-2008

It's not easier, as you don't have to render anything extra when you do it my way Tongue


Re: Night - shaded - 26-05-2008

Add this to the bottom of:Public Sub BltTile(ByVal x As Long, ByVal y As Long)

Code:
If GameTime = 1 Then
        With rec
            .top = Int(Night / 32) * PIC_Y
                .Bottom = .top + PIC_Y
                .Left = (Night - Int(Night / 32) * 32) * PIC_X
                .Right = .Left + PIC_X
            End With
            Call DD_BackBuffer.BltFast(x * PIC_X, y * PIC_Y, DD_TileSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
End If

The variable night refers to which tile it is going to blit over. So make your second tile on your tile sheet a 32x32 checker board. Dim Night as 1.

This is a very primitive way to display night. If you want to just test it as night all the time, get rid of the if statement.


Re: Night - mustorze - 28-05-2008

I tried to do that did not was not night I can best explain please?


Re: Night - Beres - 28-05-2008

Add
Code:
End
at the end of
Code:
Public Sub BltTile(ByVal x As Long, ByVal y As Long)
That should do it.


Re: Night - shaded - 28-05-2008

If you can't figure it out, PM me. Also if you don't have a night tile then I'll make you one.

I think you might not be assigning the variable night. It was just an example. But I can explain one on one how to do it and how it works.


Re: Night - Dragoons Master - 31-05-2008

Robin Wrote:It's not easier, as you don't have to render anything extra when you do it my way Tongue
It's much easier. And you don't have to change your hole code. Just add 5 new lines and blit two new triangles! xD