Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autosave function #221

Open
darkhog opened this issue Jul 8, 2017 · 12 comments
Open

Autosave function #221

darkhog opened this issue Jul 8, 2017 · 12 comments
Labels
discussion Issues with no clear action or preferred solution wish list Wouldn't it be nice if...

Comments

@darkhog
Copy link

darkhog commented Jul 8, 2017

I'd like to be able to set an autosave for your game to prevent loss of data due to power outage or simply forgeting to save before exiting. Just add this to the config:

autosave = x, where x is amount of minutes between each autosave (0 to turn it off)
Also this:

autosaveonexit=true- will autosave when TIC closes.

The autosave would fail silently if game wasn't saved at least once (new file) or if it can't be saved for another reason (read-only file or loaded from the site)

@trelemar
Copy link
Collaborator

trelemar commented Jul 8, 2017

I don't like this idea. Often I don't save a game while experimenting with different ideas, and when I want to start over, I just reload the game.

Also, if you mess your code up and want to reload the cart, what happens when the system autosaves just before you reload the cart? You completely lose data.

@darkhog
Copy link
Author

darkhog commented Jul 9, 2017

Then you'd just disable autosave by setting period to 0 and setting autosave on exit to false. Simplebas that.

@trelemar trelemar added the discussion Issues with no clear action or preferred solution label Jul 9, 2017
@trelemar
Copy link
Collaborator

trelemar commented Jul 9, 2017

I feel like it'd just cause more frustration. If you forget to save, it's your fault. If TIC saves for you when you don't want, it's TIC's fault. Just remember to save progress.

There's not much that can be done about power outages, these things happen.

@darkhog
Copy link
Author

darkhog commented Jul 9, 2017

Well, it should be an option, just like autosave in Word is.

@HomineLudens
Copy link
Collaborator

I'm not a big fun of autosave functionality too, but I understand someone could like it. Maybe have a .bkp file saved in the same folder of the original one.
Most of all I'd like to have some prompt for saving on exit. That happened a few times... lots of imprecations :)

@trelemar
Copy link
Collaborator

trelemar commented Jul 9, 2017

If TIC-80 stored a backup of the file at a set interval, without overriding the actual cart, I'm all for that. It could be stored in backup folder in tics appdata as the cart name + current os time or something similar. That I wouldn't mind. Just don't auto override the actual cart.

@darkhog
Copy link
Author

darkhog commented Jul 9, 2017

Then it wouldn't be an autoSAVE now, would it? Again, having option to enable autosave doesn't mean you have to use it. Just like you don't have to be a redstone expert to play Minecraft.

@msx80
Copy link
Contributor

msx80 commented May 23, 2018

i'd like some autosave feature too. Possibly a backup save. Like, every tot minutes save a file like "autosave.tic" in some folder, so if your pc hangs for any reason, you never lose more than a tot minutes of work (which is incidently what just happened to me, lost 2 hours of work)

@tobi
Copy link

tobi commented Aug 14, 2020

Since kids are really not used to manual saving anymore ( i know, learning opportunity... ) I think keeping an autosave.tic in a backup folder would be a big boon to Tic80

@nesbox
Copy link
Owner

nesbox commented Oct 28, 2020

Lets autosave in a backup.

@Kyuchumimo
Copy link

You could implement that the game is saved with checkpoints within the game (when entering a new screen or level, or a certain point of the game), that counts as an autosave, only that would be your responsibility to place those checkpoints.

@skz1024
Copy link

skz1024 commented Aug 9, 2021

You can implement in-game autosave by calling pmem() every time interval. (It's not perfect, because the user stores it as an integer.)
However, if the program itself requires the concept of a backup file, the program's autosave feature is great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Issues with no clear action or preferred solution wish list Wouldn't it be nice if...
Projects
None yet
Development

No branches or pull requests

9 participants