Page 1 of 1
Deleting Save Games
Posted: Wed Oct 07, 2009 1:45 am
by PyTom
I finally got around to implementing an interface for deleting save games. Now, a user can just hit delete on a game slot, and Ren'Py will ask them if they want to delete the game.
I also tried implementing a means for people to change the info associated with a game, but eventually gave up. The problem here is that if we allow the user to enter arbitrary strings, then it can really break the way Ren'Py lays out save slots.
Re: Deleting Save Games
Posted: Wed Oct 07, 2009 9:00 am
by JinzouTamashii
Great. Even though there's a long page of save slots, it's nice to be tidy.
What will the save delete button be called?
Re: Deleting Save Games
Posted: Wed Oct 07, 2009 10:12 am
by PyTom
It's not a button. You just put the mouse over a save slot, and hit the delete key on your keyboard.
Re: Deleting Save Games
Posted: Wed Oct 07, 2009 3:31 pm
by sake-bento
Fantastic. Thank you very much!
Re: Deleting Save Games
Posted: Mon Oct 12, 2009 8:33 am
by JinzouTamashii
PyTom wrote:It's not a button. You just put the mouse over a save slot, and hit the delete key on your keyboard.
Is that intuitive enough?
Re: Deleting Save Games
Posted: Mon Oct 12, 2009 8:39 am
by jack_norton
PyTom wrote:
I also tried implementing a means for people to change the info associated with a game, but eventually gave up. The problem here is that if we allow the user to enter arbitrary strings, then it can really break the way Ren'Py lays out save slots.
Why that? can't you just save the string in an external file?
When I open a save file, I see it's an archive with:
Code: Select all
extra_info (save name)
log (the variables)
screenshot.tga (if you enabled thumbnails)
why is a problem to let the user enter a save name in the extra_info? To be honest, I think isn't really needed, but just curious

Re: Deleting Save Games
Posted: Mon Oct 12, 2009 9:31 am
by papillon
Is that intuitive enough?
a convenient save-deleting method will be very useful for testing and development once we know about it, don't know how oftena ctual playiers ened it...
(don't mind me, four hours sleep.)
Re: Deleting Save Games
Posted: Mon Oct 12, 2009 9:59 am
by PyTom
why is a problem to let the user enter a save name in the extra_info? To be honest, I think isn't really needed, but just curious

If the user can enter an arbitrary string, then he can enter in a string that's too big for the button, and especially one that's both too big, and doesn't have any breakpoints. This can cause Ren'Py to have to grow the size of a button, which in turn causes us to grow the size of _all_ of the buttons, which could, for example, cause the save buttons to overlap the menu navigation.
Trying to pick an appropriate default is difficult with proportional text, as a fixed number of characters may have a wildly varying length. If the user typed MMMM... we could only support 18 characters, while if the user gave us iiiiii we can support about three times that.
Re: Deleting Save Games
Posted: Mon Oct 12, 2009 10:14 am
by jack_norton
PyTom wrote:
Trying to pick an appropriate default is difficult with proportional text, as a fixed number of characters may have a wildly varying length. If the user typed MMMM... we could only support 18 characters, while if the user gave us iiiiii we can support about three times that.
Ah yes I see. In my C code I used to have a function that would calculate the PIXEL width of the string, so I would set a limit based on pixels and not characters. Anyway personally if the game provide a good automatic savegame description (in my case chapter title+save time) and a screenshot, I don't need anything else

Re: Deleting Save Games
Posted: Mon Oct 12, 2009 10:18 am
by Jake
PyTom wrote:It's not a button. You just put the mouse over a save slot, and hit the delete key on your keyboard.
Out of interest, will this also have a useful user-exposed function, so that it can be used by the game code (e.g. in custom UIs), or are you keeping it just for secret Ren'Py purposes?
jack_norton wrote:
Why that? can't you just save the string in an external file?
I presume that if one cared, one could fairly easily replace the load/save UI with their own interface, and maintain a dictionary from save-time to save-name (or vice versa) in a persistent variable, presenting the user with those names instead of the time/chapter title or whatever.
Re: Deleting Save Games
Posted: Mon Oct 12, 2009 11:05 am
by PyTom
Jake wrote:Out of interest, will this also have a useful user-exposed function, so that it can be used by the game code (e.g. in custom UIs), or are you keeping it just for secret Ren'Py purposes?
Which function? There's already
renpy.unlink_save to delete save games. The new functionality is the keymap argument to button, which will become documented in 6.10.
Re: Deleting Save Games
Posted: Mon Oct 12, 2009 11:23 am
by Jake
Yeah? I was sure I looked around for such a method before and found nothing...
Re: Deleting Save Games
Posted: Fri Oct 16, 2009 2:20 am
by JinzouTamashii
You forgot to look into PyTom's skull...