Game Development Community

dev|Pro Game Development Curriculum

WinterLeaf Entertainment Updateinator

by Richard Preziosi · 03/08/2012 (10:53 am) · 3 comments

What is it?

Updatinator is a new software solution from WinterLeaf Entertainment, proudly one of our first solutions we will be releasing. In a nut shell, Updateinator is a software solution for building an auto-updater/auto-patcher for your game or any other file related instance you can think of.

It is a question that every developer has when they release software, "How will we keep the clients up to date?" Well assuming that you haven't written 100% feature rich and bug free code, which let's face it, doesn't happen often. So what is one to do? Release Patch files or new executables for download on our website? Sure, but there is no guarantee your customers/clients will ever find or know about them.

Most MMO games have some sort of auto-patcher/auto-updater/auto-launcher, actually most single-player games have some flavor of this now as well. You've seen them, you open it up, it scans your files and downloads any files that do not match a certain criteria or that have been tampered with.

Boring technical stuff warning

Feel free to skip past this part to see some screen shots of the Updateinator patch generator program and a quick outline of what is going on in each screen.

Ok here's how it works, Updateinator comes with 2 packages, the Updateinator patch generator program and the client API. The patch generator program is where the background magic happens, it takes all the relevant information, scans and hashes, with encryption algorithms, your files and creates a nifty encrypted file log. You upload your file log and your project directory somewhere onto the web. Then you set up your Client API to point to where you uploaded your file log to and let the program do it's magic.

Why are we comparing files by hashes instead of bytes? Simply because comparing bytes would require us to download the whole file each time we want to compare. Using an encrypted hash code generated for each specific file gives us a way to compare files quicker and easier, without sacrificing too much accuracy. If you understand anything about hashing you will know that one changed letter or one altered pixel can result in wildly different hashes. That in mind there are 5 different hashing algorithms available to use when you create you file log.

Once your files are scanned and the file log is built, it is then 128 bit encrypted (any more would be overkill, though if it is requested we may think about adding more security here).

The client API is created specifically for .Net, it can be used with C# or VisualBasic, a demo solution for each will be provided with the software package. The API handles most of the work, you pass it a few variables, the location that your file log is uploaded to; if using ftp, a ftp username and password, and really that is it. The API is equipped with a pausable/resumeable download manager, handles the file comparison and file log decryption, as well as a multitude of events to subscribe to so that you can display any information in any way you want to. Your only limitation with the client API is your limitation with C# or VisualBasic.

Quick note, these are pictures from an "older" build, I'm currently away from the program as I write this, I'll update the blog if any features have changed since the pictures were taken.

preziosidevelopment.com/wle/wleu/images/WLEUProjectPropertiesScreen001.png
This screenshot outlines your basic project properties. This information is saved for later use, as filling this thing in every time, while not many fields, could be annoying or leave room for typos.

preziosidevelopment.com/wle/wleu/images/WLEUUpdaterSettingsScreen001.png
On the "Updater Settings" screen things get a bit more interesting. We have an "Update URL" and a "Protocol" field, these set up where the updates will be downloaded from and what protocol to use for the download process. Currently HTML and FTP(S) are supported, but we're not going to go into that right now.

We also see a place for update notes, cause what would be an updater without update notes. Update notes can be embedded in one of 3 flavors, any variety of all 3 or not at all. Update notes can be embedded as HTML, XAML or exactly as written. We'll not get into the specifics of that right now either, but know that what you choose is dependent upon how you want to use the client API to display that data.

preziosidevelopment.com/wle/wleu/images/WLEUUpdaterSettingsScreen002.png
Now a quick shot of what you are missing in the previous "Updater Settings" screen. The only thing different that we will notice here is that we can see two new fields "Source Directory" and "Log Destination". These are pretty self explanatory, the source destination is the root folder that your project/game resides in and the log destination is where you want to save the encrypted log file to.

preziosidevelopment.com/wle/wleu/images/WLEUProjectSummaryScreen001.png
The last screen that is worth looking at is the "Project Summary" screen. The purpose of this screen is to give you a chance to check over the important fields, verify the information and press the magical "Generate Log" button.

When should we expect a release and what is planned for the next version?

A release will be coming soon after we finish a beta test on this package. The big question I'm sure is, "Is it going to cost money?" It sure is, we haven't nailed down a price yet, but expect it to be marked around $20-$25, this will more than likely be a 1 time buy, unlimited license deal, though do not quote me on that.

Yeah we are already planning a next version, as this is a solution we will be using for our upcoming game, Dawn of Ascension, the Updateinator will be getting constant improvements and feature implementations. Version 2.0 will include FTP upload for files that have changed since the last file log creation, file exclusion lists (currently you need to set your directory up and delete any files you do not want included). The client API demos will also be updated to showcase keeping multiple games/products up to date as well as allowing download mirrors and checking to see where the fastest updated files may be obtained from (this feature is mainly for those of you with multiple update locations).

Let me know if you have any questions/comments, I was in a rush to go home when I wrote this, so there's not telling how it came out.

#1
03/09/2012 (3:40 am)
Great read.

Have created something similar at work latelly - only as it's use is in-office only i skiped the security part and i use filezilla to get my files on the local server.

My update also accounts for self updates by downloading the new files with a temp extension (e.g. updater.exe.tmp) and the software itself checks for update existent by downloading a simple text file and comparing file versions with ones installed and checking for and renaming any tmp files on startup. Not perfect but works well for in-office only work.

Also - i think you mean 128 bit and not 128MB security encryption
#2
03/09/2012 (6:42 am)
@Luis
You are absolutely correct, I had something else on my brain. I've edited it in the blog above.

Sounds like we weren't the only one with this need.
#3
03/09/2012 (10:22 am)
Well my needs were a lot simpler than yours since i didn't have to worry about security or having that patch maker (or whatever you want to call it).

I just didn't want to have to go pc to pc everytime i fix a few bugs on any of the software i have my hands on to install the new version.

I just upload the new version to an ftp site and edit a text file placed online with the new version and let things take care of themselfes.

Great read though - auto updating software is something i spent some time researching back when i was setting that up and is a subject of interest to me