Search Unity

Had a monster coding weekend to finish my game ... and then lost it all this morning.

Discussion in 'General Discussion' started by Rajmahal, Jul 27, 2015.

  1. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    I'm getting ready to release my second game, Demon's Rise, which is a turn-based strategic RPG. I had a long list of little things to fix and decided to do it all last weekend. I worked like crazy ... stayed up until around 3am on Saturday, for example. Did a new app preview video and all of the annoying little bits of polish that is time consuming and no fun.

    Then this morning, I deleted some cache file on my macbook and when rebooting ... it wouldn't start. I spent 3 hours with Apple support and eventually had to format the drive and do a clean install of the OS. :(

    Luckily I had a backup but it was from just before the weekend so all that work is gone and needs to be redone. Backup seems to be in good shape though and am right now just doing a build. Hopefully it all goes well.

    I have to say it's not been an entirely bad day. I woke up to a very nice preview article about my game on TouchArcade:

    http://toucharcade.com/2015/07/27/strategy-rpg-demons-rise-conquest-of-the-deep-coming-next-month/
     
  2. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Oh and on the positive side, while I did lose my app preview ... I did upload it both to iTunes connect and Youtube so it exists in the ether and should still be usable in my app submission. :)

    Here's a link. Let me know what you think:

     
    elmar1028, frosted and calmcarrots like this.
  3. voltage

    voltage

    Joined:
    Nov 11, 2011
    Posts:
    515
    Not my kind of game, but I think most of us can tell how hard you worked on this. I just wanted to stop by to congratulate you on the hard work. Don't give up.
     
  4. cyberpunk

    cyberpunk

    Joined:
    Mar 20, 2013
    Posts:
    226
    <insert ad for source control here>

    In all seriousness, I'm sorry man. Your game looks great. Good luck.
     
    angrypenguin and Kiwasi like this.
  5. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I couldn't live without source control for code assets. A remote repository is great for safety. But it also protects you from yourself. If you have a feature that suddenly stops working you can easily see what was changed, and when.
     
    ImpossibleRobert likes this.
  6. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    Two things:

    Congratulations on getting that far! It looks really good, and I would want to play it if you are targeting Android eventually. I'm happy for you, and admittedly a little jealous at the same time ;).

    Second thing, please use source control on your projects. Every developer should use it, and if not, you're dooming yourself. I personally use perforce for code (habit from past job) and SVN for data (auto removes readonly flag when editing). Both are free to use, and just a little bit of time to learn. There are of course other options out there, but those are my suggestions.
     
  7. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    Game looks great. Glad you had a recent backup.

    Seems like we all have to learn that lesson about the need for regular backups and source code control the hard way.

    I'm glad I learned that lesson early.
     
  8. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    3,546
    I personally use multiple backup methods: Google Drive, separate folders on my laptop, a thumb drive, and I occasionally swap to my desktop.

    That sucks man, sorry to hear about losing your work.

    Anyway, your preview looks good. Damn good.

    The ONLY thing that I would say is I'm not too crazy about your character HUD in the lower left of the screen during game play.
     
  9. Teo

    Teo

    Joined:
    Oct 31, 2009
    Posts:
    564
    Hey mate, sad to hear that, is good that you have a backup, but as you said, is not a true backup.

    For all of you who posted here, please try to understand the difference between scheduled backup and continuous (versioned) backup.

    For Unity and maybe all dev project incremental continuous (versioned) backup is the solution. There are plenty of solutions to chose from, and lot's of cloud based.
     
  10. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    530
    I put my work regularly into a remote Git (vso) and can really recommend that. How often have I seen an asset upgrade go wild or accidentally reset/overrode some resources that messed up all my settings etc. Happens all the time. Then I do "git checkout ." and I am back to normal :) It's also very handy to see that way what has changed in upgraded asset scripts by diffing to the previous version.
     
    angrypenguin likes this.
  11. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    Shizola and angrypenguin like this.
  12. Pix10

    Pix10

    Joined:
    Jul 21, 2012
    Posts:
    850
    My advice: Be weird!

    Backing up is fine, but versioning is sanity.

    I'll add to @pKallv's link:
    https://www.sourcetreeapp.com/ for both Win & OSX.
     
    angrypenguin likes this.
  13. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,204
    That's far too much effort. I simply right-click the folder and select TortoiseSVN's commit option. :p
     
    ImpossibleRobert and Kiwasi like this.
  14. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    The desktop shell for GitHub actively scans for changes on its own. Not sure I can get lazier then that.
     
    Ryiah likes this.
  15. Pix10

    Pix10

    Joined:
    Jul 21, 2012
    Posts:
    850
    The problem with restoring from backups, especially if you're going back days or worst case weeks (or even months), is that you can't easily see see what files changed on those dates, and in Unity that means dependencies.

    With versioning, you can browse the timeline of your project, see commits with sensible logs (always commit with informative logs) and revert to all the necessary files in one go, seeing side-by-side now-and-then code comparisons so you know what's different before you go ahead.

    Backups are good for critical failures (like a hard drive going down). They're really not good for restoring old content or functionality unless it's literally just old images (even then image dimensions may change for instance, which - depending on what they're for, could screw up other things).

    You also get to use Unity Cloud Build, which is v. useful if you're developing for iOS, Android or Webplayer...fire & forget commit & builds.
     
  16. Pix10

    Pix10

    Joined:
    Jul 21, 2012
    Posts:
    850
    Hehe I hate TortoiseSVN (which I've used since...forever) so so much after using Git for just 9 months. Try it out, it's weird at first but the genius of it grabs you without your realising it.
     
  17. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,204
    I'll give it a shot with my next project. The only reason I've been using TortoiseSVN is due to Dreamhost supporting SVN for their shared hosting accounts.
     
  18. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    TortoiseSVN saves me clicks? Tell me more...
     
  19. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,204
    Apparently not anywhere near as many as Git does...
     
    Master-Frog likes this.
  20. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    Can you send me a link on how to do that? I want a piece of that action.
     
  21. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    Well, I mean jeez... just automatically creating snapshots of your project as you save... I have the chills, literally.
     
  22. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    That is how i use it :)
     
  23. Pix10

    Pix10

    Joined:
    Jul 21, 2012
    Posts:
    850
    It's not even snapshots, because it's only adding the files that change.

    If you run SourceTree for example, you're given a list of the files that have been altered - in realtime. Select a code file, and it shows a preview window which hilights the changes you've made in code. You can individually prune or commit these to your repository.

    One thing git has over SVN is the concept of local staging, so you commit files locally and then push them all together (or Push automatically when you commit, like SVN does). The huge deal with this is, you can work i.e. on a laptop without an internet connection, and still continue versioning, doing a push when you get connected again. It's incredibly useful.

    Git's branching is nice too, well worth further reading.
     
    XGundam05 likes this.
  24. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    Wait, GitHub submits to the repository whenever it detects a change? Not sure if I'd like that....
     
  25. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    3,546
    Meh, I just keep a running to-do list with projected and completed dates.
     
  26. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    To those of you who entrust remote servers to store your project code, you are brave, as I don't have the courage for that yet. My Perforce and SVN servers actually run from a USB stick, as I switch between desktop and laptop almost daily, and the stick stays on a lanyard around my neck while in transit. The downside is that I don't have the reliable up-time or security of a service provider, but the upside is if I ever get attacked and my usb stick gets stolen, I doubt, the assailant would be the type of person to be smart enough to figure out how to run my repos anyway, unless it was like a government operation, at which point, I have bigger problems anyway. Lol. While I checkin to p4 or svn at least once per working session, I back up both repositories to DVD/Bluray every 1-3 weeks, and store the discs in a storage unit somewhere in a remote location, as in physically drive to the location and drop them off, yknow, kinda like burying in the desert.
     
  27. Pix10

    Pix10

    Joined:
    Jul 21, 2012
    Posts:
    850
    ToDo: Fix messed up restore of some bits from backup. ETA 2 days
    or
    ToDo: Checkout messed up code and object references from 2 days ago. ETA 10 seconds.

    ;)
     
  28. Pix10

    Pix10

    Joined:
    Jul 21, 2012
    Posts:
    850
    @aer0ace Nothing wrong with local servers, we ran our SVN server locally until only recently (we're all over planet now, no centralized IP address).

    The important thing is that you version. When you work with other people, you're best off with either a static IP and servers or using a service (and create your own backups of the hosted repo anyway).
     
  29. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    All good points. I'm mainly referring to entrusting third-party servers/cloud storage to hold your code. If you have another openSSL heartbleed situation again on say a DropBox account that's holding say, Half Life 3 code...., And I know nothing about Unity Cloud Build yet, but my ignorance tells me that you'd need to copy all of your scripts to some third-party remote server and then something like BuildForge gets kicked off on their end.
     
  30. Pix10

    Pix10

    Joined:
    Jul 21, 2012
    Posts:
    850
    Yeah, well that's a longer story. I've been burgled a few times more than I've been hacked. The one advantage of online storage is, burglars can't take it...
     
  31. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    Source control.

    And please stop recommending Dropbox people, it's an archaic technique for backing up source code and project assets.
     
    Dustin-Horne, Ryiah and Kiwasi like this.
  32. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Source control is the way to go :)
    At the end of each day always commit and push, even more than once per day if you think many things have been changed in a short period of time or something major/important has been added.

    I use Visual Studio Online https://www.visualstudio.com/en-us/products/visual-studio-online-pricing-vs.aspx
    Free private repositories, unlimited space and max 5 users (free account). Perfect if you have lots of 3d and 2d assets and don't want to spend tens or hundreds of $/€ per month for a service with more GBs for your repository.
    Only con is that for now it doesn't support encryption like using putty keys (something they say they will be adding but haven't yet (i think)). Authentication is done through https, so that's something :p
    It also doesn't have that many options when comparing to something like BitBucket, but it works for the most part.

    I also use Git and TortoiseGit. I find it very easy and fast to use. https://code.google.com/p/tortoisegit/
     
    frosted and tango209 like this.
  33. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,536
    I used to backup manually with Dropbox, then I realized it was a waste of time compared to proper source control.

    I guess in the end it doesn't really matter as long as you do indeed just back things up and avoid losing days of work needlessly.
     
  34. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Nah, it just scans for changes and alerts me when I should make a commit. It doesn't auto commit. In reality it's probably just a as many clicks as SVN.

    I do have to get set up with a remote server for it. At the moment it's just firing off to a local repository. Fine for version control, but not exactly secure against hardware failure or my four year old going the computer a bath.
     
  35. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    Not sure if that was directed towards me, but I wasn't recommend DropBox. I don't even have an account. It was an example of a inadequate revision control system, and my exact point behind storing your source code in such third-party solutions. I'm basically agreeing with what you said in a roundabout 3+ post way.
     
    Last edited: Jul 28, 2015
  36. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    That's the reason why I eventually moved to an external hard drive, those wallet-sized ones, and then finally to the USB stick, now that they're like a pack of four 16 giggers for like 30-40 bucks. The repositories sit on that, occasionally make backups, and if you feel the stick is failing, pop open another one, copy the repos, and continue. The only downside I've found for this so far is backups take 3 times longer than if it were on an internal HDD since it's running across a slow USB 2.0 port, but I can live with that.
     
  37. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    You are fooling yourself. Your system is less reliable then almost every commercial provider. If you just used github for example your data would be safer. Making a secondary automated backup to another hosting provider would be even better, and it's dead simple to do. Your offsite backups have loss built in.

    What you have done is make things more complicated and at the same time less secure/reliable.
     
  38. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    +1,000,000

    I use TFS (Visual Studio Online) for source control / version history. I also use CrashPlan which encrypts and backs my stuff up to the cloud. Multi-provider is the way to go.
     
  39. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    Yes it 'works', but it's about as efficient as writing a game from scratch in C++ and Assembly.
     
  40. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    Cool story bro
     
    tango209 and Master-Frog like this.
  41. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    Version control is better, though. It's real strength shines through if you're working with more than 1 person, where zip file dumps become useless. Also, if the project were anything more than a small indie title, I have to imagine it becoming slow and ridiculously inefficient.
     
    Meltdown likes this.
  42. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    My kneejerk reaction to people taking backups and using Dropbox or a folder on their backup hard drive as some sort of subpar "versioning tech" is that:

    • They've probably never used source control or never had a problem that required rolling back and forth between different versions to find which version stuff broke on. Even once of doing that that (I usually have 3-5 per game) and you'd never go without source control again. A collection of zips on a file share as a replacement seems like you are really "asking for" one of those problems to occur. It will eventually and you'll wish you had real version control from the beginning. Options like SVN Blame are insanely awesome when you need them now and then to see when each line of code was last modified by who.
    • Maybe they think version control is harder to learn. SVN: nope. GIT - maybe.

    Even if I was the only person working on a game, it's still an insanely valuable tool to have. So I don't agree with the comment above this.

    This is not 1983 where we had to back up to another cassette tape and worry about it getting corrupt after awhile and losing work. So I don't have much sympathy when I hear stories like the OP's (not being mean, just being honest). Unless they just didn't know what source control is. Hopefully the OP has learned his lesson and can think about using version control so it doesn't happen again like that. Sucks that it did happen, been there back in the 80's a few times before I ever heard of source control.
     
    Last edited: Jul 29, 2015
  43. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    It's worked for me for years. Admittedly our biggest projects are rarely more than say 5gb, and if we were getting into tens or hundreds of gigs we'd look at other, more scalable solutions (possible multiple repos, possibly a different version control system).
     
    Dustin-Horne likes this.
  44. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Consider the amount of time you spend doing this manual rigmarole. Then consider how long it takes to right click, select "Commit", and then select "Push".

    Once it's pushed your changes should be on multiple systems. Your local workstation, your remote repo server and, when that gets backed up, there as well.

    You can also navigate back and forward in time easily to find changes as @jerotas described. You can also collaborate with others easily thanks to merging and diffing tools (which often get the job done with zero human effort). You can also document your history along with the changes. You can also branch to try new crazy stuff or large changes without interfering with your mainline development.

    You're also protected against damage, loss and/or theft of those USB sticks.
     
    jerotas, Dustin-Horne and Ryiah like this.
  45. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    Not sure if you were completely understanding my process, or confusing two ideas. I have a Perforce and SVN server on my USB stick. It's a local server, that, if I wanted to, yeah, I can keep it plugged in, and sync multiple machines to that repository from my local server. The only thing I'm not doing is what @snacktime suggests, in that I have to entrust third-party remote servers to maintain my repositories, which I admit I will eventually need to build up the courage to do.
     
    jerotas likes this.
  46. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    I've used every single Git GUI out there, and I can strongly recommend SmartGit !!
     
    Dustin-Horne likes this.
  47. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    BitBucket offers free private git repositories.
     
  48. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    That's cool. There's plenty of free, private hosting around. Microsoft have something, BitBucket has free accounts for up to 2gb, and so on. Or you can always set up your own repo on a spare PC if you have on, it's pretty simple.

    It is... but I don't know any experienced developers who do it for any non-trivial project. Once you're fluent with your system of choice it makes life easier at the same time as safer. Why would you not do that?
     
    Dustin-Horne likes this.
  49. cyberpunk

    cyberpunk

    Joined:
    Mar 20, 2013
    Posts:
    226
    You know, I do agree with the argument that you can't always trust the cloud. I had a project that was hosted on Code Spaces, and it was a paid service. Maybe some people didn't hear the story, they basically that got hacked, completely owned, and the service was shut down. The story was the hackers made some crazy demands, the company refused, and the hackers deleted *everything* including backups and all. Kind of a horror story.
    http://www.infoworld.com/article/2608076/data-center/murder-in-the-amazon-cloud.html

    Sadly, a project I was working on was on the service at the time, and that was my only backup. Of course, I still had the most recently working version on my local machine, even so. I lost all that history. You think it won't happen, but it can.

    Now I use a multi-tiered approach. I still use source control, but with a more reputable company. I have a second paid cloud backup solution (which updates every time I save a file, so I can even roll back if I forget to commit for a while). Finally I have the whole folder backing up locally to a second hard-drive. Really, the chance that two different cloud hosting providers would get hacked/shut down, and both my hard-drives dying simultaneously is almost impossible. At least I hope.

    Also, not sure how anyone in this age could think saving zip files is sufficient. That's like the old days with files like "Awesome_Game_267b_final_final_NO_REALLY_FINAL.zip". Not going to work long term, but hey, your loss.
     
    angrypenguin likes this.
  50. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    I did hear about that attack, actually. It's a great example of why all data needs to be backed up properly. If there's only one copy of something it's not "backed up", it's just "stored".

    It's also a good reason for DVCS, like Git or Mercurial, where it can be used. If my VCS host goes down - which is entirely possible, as the above example shows - I won't lose my project histories because the entire repo including all history is copied to each workstation. So to lose work even for a personal project at home at least two computers in different parts of the world have to die more or less at once. And even if that happened, since I dev on both a desktop and a laptop I'd probably have another recent copy of the whole thing as well.

    And the version control host is also backed up as well. So there's another layer of redundancy, too, though that one can't necessarily be considered as highly as the others purely because I don't control it. For all I know they've got a single-point-of-failure in their system just like Code Spaces did that could take out their service and their backup at once - though I hope not. Or it could be something more mundane, like my Internet connection going down. That stuff happens, too, and work must go on.