![]() |
#1 |
Apprentice
Join Date: Dec 2019
Posts: 61
![]() |
![]()
This is maybe a weird question, but i wanted to ask for ideas about how i can save and quit the game after, lets say, some minutes of inactivity.
I sync the savegame across two of my computers, at two different places (place A and place B) where i usually stay, the thing is that if i left by accident the game opened without exiting in place A, when i arrive to place B, i don't have my savegame updated (for better or for worse sometimes) so i don't play until i return to place A and continue the game there, remembering to exit so it saves and syncs to place B. So i was wondering, its maybe an easy way to bash script or something like that, some sort of timeout so if i don't enter any command or touch the keyboard, it sends the exit command to the game so that it saves where i left? for when i arribe to place B, the timeout period finished and the game exited and saved wihout my interaction, and i can continue to play at place B? I know that maybe its better to ssh to one of the computers or something like that, but i don't have the two connected 24/7 every time, and i like to sync them when both are up and running and don't depend on having the one in the other place available when i need. Lol, thanks in advance! |
![]() |
![]() |
![]() |
#2 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,856
Donated: $40
![]() |
You'd need a code change.
There are two ways to do it. The first way requires replacing the blocking read with a timeout read for input. Set the timeout to whatever interval you want, and do a save game followed by exit when it is reached. The second is to make the code multi-threaded, so there is a thread that wakes up every X seconds to check for activity. It'd do the same thing, while the main thread updates a clock every time there is activity. |
![]() |
![]() |
![]() |
#3 | |
Apprentice
Join Date: Dec 2019
Posts: 61
![]() |
Quote:
|
|
![]() |
![]() |
![]() |
Tags |
savegames, sync |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Z/OS port? Hey! Quit laughing! | gglibertine | Vanilla | 7 | November 20, 2015 16:47 |
2013 Roguelike world activity survey, please participate! | slash | Idle chatter | 0 | February 5, 2014 03:01 |
[FA] A few ideas, comments from a 1st time player | taptap | Variants | 21 | January 3, 2014 21:14 |
can't load save file. anti-save scumming feature? | unbuttered_toast | Vanilla | 4 | May 21, 2010 17:57 |
Should I quit? | g. rodrigues | Vanilla | 6 | February 5, 2008 20:01 |