Search the Community
Showing results for tags 'undo'.
-
Hello, Does the below seem a reasonable way to deal with undo / redo and snapshots? When required, I serialize the whole scene and append this to a scene > metadata > snapshot array. I can then undo by loading a previously serialized scene in the snapshot array or I can jump to, say, 4 snapshots earlier. I am mindful that the scene saved to snapshot should not include it's metadata > snapshot as I'd end up with files increasing exponentially in size. I can then serialize the whole scene (including the snapshots), upload to server and so can reload another day and still see previous snapshots. So, some questions: Is the above a lazy or bad approach? Is there a better way that I have not yet thought of? Any input would be gratefully received. Thank you. Edit: Alternatively, I could just serialize the whole scene when any particular changes are made and dump that on the server and then grab when required.
-
Hello guys, At the moment I am trying to create a undo function in my painting app. But I have no idea about how to keep track the " last drawing". Is it possible that every time input is down then save the x and y in the an array to keep track the "last drawing"?