Tool T-Backup - Backup your Worlds and Players with ease

Discussion in 'Released' started by darthmorf, Sep 20, 2015.

  1. darthmorf

    darthmorf Party Girl

    Woah, sorry I've been quite busy, and haven't had time to work on this much. I've started again just now, and have got restoring backups working nicely!


    However, I'm not going to post the update yet, as I also want to include multiple profiles in the next release.

    Stay tuned for more updates soon!
    Menchii and MinieK like this.
  2. darthmorf

    darthmorf Party Girl

    Ok, time for another update.
    I've figured out the best way to have multiple settings; storing them in the registry instead of the default settings file.
    However, this has caused me to need to re-write a large section of the program, meaning it could be a while until the next release. I'm also using this as an opportunity to 'tidy up' some of my code, meaning it should be more stable. (Though as it's such a simple program it's not very unstable anyway).

    I would also quite like to judge interest in the program. If you're using it or plan to use it, I'd love it if you posted in the thread to tell me! (It's nice to get some feedback.) In addition, if you're interested in seeing the source code, eventually I'll work out how to use github properly, but for now just send me a PM. Don't forget to post any feature requests too.

    Have a good day!

  3. Jeckel

    Jeckel Terrarian

    I've been considering using your program, having just recently found it.

    Using the default settings file can be annoying, but I'm also not much of a fan of using the registry to store settings. I would suggest looking into binary serialization or xml serialization. Serialization is the easiest way to store settings as you just have to create an object with settings as member variables or properties and then have two methods, one to serialize and the other to deserialize that object. I'm not sure of how much programing experience you have, but if you ever have any questions, feel free to PM me, I'm happy to help. :)
    darthmorf likes this.
  4. darthmorf

    darthmorf Party Girl

    Thanks, thats nice to hear. I am still fairly new to programming, so I'd need to look into your suggestion a bit more to find out how difficult it would be.
    Out of curiosity, what do you dislike about the registry? It's whole purpose is for this sort of thing.
    Last edited: Apr 9, 2016
  5. Menchii

    Menchii Terrarian

    I'm still using your program.
    darthmorf likes this.
  6. Jeckel

    Jeckel Terrarian

    There are a few reasons to avoid using the registry for standard application settings. Keep in mind that I'm talking in general here, not specifically about your program:

    1) It is not user-friendly and can actually be user-dangerous. It is not uncommon for users to move a program to a different directory, a different computer, or to share their settings with another user, and one can't simply copy and paste registry entries like they can a settings file. Should a user want to edit/move/share their settings, they have to delve into regedit and that can be dangerous because one small mistake made by a person that isn't familiar with regediting can bork a computer in ways both small and large.

    2) It was never intended as a dumping ground for third-party info. The registry was created because the OS information was getting to large to store in the old win.ini file. To allow programs to interact with windows settings and systems, such as registering file extension associations, the registry was made public. However, this allowed everyone and their brother to dump their settings in there also and, as a result, the registry is now suffering the same problem that the old win.ini did, it is getting too large and is actually slowing computers down.

    3) It is an outdated model. The standard method for program settings storage is files, be they ini, xml, or json. The use of the registry has been outdated since at least win7 and even possible win xp. As with all things coding related, it is best to stick with best practices and not to fall into the trap of using outdated methods. Personally, this is enough reason in itself to avoid storing application specific settings in the registry.

    4) It is an unnecessary separation of parts. If you think of a program like a house and the settings are your car, then storing the settings in a file in the program directory is equivalent to parking your car in your garage. Storing the settings file in a directory in My Documents (like terraria does with world files and many other programs do with settings and other files) or similar location is equivalent to parking in your driveway or in front of your house. While storing settings in the registry is like leaving your car in a public parking garage several miles away from your house. In the former places, the settings car is obviously part of your program house to anyone that has business looking, while someone would not only have to know to look in the registry garage, but would also have to know exactly where to look or what to look for. Again, it is just bad practice and obfuscates something that should be as intuitive as possible.

    I hope that all makes sense. Obviously, you are free to do as you want with your program, I'm the last person to think otherwise, but these are some of the reasons that I recommend against using the registry for anything other than registering something with the underlying OS, such as file associations.

    Serialization/deserialization really is just one of the greatest things since sliced bread, so even if you go with the registry or something else for this, I would strongly recommend getting that tool into your toolbelt, as it has come in handy for me so many times over the years. If you run into any problems or have any questions, I love talking code so don't be afraid to drop me a PM or to post in the, underused, TCF Programming Group. :)
    Kazzymodus, Menchii and darthmorf like this.
  7. darthmorf

    darthmorf Party Girl

    That does make a lot of sense. As you say, it is important in programming to stick to standards. That's one of the first things I was taught.

    It's also nice to learn the registry's purpose. Since so many other programs used it the same way that I have, (including Terraria), I assumed it was intended for this sort of thing.
    I will add this to the to do list, to do at some indefinate future point. I have used this program as a way to get to grips with C#, so learning xml/deserialization would make a good learning exercise.

    Interesting to hear about that SG. I will check it out, and maybe use it as an alternate for when good ol' stack overflow doesn't yeild any results.
    Jeckel likes this.
  8. SteveisNoob

    SteveisNoob Pixel Pirate

    One-click back-up and restore. It save us from opening the save folder to take back-ups, and that's a life quality increaser. So, nice work!
    darthmorf likes this.
  9. Menchii

    Menchii Terrarian

    That was an interesting read Jeckel. I learned a lot and I'm not even a programmer. :dryadsmile:
    darthmorf likes this.
  10. darthmorf

    darthmorf Party Girl

    v3.0 is now live!

    -Commented, and generally tidied up code.
    -Added an option to restore backups.
    -Added an option to have multiple profiles.
    -Profiles are now stored to the registry. (May change in the future)

    3.PNG 2.PNG 1.PNG

    thejaxster likes this.
  11. Tyro

    Tyro Terrarian

    Can this back up games stored in the Steam Cloud?
  12. darthmorf

    darthmorf Party Girl

    No, as they aren't physically stored on your PC. If you move them off the cloud, run the program then put them back on it should work.
  13. darthmorf

    darthmorf Party Girl

    (sorry for doublepost)

    I'm currently working on a feature that when enabled will auto backup your saves when Terraria is launched. If you have any other suggestions, or inquiries, now is a good time to post them.
    Tyro likes this.
  14. M4D-4LI3N

    M4D-4LI3N Retinazer

    darthmorf likes this.
  15. r4v1n6

    r4v1n6 Official Terrarian

    Interesting little program, however I encountered some issues:
    • The Default profile just won't remember my changed settings (path to exe, path to backup). I have to create a new profile for the settings to be remembered.
    • It doesn't find my Terraria exe automatically, but that's expected as I have moved it to a different SteamLibrary. It could be more graceful when trying to run a file that doesn't exist however. Now it throws an exception that is unhandled by the program.
    • It would be nice if it was possible set the paths by clicking a Browse button. Windows 10 have a feature where you can copy the path to an object, but I don't think 7 had it (can't remember).
    • It would be nice if it remembers which profile it used last and switch to that when launching the program.
    Other than that it seems like a real nice program. I will use it for a while to see if I like it better than my manual backup method with 7-Zip.
  16. darthmorf

    darthmorf Party Girl

    Thanks for the feedback. I'll likely release an update soon based upon it.
    However, I'm not sure what you mean by your second to last point.
  17. r4v1n6

    r4v1n6 Official Terrarian

    Other programs (like Blender) have a Browse button [...] beside the Field where it asks for a path to something. It Simply opens a "Open File" dialog so that the user can browse to a location without having to type anything.
    darthmorf likes this.
  18. darthmorf

    darthmorf Party Girl

    I see. I'll look into it.
  19. macks2008

    macks2008 Terrarian

    personally I think the tagline for this in your signature (as well as anywhere else it appears) should read "never lose a world to the Eater again", but that's just my take on the double meaning of "corruption" as related to terraria worlds

    edit: also, please forgive any negative impact by bumping this year-old thread. It's still linked to in Darth's signature (according to his profile), and I forgot to check that the thread had been active recently before adding my input. I can delete this message if moderators so desire, but I would prefer you have a better reason than just "it made all the X other messages in a single forum a single spot lower, because no one has EVER made an unnecessary thread to the same effect". Mind you, the sarcasm is mostly for humorous effect (no disrespect intended), but the point made by it is valid, isn't it?
    Last edited: Nov 7, 2017
    darthmorf likes this.
  20. darthmorf

    darthmorf Party Girl

    On this forum it isn't against the rules to bump old threads, as long as your message is valid (Doesn't break any rules).

    I like the pun, but I worry that people would get even more confused about it's purpose haha!
    Lunatic Lobbyist likes this.