Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [Windows] Game stops responding to input after minimize or alt-tab

Author
Message
IBOL
Retired Moderator
20
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 11th Jul 2024 17:41 Edited at: 11th Jul 2024 17:42
Hi,
Old-school folks here might remember me, I'm the creator of Approaching Infinity, probably the biggest game (size-wise) ever created with AppGameKit Classic.
https://store.steampowered.com/app/551620/Approaching_Infinity/

Many of my players experience this issue:

When they alt-tab, or sometimes even just minimize or click some other app, the game appears to be running, but all input stops responding (keyboard and mouse clicks don't register).

Please help. I've tried a lot of things but nothing works.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 11th Jul 2024 18:24
is there any connection to win11 as suggested HERE or is it across the board?
IBOL
Retired Moderator
20
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 11th Jul 2024 19:44 Edited at: 11th Jul 2024 19:46
Hey Virtual Nomad, yeah, you're in there

Well I mean that's my game, and that's my issue, and some players report it but majority don't, it certainly doesn't happen all the time, at least to me.

But I scoured AGK's command list for commands about focus or pause or resume, and I'n trying what I can think of, but that guy is still having a problem.
It could be a hardware or configuration problem on the user's end, but player's don't like to hear that kind of answer IYKWIM

Let me ask you, is there a known issue with windows 11 and USB ports? Could it be not related to my game or AppGameKit?

Also, i wonder if its some kind of RAM issue. as in, my game surely takes up a lot of working memory, so maybe there's some threshold over which that problem gets much worse?
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 11th Jul 2024 20:43 Edited at: 11th Jul 2024 21:45
i really have no idea and was hoping they were a 1-off but you advised "Many of my players experience this issue" and wondered if they were all on WIN11 or some other commality. is there a community thread on steam regarding the issue so we can have some more to go on?

my first question is, when users tab back to AI, is it actually still running the loops or simply sitting there and perhaps not ever getting Sync()'d. ie, just because the music is playing, i believe that's handed off @ Play() and then handled by WIN, not AI (no proof but that's always been my impression). if you could test that it's still Sync()ing, that would be a start. example could be to simply print FPS as we tend to do when testing our stuff. if that's getting updated, at least you know Sync() is happening (another more-subtle way is to not Loop music but check if it's still playing and start it again if it isnt. if they return to silence, it's not sync'ing?).

with that, are you using GetResumed() at all to perhaps reset anything that might need to be?

otherwise, without knowing what you might be doing under the hood... like, is there a loop waiting for a GetPointerReleased() that's never registering or was missed so it just sits there? are you using GetCharBuffer() vs manually testing KeyPressed, etc? just anything you could suggest where an issue may lay might help.

AGK is so forgiving of some of our less-than-ideal coding practices, otherwise, and that's great until we find ourselves in this situation, IMHO.

meanwhile, i dont venture outside the AppGameKit realm (and do nothing as complex as AI might be) but this is the first i've heard of this issue here or on discord, github, etc.. beside, perhaps, losing Controller input, but zero re: WIN11 vs USB and it's troubling that it appeared "fixed" in the thread i linked to for it only "break" again.

ps: has anyone experiencing the issue tried an older compatability mode? i just really wanna peruse any previous discussion/sleuthing if it exists somewhere?

add: if that thread on AI's discord is the only real discussion on that matter, there's not a lot for you to go on but i appreciate your trying to resolve for the couple/few experiencing it and it's great to see an AppGameKit game in active development, as well. there aren't many of AI's size that i'm aware of. perhaps you could reach out to SFSW who is the most-visible experienced AppGameKit dev that i know is actively developing.
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 12th Jul 2024 02:04
Every version of Agk has always permafroze after an alt tab for for me on win 7 8 and 10 only seems to resume on very simple programs that are text based.

IBOL
Retired Moderator
20
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 12th Jul 2024 04:23 Edited at: 12th Jul 2024 04:25
Well, let's forget the "WIN11 vs USB" thing, that's 3rd party conjecture.

I have no instances of GetPointerReleased() or GetCharBuffer() , but are there other things with similar behavior?

Today I experimented with this code to print "paused" while it's paused . 99.9% of all syncs come to the same place, so I stuck it in there.


so, it works until you minimize the window. after that, it prints the "might pause", but immediately breaks the next loop, as if "getresumed" is permanently set to 1/true.
Also, restore app as I have it there, immediately maximizes the game as soon as you minimize it.

There is not a specific thread, and I haven't noticed commonalities between reports. Generally, some users report "freeze when alt-tab", etc. , and I say "that's a known issue and I don't know how to fix it".
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 20th Aug 2024 00:03 Edited at: 20th Aug 2024 00:04
I think those functions just read a variable and do not consume/reset the content so you would need to manage that yourself to "trap" the actual event and restore the app accordingly

untested but maybe something like
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
IBOL
Retired Moderator
20
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 4th Sep 2024 01:59
in that example it will lead to an infinite loop:
while state
print("Pause")
sync()
endwhile
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 9th Sep 2024 23:58
Well obviously you have to put the if statements and pause loop inside the main loop so "state" can be set accordingly and I did say "untested", I typed it in the browser and don't have AppGameKit installed .... just spitting ideas!

Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee

Login to post a reply

Server time is: 2024-09-14 23:15:50
Your offset time is: 2024-09-14 23:15:50