Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
blting to the screen for x seconds
#1
I'm trying to make it so in my game it will blt the screen black for a second or 2 in game. Currently however the blting last what is a like a mili second. I've tried to just get the game to keep blting to the screen until the loops broken by gettickcount but with no such luck.


Do Until x = True 'infinite loop
DD_BackBuffer.SetFillColor RGB(0, 0, 0)
Call DD_BackBuffer.DrawBox(0, 0, (MAX_MAPX + 1) * PIC_X, (MAX_MAPY + 1) * PIC_Y)

If GetTickCount > tint + 2000 Then ' breaks the loop after 2 seconds
tint = GetTickCount
Exit Do
End If
Loop

any help on the matter would be great

thanks
zidsal
Reply
#2
don't have a loop inside the main loop, just have a check each time the normal loop passes through.

[code]
If BlckScrnTimer
Reply
#3
Instead, make it not call the Render_Graphics sub, which will stop drawing everything and only show black...which would have the same effect but better. So:

Code:
Public tmrStop As Long

.........

If tmrStop < GetTickCount Then Render_Graphics

Then where you want to make everything black, enter this code:

Code:
tmrStop = GetTickCount + 2000

And that will make everything black for 2 seconds.
Reply
#4
thanks for the help guys I've got it working now with out draining fps to 0 :lol:
Reply
#5
Using my method should make the FPS go up exceptionally Tongue
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)