Game Keeps Minimizing?

BlitzMax Forums/BlitzMax Programming/Game Keeps Minimizing?

Sean Doherty(Posted 2005) [#1]
I am using the following command the initialize the game screen:

Graphics kScreenWidth,kScreenHeight,16,0

I have noticed that from time to time the screen seems to minimize to the task bar? Why is this happening?

Thanks


FlameDuck(Posted 2005) [#2]
???

Get some source code I can run my end that does this, and I'll tell you why.


Sean Doherty(Posted 2005) [#3]
I tried to limit my code to the main loop, but the problem does not seem to be there. Any idea what kinds of thing could cause this to happen?


Sean Doherty(Posted 2005) [#4]
On second thought it looks like the main loop does minimize after about 5-10 minutes?

'This application was written with BLIde http://www.blide.org
'Application:
'Author:
'Description:
'
Strict

'Define the Screen Size Constants
Const kScreenWidth = 1024 ' Screen width
Const kScreenHeight = 768

Graphics kScreenWidth,kScreenHeight,16,0

'Main Loop
Repeat' - - - - - - - - - - - - - - - - -


Flip
Cls

FlushMem()

Until KeyHit(Key_Q)

End

PS: How do I post code in a code window?


Rimmsy(Posted 2005) [#5]
I suspect it's not bmx and is actually another piece of software running in the background wanting your attention. Problem is, if you don't see anything when it does minimise then the program wanting your attention must be functioning incorrectly.

Then again, it could be any number of things, really.

edit: post code like this:
(code)
hello!
(/code)

but instead of ( use [ and instead of ) use ]


Sean Doherty(Posted 2005) [#6]
That is what I thought at first; but I shut down almost everything and it still happened. Also, none of my other games are affected?


Rimmsy(Posted 2005) [#7]
Strange. I've not had any experience with that personally and I've not seen it on the boards. But I personally, do get some weird problems with bmx (specifically the IDE) so I can't discount it being specific to your setup.

Can you localise the problem in your code anymore? I know it's difficult but it might shed light on the cause. Can you think of anything particularly strange you might be doing in your code? Any dll calls? any _system calls? anything involving file manipulation? graphics res changes?


Sean Doherty(Posted 2005) [#8]
This is complete coding example that cause the error:

Strict

'Define the Screen Size Constants
Const kScreenWidth = 1024 ' Screen width
Const kScreenHeight = 768 

Graphics kScreenWidth,kScreenHeight,16,0

'Main Loop
Repeat' - - - - - - - - - - - - - - - - - 


Flip
Cls

FlushMem()

Until KeyHit(Key_Q)

End 



Sean Doherty(Posted 2005) [#9]
Well I think I fixed the problem? It appears the "still testing" that the problem was caused by a program called Surf Stats 8000. Basically, it runs a service that seem to be running a task every two minutes or so. The odd time this service would cause the game to minimize?

I have no idea why it doesn't seem to afffect any other games? Anyway, I shut down the service and the problem seems to be gone. Time will tell...


Rimmsy(Posted 2005) [#10]
Oh good. Thought it might be. Hope it works for you.


Ferminho(Posted 2005) [#11]
I have a similar problem with Folding@Home (a seti-like resident program that uses idle processor time, this time about protein folding) and some fullscreen apps, Bmax among them. I had some headaches till I discovered it...It's a pain in the $$$.
Good you solved it, hope everything's ok from now on ;)


Topdecker(Posted 2005) [#12]
Good that you isolated the problem. You might want to add a "Delay (10)" or something along those lines to your main loop. Without some sort of delay, BMAX will take CPU utilization to 100% and this might cause applications and services to become cranky with you :)

Tim