graphics 640,480
setbuffer backbuffer()
game()
update_level()
function mainmenu()
(.....)
if keyhit(1)
End
endif
end function
; when my game ends it ends like a "cut-off screen"
; i want a smooth end (no blinking- effect)
You might not be able to avoid that. I have the same occurence, but it's not Blitz's fault, it's that my computer has very little video memory. Therefore changing between graphics modes, including fullscreen & windowed, is somewhat slower. You probably have the same problem, but not everyone who plays your game will notice the same effect.
: this code which i wrote works somewhat satisfactorily.
graphics 640,480 ; top line
setbuffer backbuffer()
stargame()
function startgame()
while not keyhit(1)
; put some stuffts
if keyhit(28)
endgame()
endif
flip
cls
wend
end function
function endgame()
graphics 640,480
; this is needed(w must be 640 and h must be 480 )
; because in top line i wrote graphics 640,480
; else you may encounter some problem
vwait 10
end
end function
; note it will work fine even if have set ur PC screen
; resolution to 640*480, 800*600 ..... and so on