Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Client Patching

Discussion in 'Editor & General Support' started by zumwalt, Apr 21, 2008.

  1. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Ok, I have ran across a new delima.

    I don't want users to have to re-download the entire client every time I want to distribute a patch to the client, say I add a new zone.

    Currently the user has to re-download the entire client. Now this is an issue for the following reasons that I have to address:

    1) add new zones easily
    2) keep everyone in sync
    3) apply emergency fixes to small segments of code

    Actually I can think of tons of more reasons including update to graphics, updates to music, etc, but three listed above are my current issues.

    So, have I overlooked something with Unity or is this something that is 'in the works'.
     
  2. Sync1B

    Sync1B

    Joined:
    Sep 13, 2005
    Posts:
    561
    I once messed around with updates as well. What you are looking for is a recursive binary patcher.

    The way they work is they compare two apps and their files within to make a difference binary that has all the changes.

    There are a few ways to make and apply difference binary files. I tried some unix commands and apps, but generally that app would have to be installed on the client for the patch to be applied which was not desirable. If your a code head there are tons of papers on it and you could probably make your own. If not, then there are a few osx native apps that can do it for you, but do cost a little to use with no restrictions. I found a good one a while ago, I will try and search for it again and let you know.

    Bill
     
  3. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,306
  4. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Thanks to both for answers.
    This is a very good engine as a whole but this is one key feature for what I am trying to accomplish. If the scene files are encrypted but outside the binary, that would probably suffice. Then I could write in code that on launch, it looks at a file manifest and sees if there is a change or a new version that needs deployed, then pull files using the WWW class accordingly and replace local files.

    Like EQ2 does or WOW does for instance.
    If all of the content for a given level was in a single bin that would work, but the bin's would have to be external to the binary.

    This thing is beyond awesome for single final distribution, but lacks only on patching.
     
  5. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,306
    My feeling would be that by the time you would go online with a project that really totally requires patching, Unity might be "there". That's only a speculation, of course - but it seems to me that there's more and more people going for MMO-stuff with Unity. If only 1/3 of them really does it (and finishes their projects), that might create enough momentum for Unity to become a real MMO-engine, of which smart patching would probably be kind of like the most trivial part ;-)

    Question would be, of course, if UT is interested in including patch-functionalities in say Unity 3.0. Since patching (in my point of view) also would an extremely useful future for small Web games big enough to have v1.1 or v2.0 (or maybe add levels at a later point in time), I think it makes a lot of sense. Question is: Does UT think the same? ;-)

    Sunny regards,
    Jashan
     
  6. AngryAnt

    AngryAnt

    Keyboard Operator Moderator

    Joined:
    Oct 25, 2005
    Posts:
    3,045
    Both use downloaded binary patching apps.

    For OS X I recommend http://www.ipatch.org/US/index.html

    Don't know what you'd use for windows.
     
  7. Sync1B

    Sync1B

    Joined:
    Sep 13, 2005
    Posts:
    561
    Yea I used iPatch with unity and was able to update very easily.

    Bill
     
  8. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Well that's good to know. Is there a Windows equivalent?
     
  9. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Patching goes WAY beyond MMO's. All games since the early 90's (or as far back as my PC gaming goes) had the ability to patch. I have some old DOS games that allow for patching. These were obviously not MMO's, not even multiplayer games, just simple games that required files to be updated.

    All I want is for my users to be able to download modified content and have it merged in with the current binary. That program looks like it will do the trick as long as they don't have to download my entire game again.

    I need to read more info on it and get ahold of it for the MAC. My user base though is PC users so not going to do much good on that front. I will keep looking for a way to solve this delima, I am sure there are third party products that I can use like iPatch for the PC.

    Thanks for the info guys.
    I'll keep hunting because my content right now is nearing a gig and I can't afford the bandwidth for constant redistributions, seriously though, ability to patch really does go way beyond MMO.

    My game will come out single player before it even hits multiplayer base, this will allow people to play it without the online limitations to my game structure at the moment, baby steps, no way do I want to jump over that hurdle yet. miniMMO maybe, but I am not rich, so I can't afford to host this thing anywhere to suck up the bandwidth it would take for more than 100 players, I can handle about a dozen at the moment, but thats it.

    Thanks again!
    Jonathan
     
  10. Sync1B

    Sync1B

    Joined:
    Sep 13, 2005
    Posts:
    561
    There was no cross platform tools that I found for this when I tried to do it. There could be some thing now, but most of the tools used in other games appear to be custom. I really wish there was a uniform tool you could use to make the file and package for both mac and windows.

    Make sure to post if you find any thing!

    Bill
     
  11. tbjod

    tbjod

    Joined:
    Feb 25, 2008
    Posts:
    19
  12. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,306
    Hi Tobias,

    wow, that looks cool... especially:

    http://www.indigorose.com/trueupdate/

    That's basically what I'd like to see integrated into Unity (both Standalones and Web players, and of course: Windows and Mac... and maybe iPhone ;-) just kidding).

    Sunny regards,
    Jashan
     
  13. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Interesting stuff

    We created our own patcher software last year while working on an MMO for the exact reason that there was no usefull, affordable patching solution with a "starter" application, binary differences (byte difference files) and compression on the uploaded file. We don't have cool names for the features, we prefer having them working and having the technology at an affordable price for all kind of game and application developers :)

    It is called Patch File Creator and is soon going to sold again on a rather large Indie Platform if everything goes as planned.

    We consider moving it to a different language in the future, to make the patcher as well as the patch building and visual configuration applications crossplattform and the whole process even faster. But there is no timeline on this, will depend on the users, if they would like to see that or not.
     
  14. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I've got a stupid question: if your executable is post compressed or copy protected, a patching app won't work, right?
     
  15. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    don't see why not.
    Byte patching will just "make it to the new one" and file replacement does not care for such stuff at all.

    there is nothing that prevents either of it within post processing or protection as the updater will not run from within the executable otherwise its impossible to replace the executable.
     
  16. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
  17. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Thanks a ton everyone!
    Going to give each a try and see what suites my needs the best :)
    These are just what I was looking for!
     
  18. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    698
    does that mean there is no easy way to ship additional content to a game? If I want to release a new level I can't just send out some assets and a scene file (in whatever form), but have to redistribute the entire application? If it was easy I'd prefer to allow downloading new levels from right within the game, but I guess using iPatch sounds like a reasonable solution if only I call it an "Add-on" rather than a "Patch"...

    thanks for the links!
     
  19. Charles Hinshaw

    Charles Hinshaw

    Joined:
    Feb 6, 2008
    Posts:
    1,070
    No, this doesn't mean that at all.

    If your levels are stored as an external level file that is loaded by your game in Unity, you can add new levels by adding new level files.

    If you need to update the game itself, there is "no easy way" to do that. If, for example, you have fixed bugs or added additional multiplayer support. The focus on this thread is on how to make it so that you don't have to distribute the whole application, but rather a compressed binary diff that executes and makes changes to the existing application (saving users from downloading the 99% of the application that didn't change.)

    Note that depending on your design decision, it is possible that there is equally "no easy way" to have level files external in that you might have to come up with some format for storing your level information and some method for Unity to save and load those levels (possibly even a custom level editor) if not simply an editorscript that copies out level information.

     
  20. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Muhaha - thread resurrection! :)

    Two additional questions:
    - Any more links to suitable apps for both PC/Mac, I'd really like some recommended alternatives?
    - Any experience with any patch maker with Unity projects? How much space did you save in the process?

    Thanks in advance!
    Dan
     
  21. the_gnoblin

    the_gnoblin

    Joined:
    Jan 10, 2009
    Posts:
    722
    I am interested in the topic!

    Please post lot's of stuff here :p
     
  22. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    352
    Okay, my turn to resurrect this.

    It seems that this is great for Windows, as has been noted elsewhere in this thread: http://www.indigorose.com/trueupdate/features-true-update/

    However, that's only for Windows. Is there something else that can work for the Mac? In the past I have been using AppLife update, which has been absolutely wonderful for my .NET applications. However, that would not have any chance of working for Unity if Unity is not able to reference external dlls (can that be done in Unity, by the way?); AppLife Update is launched from within the process of the application itself, and is built for .NET rather than Mono. So there's a chance it could work, I suppose, but it would still be Windows-only.

    I don't have a Mac of my own, so I don't have a way to create a patch using something like iPatch. And that seems not to be self-updating, either, which is another concern. Has anyone found anything that is (preferably) cross platform for patching? Obviously I would need different actual patches to distribute for the Mac and Windows versions of a game, but ideally they would be created using the same tool, or at least two tools with similar functionality to one another (and auto-patching in both).

    In my specific case I am doing dynamic streaming of assets into Unity, so I don't even care about binary patching. All I need is something that does the diffs based on overall files that have changed, that packages that in some way, and which then can be used to auto-update from the client end. I imagine most of you want binary patching in addition to the rest of that list, though.

    Anyone have any luck finding this sort of thing so far?
     
  23. RodrigoSeVeN

    RodrigoSeVeN

    Joined:
    Jul 10, 2010
    Posts:
    15
    I just wanted to thank everybody for the links and all.

    I'll be setting up a game on a server and knowing of future problems i had to look for a patching system for unity right away.

    I hope one of these works perfectly for my case. Good luck for you all!
     
  24. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    352
    Oh, by the way, to update folks on what I wound up going with: Bitrock. http://bitrock.com/

    These guys are awesome when it comes to installers, and you can even have the installers used for unzipping downloaded files, etc, which makes it so that you can "roll your own" automatic updates using a combination of Bitrock and your own game. This works consistently across the Mac and Windows, and Bitrock would also work on Linux, not that I've tried it.

    Also, their support is awesome, I have to say. Definitely a great vendor.

    If you want to see how I implemented this, you can check it out with my game Tidalis: http://www.arcengames.com/tidalis_features.php

    Obviously you can't see all the details there, but you can see how it turned out in practice (what the workflow is there). If you have questions over the details, I don't mind sharing at all.

    In my opinion, Bitrock is the best possible solution for doing automatic updates at this stage, since you probably want to roll your own to at least a small degree, anyway. This is the fourth automatic updates system I've used in the last 8 years, and the umpteenth I've evaluated, and it's my favorite by far largely because of the insane amount of control I have over the entire process, which is just what I wanted.