Game Development Community

Suggest: Click Off Window, Minimize Hooks

by Kalle Wik · in Torque Game Builder · 04/03/2007 (11:24 am) · 7 replies

I may be missing it, but as far as I can tell TGB 1.1.3, and b1.5, do not have any way to detect when a player has clicked off the application window. Or, minimized the application.

This is a problem because ideally you'd pause the game when this occurs, and in timer based games this could demolish the ability to pause and resume appropriately. Particle FX get all jerky when clicking off the window, and music tends to keep playing when the application is minimized.

I found the following post in regards to this... any chance it can be compiled to the core engine with appropriate script hooks?

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10451

If not, is there a reason why such as instability? It seems windowing commands should be exposed to script to allow proper integration with Windows.

Thanks,

K.

#1
04/03/2007 (4:27 pm)
We will most likely be doing something in the future to address this, as it's a fairly common request. Not sure what the details of that will be yet, though.
#2
04/05/2007 (4:20 pm)
So is it safe to compile that into TGB or, is it likely to be buggy? We have some open bugs in regards to 'particle effects playing really slowly if player clicks off the application' we're trying to solve. This level of functionality, in my opinion, would be better for GG to put in and be sure it's cleanly supported.
#3
04/05/2007 (8:02 pm)
This with a pause scene and a callback would defenitelly help with some casual game little yet important details.
#4
04/05/2007 (8:55 pm)
It would definitely be nice to have this feature built into the engine.. every game should have this.. and as it is now I keep adding this myself with patches. No idea what non-pro users can do about it.
#5
04/13/2007 (3:17 pm)
Definitely should be in there, things like music playing when application is minimized to taskbar, particles revealing their time-based nature unflatteringly... all unavoidable in the base engine.
#6
04/30/2007 (5:54 pm)
We're going to have to compile this in, Mr. Rossi or Justin D, is this the correct approach in its entirety to get this functionality?

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10451

Is there any PC platform compatibility issues introduced with this "unsupported fix"? Sounds cool and also seems you can do slow-motion activities also. Just want to be sure this isn't going to destablize the engine.

Thx for any insight.
#7
04/30/2007 (6:14 pm)
That's not exactly how I do it, but give it a try. It should work, but it may need some changes to work with TGB 1.5.