Hi All.
I have a little game which I launch with blendstarter and a batch file to make it run in full screen mode. I did this because if my game was running in a normal window, all was fine but when I maximised the window it froze.
Now my problem is that on some machines, the game is freezing at random points. When I get a freeze, the animation stops but the sound continues as expected, even fading in/out as expected so the scripts are continuing to work in the background. I can even press the ‘quit’ button and close the game. The output tells me that physics frames are being dropped now and again but I think this is ok.
Sometimes if I do an ‘alt-tab’ to switch out of the game and then open switch back, I find that all is well again.
Could this be something to do with running in full screen mode? It only uses 50% cpu on 1.66Ghz 512 RAM. My graphics card is a NVIDIA GeForce Go 7600.
Thanks,
Tom
That’s a strange problem. I think I would need to do testing on your file to see what the problem is. If you would like, you could post a link to the .blend file (you need to host it offsite) or send me a PM about it.
Hi blendenzo
I’d really love to post it but this is part of a bigger commercial project and I’d break the terms of my contract if I release and source files… what a bummer. This is something i find really difficult as it’d be great to release it to pros like you to get some feedback. Can you think of anything which would cause a screen freeze?
Could any of the following cause problems?
The rasterizer seems to be doing a lot of the work, about 85%.
I have 42 png 8bit format textures which total 1.6mb.
I have 36 objects. Of these, 8 are transformed using armatures and vertex groups. 7 of these 8 objects have transparent faces enabled.
There are 10 wav files (16bit 22kHz) totalling 34mb.
I turn mipmaps off when launching blanderplayer.
Game Framing settings - letterbox, 640x480 frequency:60, bits:16.
Is there anything I can turn off to make my game run faster?
Thank you, thank you, thank you. I hope I don’t sound too desperate.:spin:
Done some testing and what a strange result… I was launching blenderplayer with the following arguments;
mygame.exe -f -g nomipmap
and it kept freezing. then used the following;
mygame.exe -f -g show_framerate
to inspect the framerate at time of freeze… but it didn’t freeze and wouldn’t no matter what I did in the game. I then thought that it might have been something to do with the mipmaps so tuned them back off to see if this was the issue;
mygame.exe -f -g show_framerate nomipmap
and it froze again so I thought it was a mipmap issue… then I tried
mygame.exe -f
and it still froze! Why would displaying the framerate prevent my game freezing? The only command which works 100% of the time is mygame.exe -f -g show_framerate.
Not an ideal sollution… I’m even more confused than when I started!
Ignore that post… freezing again!
i have a problem running the game engine in full screen too
but i was able to get it to work setting all of the command line options
blenderplayer.exe -f 640 480 32 85
the first two numbers are of course frame size the next is color depth and the last is screen frequency.
you probably knew that but see if setting it helps. the only reason i think that it helped in my case, though is because my comp is so old.
Thanks littlebob. Will give it a go
That’s alright. I understand, so I guess I’ll give it my best guess. From your description, I see a few things that could be slowing down the game.
The most noticeable issues are the armatures and the alpha mapped textures you’re talking about. Personally I haven’t had much trouble with alpha textures, so I don’t think your issue is there (though I have heard some people complain about them slowing down their files). Depending on the textures, I would recommend combining them into fewer files. For example, if you have four 256x256 textures, make them into one 512x512. I’m not sure, but I have a feeling that fewer files will speed up the framerate a bit.
More likely, your problem is with the armatures. Try to watch the game and see when it freezes. Is there some common action that is going on every time? Maybe the slowdown comes when all of the armatures are working, and it runs smoothly when only one or two is working. There’s been a good deal said about armatures lately, so look around to see what people are saying about optimizing them (baking actions, etc). Those are my thoughts for now, but I will give the issue more consideration and let you know if I come up with anything else.
-blendenzo
As you can see from the file I sent…
The game doesn’t slow down at all at my end. I get a constant framerate of 60 (and I guess it is actually higher but doesn’t show anything above 60). I don’t think there is actually anything about the makeup of the game which should cause a freeze, I think the graphics card is just freaking out at random points of time.