Blitz3d fullcreen graphics mode and switching to windows screen. Blank screen.

Blitz3D Forums/Blitz3D Programming/Blitz3d fullcreen graphics mode and switching to windows screen. Blank screen.

A4E(Posted 2017) [#1]
When I run my game in a window with graphics mode, there are no problems, but when I run in fullscreen and I switch to the windows screen at any point with the windows key, I will get a blank screen or images disappearing when I switch back to the game. And if its a blank screen it will not respond to anything.

I use windows 8 and windows 7 on 2 different 64 bit computers. I think I tested it on a 32 bit computer with windows 7, with the same result.

What is the cause?

Is it normal with blitz3d? Would I have to use another development language to fix this?

Could it have something to do with my programming?

Can I use fullscreen without graphics mode, and still draw/manipulate images? And would that fix it?

Do/did you have this problem with your projects?


Its annoying that other games running on windows does not have this problem, and mine has. I don't really need to fix the problem for myself, but other people making lets plays or reviews of the game probably want it to work without problems.

The game is here if you want to recreate the problem for yourself:
http://selfuniverse.com/download.html


Stevie G(Posted 2017) [#2]
http://www.blitzbasic.com/Community/posts.php?topic=81943


RemiD(Posted 2017) [#3]

Could it have something to do with my programming?


maybe there is a problem with on which buffer you draw once the fullscreen mode is restored, to prevent this, i suggest to add setbuffer(backbuffer()) either before renderworld() (if you draw 3d, then you draw 2d) or before drawimage() rect() line() text() (if you draw only 2d)


Can I use fullscreen without graphics mode, and still draw/manipulate images? And would that fix it?


you can have your game always in windowed mode, but without titlebar and borders, which looks like a fullscreen mode, but is not.

Have you tried to reproduce the problem on windows xp ? Because i know there is a problem on windows vista and windows 7 when the program is in windowed mode and the user interacts with others windows/guielements, then a part of the blitz3d graphics window is not updated anymore, the fix is here : http://www.blitzbasic.com/codearcs/codearcs.php?code=3212


A4E(Posted 2017) [#4]
I do a lot of writepixelfast. From the link that stevie G posted I should use a BufferDirty command for those images, which is ALL of them I think, except a few.

@RemiD
I do not use any 3D commands. I do use double buffering. I think I am only drawing on the backbuffer after setbuffer(backbuffer()). But thats not all of the time, but its irrelevant because even if I switch to windows in the starting menu it will blank out. Your post was hard to interpret for the 2D part.

Anyway I think I will just need to make most of my gfx dirty. Does normal soil work well, or do you think I should use gravel? Beach sand?

Thank you very very much!


RemiD(Posted 2017) [#5]
@A4E>>using my code example, you can detect if the blitz3d window is the active window or not, and using another variable (PreviousWH%) you can determine if the previous active windows was the blitz3d window or another window, and thus know when the blitz3d window becomes active again and go to the backbuffer and redraw all your 2d images/things.
But of course, this is usefull to you only if you decide to use fake fullscreen mode (windowed mode without titlebar and borders)


A4E(Posted 2017) [#6]
@RemiD Thanks for the clarification!

I tried gfxmode 6 btw, which suspended the prog when the window was deactivated, but it failed to activate the program when I selected the window again. So I can't use that.

I am leaning on offering custom/any window size that will not fill the entire screen.

The game already has windowed mode, but only a selection of resolutions, and I forgot to hide the windows pointer. :/