SakeTami
Droid Productions
Droid Productions

patreon


Experimental Rollback for Love of Magic

Renpy style rollback has been by far the most requested functionality in Love of Magic, but it's a complex and multi-headed beast, especially 'true' rollback (undoing all actions associated with the state, like stats being added, flags set, conversations consumed, or complex script actions triggered).

I built one for Morningstar (with some limitations; there are script functions where the system basically stops rollback, because there's no clean way to undo the state), but that requires me to completely rewrite the scripting system... not something I'm keen to do on Love of Magic at this stage :)

I have, however, gotten so used to rollback in Morningstar that it feels a little painful when it doesn't work in Love of Magic. So if I can't do it *properly*... can I cheat and get most of the way there? 

Turns out I can, and it's not all that complex (though I'm sure it's still completely riddled with bugs). Basically I just track the things that people usually care about (characters speaking, images, music, video, etc) and when I rollback I just replace those things, rather than trying to 'undo' the full conversation.

The end result handles the majority of use cases (I clicked too fast, or I want to go back and admire an image, or recall what a person said); the one thing it can't do is go back and undo an action (I should have called him a hamster, damnit). Since the actual state is unchanged (only the visuals change), the decisions made are locked. You can still rewind to the beginning of the conversation and go from there, if you really want.

So. A cheat. But hopefully useful to some of you. I'll be rolling it out onto the development branch today, and my brave testers on discord will proceed to break it in a thousand different ways.

TGIF, everyone, and have a great weekend.

Experimental Rollback for Love of Magic

Comments

Yeah, that's essentially what the rewind feature does (it just loads an auto-save from just before the conversation started). The problem is that those saves are quite heavy, since they contain the entire save state (including things like every line of conversation visited ingame, etc). What I did here was instead to make a super-slimmed down game state, which I can easily keep in memory.

Droid Productions

Is it possible to make checkpoint states? instead of rolling back step by step it can just go back to a checkpoint. like start of conversation, before start of conversation, last branched dialogue option, etc?

Sinlaire


More Creators