Page 1 of 1

Autopause game if afk

Posted: Sat Feb 27, 2021 5:29 pm
by Defective_Soul
tl;dr add ability to auto-pause game if you alt-tab/afk for more that x seconds and something get attaked/damaged (for singleplayer, with disabled autopauseing while alttabed)

So... let's be honest, sometimes we may alt-tab game for soem time, or just go do something and left game runing w/o any control over situation.... so i think it will be greart if you get afk/alt-tab game for long enouth and bugs or something will start causeing problems then just autopause game, it's not that hard to do i think.. since we already hawe alerts system and game pausing feature (or just open game menu), it will allow prevention of possible damage and allow easier idling if you... alreayd build ultimate factory or just get afk because someone told you to take out trask/get milr or whatever + it will allow implimentation of AFK system for muliplayer, servers may pre-set max time w/o controls before taging player as afk and give other players better clue if player lagger, crashed, or actualy just afk-ing

Re: Autopause game if afk

Posted: Sun Feb 28, 2021 5:37 am
by ssilk
This is in general conflicting with players, that alt-tab because waiting for some resources.

How do you think it should be implemented?

wait x seconds before pausing the game, when in background (0=never [default])
?

Re: Autopause game if afk

Posted: Sun Jun 06, 2021 1:59 pm
by Defective_Soul

Code: Select all

if windowinbackground-true & afk_enbl !=0
then 

#1 for timer
#2 for only if alert happens while afk
#0 is off
#afk_timer set by player

if afk_aenb=1 then
!1
start_timer=afk_timer
if afk_timer=exp_time then
pause_enable
elif goto !1
fi
elif afkenbl=2
!2
if alert=true
pause_enable
efil aletr=false then 
goto !2

fi


p.s. yes it's horrible

Re: Autopause game if afk

Posted: Sun Jun 06, 2021 5:26 pm
by eradicator
Time to learn to mod. on_entity_damaged + game.tick_paused

Re: Autopause game if afk

Posted: Thu Jun 10, 2021 6:21 pm
by PanTobi
If its option in Settings that every1 can ON / OFF... idc...
but i dont want it to be as Forced thing for everyone... im probably gonna play less and less Factorio if my game pause when i alt tab

i alt tab a lot and watch YouTube while waiting for items / research / or jsut afk because everything is working and im too lazy atm. to continue work so i want to break but i want my game to auto progress...

auto pause is annoying when u can't disable it... so ON / OFF this thing in Settings is must have...
and tbh. idk why ppl would want to use it... its best if Dev-s ignore this suggestion xD

Re: Autopause game if afk

Posted: Fri Jun 11, 2021 3:28 pm
by ssilk
PanTobi wrote:
Thu Jun 10, 2021 6:21 pm
i alt tab a lot and watch YouTube while waiting
Buy a second monitor? My best investment lately.

Re: Autopause game if afk

Posted: Fri Jun 11, 2021 4:25 pm
by PanTobi
ssilk wrote:
Fri Jun 11, 2021 3:28 pm
PanTobi wrote:
Thu Jun 10, 2021 6:21 pm
i alt tab a lot and watch YouTube while waiting
Buy a second monitor? My best investment lately.
I do have Second monitor... i can even use Second computer...
but second monitor i use only when i work... and its... in weird angle to me so i dont want to play Factorio or watch YT
or move window between screens, thats how it works...
s1.png
s1.png (3.58 KiB) Viewed 3153 times
Alt / Tab takes like 0.1 sec so its better solution than using second screen in weird angle...
and if u ask about using Second PC... not its not solution either... because they have different mouse and different keyboard
and moving hands from PC1 to PC2 takes longer than using ALT + TAB xD


Anywaa... like i said... dont add this stupid thing that pause ur game on every Alt Tab...
or at least make it optional for weird ppl to use...

Re: Autopause game if afk

Posted: Fri Jun 11, 2021 8:25 pm
by netmand
this is fine. if it's an option sure why not? ... up until your cat comes along and un-pauses the game allowing the biters to roll over your creation.

when I AFK I usually save before moving the game to the background (or leaving the keyboard).

Re: Autopause game if afk

Posted: Tue Jun 15, 2021 10:49 am
by Hannu
I play always in window mode so that I can react faster if something happens in game. I do not agree with obligatory autopause. It may be an option but it would prevent running at background to wait something or see how base can run long periods. However, it would be nice if sounds were automatically muted when window is not focused.

Re: Autopause game if afk

Posted: Tue Jun 15, 2021 11:39 pm
by ssilk
Muting is another (very old) suggestion, which is handled here viewtopic.php?f=6&t=938

Re: Autopause game if afk

Posted: Tue Nov 02, 2021 6:23 pm
by FuryoftheStars
PanTobi wrote:
Thu Jun 10, 2021 6:21 pm
If its option in Settings that every1 can ON / OFF... idc...
but i dont want it to be as Forced thing for everyone...
I agree with this statement. In most games that have the option, I disable the auto-pause on loss of focus. If I'm planning on alt-tabbing for long enough and am in a situation where I don't feel comfortable leaving it alone, I'll manually pause it, first.