About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
Game pauses when losing focus
Author Message
Azriel Offline
Member

Post: #1
Game pauses when losing focus
Is there any way to disable that game pause and screen minimize (if in fullscreen) when a game loses focus?
10-26-2015 02:44 PM
Find all posts by this user Quote this message in a reply
georgatos7 Offline
Member

Post: #2
RE: Game pauses when losing focus
Code:
void InitPre() // init before engine inits
{
   EE_INIT(); // call auto-generated function that will setup application name, load engine and project data
   App.flag=APP_WORK_IN_BACKGROUND|APP_NO_PAUSE_ON_WINDOW_MOVE_SIZE; // specify work in background flag to work also when not focused
}

I think this is what you want.
(This post was last modified: 10-26-2015 03:04 PM by georgatos7.)
10-26-2015 02:58 PM
Find all posts by this user Quote this message in a reply
Azriel Offline
Member

Post: #3
RE: Game pauses when losing focus
Works perfectly except for fullscreen - it still minimizes when losing focus (doesn't pause tho).
(This post was last modified: 10-26-2015 03:42 PM by Azriel.)
10-26-2015 03:15 PM
Find all posts by this user Quote this message in a reply
Zervox Offline
Silver Supporter

Post: #4
RE: Game pauses when losing focus
That is normal for any normal fullscreen program, unless you mean borderless fullscreen which I think APP_NO_TITLE_BAR should be able to replicate or atleast similarly.

unless EE wants to add another flag in which the engine will check is enabled and if it is trap alt+tab or mouse on other screen click something and ignore windows messages to the program(sounds complicated to do especially when borderless or no titlebar should be enough.

Although I do not think EE has the option of borderless window, which would be nice to have.
(This post was last modified: 10-26-2015 04:24 PM by Zervox.)
10-26-2015 04:18 PM
Find all posts by this user Quote this message in a reply
Azriel Offline
Member

Post: #5
RE: Game pauses when losing focus
That's bad news for me. APP_NO_TITLE_BAR would do the trick, but if I set app resolution to my monitor's maximum (1920,1080) it is treated as a fullscreen and still minimizes.

Edit: 1 more thing. Is it possible to run a game on 2 monitors?
(This post was last modified: 10-27-2015 10:17 AM by Azriel.)
10-27-2015 09:55 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Game pauses when losing focus
App window not being displayed when fullscreen and not focused is a pretty standard behavior, can you tell me why you would want it to work any other way?
Every known game to me, works like that.

Quote:Edit: 1 more thing. Is it possible to run a game on 2 monitors?
You can, but you need to use windowed mode, APP_NO_TITLE_BAR, and set the window to span across all monitors, but set the size minimally smaller than the monitor resolution, so the fullscreen mode is not enabled.
There's no other way at the moment.

You could grab the source code license and try to make the changes yourself, if they are possible, but that's the complex route.
10-28-2015 02:15 AM
Find all posts by this user Quote this message in a reply
Azriel Offline
Member

Post: #7
RE: Game pauses when losing focus
Well, I'm a beginner, so I may be doing something wrong, but I was previously using Game Maker: Studio and I could have a fullscreen program running fine even without focus, so I thought I could achieve same result here. The thing is that I need either 2 programs running simultaneously (both fullscreen) or 1 program running on 2 monitors. With Game Maker I couldn't really make it with 1 program, cause the editor couldn't handle the graphics and was throwing "Out of memory" errors so I had 2 separate programs, each on different monitor with fullscreen mode. I've tested it on Esenthel and it works great, even with a lot more graphics. It's all 2D btw. So I started writting classes for the 2D stuff I need (like animated sprites) and then I noticed that "problem" with fullscreen. Well, I guess I'll try the trick with setting a bit lower resolution so that the programs don't go fullscreen and see if it is satisfying. If it's not, I'll just tell my boss to buy the source code license and find someone to help me with the changes wink

There's 1 more thing I'd like to know. How does Esenthel handle Images? I mean Game Maker was taking lots of RAM and still it took ages to load the graphics, while in Esenthel it's all smooth. As I said, I'm a beginner, so don't laugh at me for such questions pfft I just want to learn stuff smile
10-28-2015 11:38 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #8
RE: Game pauses when losing focus
Hi,

I use compressed textures in native hardware format, and they're stored in an efficient way, so there's no dynamic texture creation on the fly.
It's all highly optimized for performance and smallest memory usage possible.
10-28-2015 10:56 PM
Find all posts by this user Quote this message in a reply
Azriel Offline
Member

Post: #9
RE: Game pauses when losing focus
I still have problems with setting my game to run on 2 monitors (both full hd). I'm not sure whether it's Esenthel or PC setup that doesn't let the game run on both monitors. Has anyone ever done this before?
I'm using Linux and trying to draw a 1920x2160 image cause I want it to be displayed vertically.
11-09-2015 12:31 PM
Find all posts by this user Quote this message in a reply
kevindekever Offline
Member

Post: #10
RE: Game pauses when losing focus
tried to use 1 app fixed width and height, windowed (1920x2160 ) and 2 views/cameras?
Example->05Gui->12-Multiple Viewports?
(This post was last modified: 11-09-2015 02:23 PM by kevindekever.)
11-09-2015 02:19 PM
Find all posts by this user Quote this message in a reply
Azriel Offline
Member

Post: #11
RE: Game pauses when losing focus
I'll try to make it work with views, but I have no time atm. Thanks for a suggestion tho smile
11-10-2015 02:30 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #12
RE: Game pauses when losing focus
App will be able to stay visible when in fullscreen mode but inactive in next release using a new configurable option.
11-20-2019 01:38 PM
Find all posts by this user Quote this message in a reply
Post Reply