v0.4.0 - UNDO / REDO


Yo!

So it's been a little while since my last post, as usual, and so, here I am again with another devlog update for MasterPlan. This marks version 0.4.0, and so I decided to throw together a new splash-screen, which also transferred to the design for the store page and overall branding for MasterPlan as well. Cool!


Let's talk a bit about this update - it's pretty light overall, but what's there is very cool and very useful.

Undo, Undid, Undone

Undos and redo's now exist in MasterPlan! To perform them, simply press Ctrl+Z to undo, and Ctrl+Shift+Z to redo.


Currently, this is just for the project view (i.e. not for text editing when in a Task; that's for next time). Also note that the undo system is linked to each individual Board, so be aware of this when either deleting Boards or cutting content from one Board and pasting it onto another. Overall, this was a bit complicated to set up, in some ways more than others.

For a bit of a technical write-up that talks about this, the way that I initially envisioned creating the undo system was a bit different from how I ended up actually pulling it off. At first, I thought I would have to essentially rewrite MasterPlan to use an internal message system to store how Tasks are created, somewhat like instructions for a recipe. That way, I could store these messages in a dynamic list, and then move forward and back over that list when undoing or redoing to revert or re-apply changes that were done to "make up" the project in that state. Something like this pseudocode:

messages := []string{"Create Task 131", "Move Task 131 to [160, -32]", "Change Task 131 Type to Progression"}

Instead, I opted to simply save the entirety of each changed Task whenever necessary (whenever it's moved, created, deleted, whatever). Saving Tasks internally leverages the same code as saving the project and its Tasks to a file, so this was a fairly simple and elegant solution. However, I unexpectedly ran into problems when attempting to actually move back and forth across the array because MasterPlan needs to be able to cut off the array whenever necessary to "rebase it" off of a more current state. 

Say, for example, you create three Tasks, then undo creating them and create a fourth one. After that, you should only be able to undo creating that fourth Task. However, this was a bit fiddly to get working properly, as it needs to cut off exactly when necessary. It also needs to allow for putting multiple operations (like deleting several Tasks, or moving several Tasks) into a single undo step. Safe to say, it was a bit difficult and took quite a bit of time to get up and running! In any case, it should be working fine now. 

Please let me know if things don't work as expected or if it's not behaving properly - I'll see about fixing it ASAP. As a side-note, the changes to allow for undo / redo might have actually improved the speed when loading projects, so please let me know if you experience a speed boost when loading particularly large projects.

Back It Up

I also added automatic backups - this will automatically save your project every so often to protect against losing your work due to power loss, accidents, etc. You can change how many backups to keep before erasing the oldest saves, as well; that way, you don't have to worry about having your project folder clogged with backups. The above settings are the default when creating new Projects - be sure to check your's when you load your Project. 

Backups have the same filename as the "original" project file, but with the suffix "_bak_" with a datestamp, so you can easily identify them. They are saved right next to the original file. MasterPlan will also automatically delete the oldest backups (even across sessions) if the total count exceeds the maximum number indicated in your settings - feel free to try them out to give yourself to give yourself a bit of peace of mind concerning the safety of your projects.

______

Here's the full changelog, as usual.

  • Adding undo / redo. FINALLY. Note that Tasks no longer are deleted like before unless they exceed the undo count; this is done because they could be restored by redos. HOPEFULLY THIS DOESN'T COME BACK TO BITE ME.
  • Updating splashscreen.
  • Fix: Right clicking when project settings is open closes the menu.
  • Fix: NumberSpinner is positioned properly (or just more correctly) in settings menu.
  • Serialization (saving and loading) of Tasks / Projects improved.
  • FIX: Project SampleRate isn't loaded properly. 
  • Redirecting log output of MasterPlan to a file ("log.txt", in the same folder as MasterPlan) so that errors and crashes can be sent to me by reference. 
  • Adding automatic backups. Automatic backups happen every X minutes, configurable by the user. MP will automatically delete the oldest backups that exceed the maximum count.
  • FIX: Progression completion current and max can no longer go below 0.
  • MasterPlan no longer asks for project directory on save. Now it asks for the project file name itself, sensibly.
  • FIX: If the last loaded project doesn't exist, MP no longer crashes.
  • FIX: Messages logged are clearer and easier to read with indentations and dashes ("-").
  • FIX: Errors for failures when loading projects are no longer displayed (and logged) twice.
  • FIX: Message logging now works correctly with multiple lines per message (\n).
  • FIX: Deadlines can no longer show up on un-completable Tasks by setting the deadline on a un-completable Task, and then changing its type.

______

Welp, that's it; I'm tired now, haha. Thanks!


Get MasterPlan

Buy Now$15.00 USD or more

Leave a comment

Log in with itch.io to leave a comment.