intfiction.org

The Interactive Fiction Community Forum
It is currently Mon Oct 23, 2017 1:02 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Dec 22, 2016 6:04 am 
Offline

Joined: Sat Jul 16, 2011 3:48 pm
Posts: 254
gregb wrote:
3. I don't need encryption that goes beyond what's used for TADS 3 save files. My project is aimed at storing certain kinds of meta-information that shouldn't be forgotten just because the player types UNDO or forgets to save before quitting. So it's game state information, not nuclear missile launch codes.

Some alternative approach would be to autosave game on exit and autoload autosaved game on start and saving the state in transient objects during runtime (and copy transient objects into persistent before each save and restore transient objects from persistent when there are is no transient state after load).


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Dec 22, 2016 6:59 am 
Offline

Joined: Fri May 13, 2011 5:07 pm
Posts: 50
Thanks Michel, I really appreciate this. This is going to give me something really fun to dig into.

Tomas... Hmm. I was all set on figuring out this file i/o stuff, but I guess your approach would mean less reading/writing to disk. I'll think about it.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Dec 22, 2016 11:24 am 
Offline

Joined: Thu Oct 27, 2016 2:21 am
Posts: 34
gregb wrote:
Tomas... Hmm. I was all set on figuring out this file i/o stuff, but I guess your approach would mean less reading/writing to disk. I'll think about it.


Though at the other end of the spectrum, you may want your settings to persist even across abnormal session terminations (such as power outages or interpreter crashes), in which case you'd want to save the persistent state to a file as soon as possible when it changes.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Dec 22, 2016 11:37 am 
Offline

Joined: Thu Oct 27, 2016 2:21 am
Posts: 34
Also, are you aware of the settings.t module in the adv3 library? It provides for the management of general settings shared across games (and game sessions). Depending on whether your persistent settings are meant to apply to just one game or to all games that use them, this may just provide the persistence management that you need out of the box.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Dec 22, 2016 12:15 pm 
Offline

Joined: Fri May 13, 2011 5:07 pm
Posts: 50
The data I want to save is game-specific. Actually, no reason not to just tell you my idea: a way to store information about "achievements" in the style of console games or Steam games. Such games remember what you've achieved irrespective of saving, loading, undoing, etc., but the information is game-specific. I'd like to finish an extension for this within a month or so.
Michel Nizette wrote:
Though at the other end of the spectrum, you may want your settings to persist even across abnormal session terminations (such as power outages or interpreter crashes), in which case you'd want to save the persistent state to a file as soon as possible when it changes.

I was just thinking something like that. I like Tomas's idea of storing the data in memory as a transient object, as that saves me from having to read from disk every single time the player types UNDO. But as for writing to disk, I think I'll just do that automatically every time there is a change of state within the set of data my extension is concerned about.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Dec 22, 2016 1:36 pm 
Offline
User avatar

Joined: Tue Apr 20, 2010 2:48 pm
Posts: 959
Location: Greece
gregb wrote:
achievements


https://www.youtube.com/watch?v=31g0YE61PLQ


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Dec 22, 2016 4:08 pm 
Offline

Joined: Thu Oct 27, 2016 2:21 am
Posts: 34
gregb wrote:
Actually, no reason not to just tell you my idea: a way to store information about "achievements" in the style of console games or Steam games. Such games remember what you've achieved irrespective of saving, loading, undoing, etc., but the information is game-specific.


Nice idea. Might provide replay value. Or formalize it, rather, since that alone can't give replay value to a game that doesn't provide it by different means, but I can see how it would be nice for a game to keep track of and reward, say, different plot branches that have been explored. I can see how a game such as _Slouching Towards Bedlam_ might possibly have used this for good effect, too.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Dec 22, 2016 5:51 pm 
Offline

Joined: Fri May 13, 2011 5:07 pm
Posts: 50
RealNC wrote:
https://www.youtube.com/watch?v=31g0YE61PLQ


Haha, I want to unleash achievements as a virus upon the IF community! Soon, all IF games will have achievements unless the author figures out how to remove them!

Seriously, though... the impulse to write this was, I'm working on a game that includes a section that can be breezed through very quickly but has lots to explore. I don't want people to just miss all the cool stuff. It's not really my plan to start a trend within IF, but I might as well make my code reuseable for any TADS 3 authors who are in the same situation.

Greg


Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Dec 23, 2016 7:34 pm 
Offline
User avatar

Joined: Tue Apr 20, 2010 2:48 pm
Posts: 959
Location: Greece
So what you're saying is that this particular section is not worth exploring, boring, or otherwise tedious. To counteract this you're adding "achievements."

"Congrats. It's an achievement to play through this part because it's a boring thing to do but you stuck with it, going through the pain."


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group