Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Night
#1
how can darken the screen of the game?
as if night.??

Thx Big Grin
Reply
#2
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
Reply
#3
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.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#4
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 ..
Reply
#5
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.
Reply
#6
It's not easier, as you don't have to render anything extra when you do it my way Tongue
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#7
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.
Reply
#8
I tried to do that did not was not night I can best explain please?
Reply
#9
Add
Code:
End
at the end of
Code:
Public Sub BltTile(ByVal x As Long, ByVal y As Long)
That should do it.
Reply
#10
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.
Reply
#11
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)