PDA

View Full Version : Self-updating game/demo


Bluddy
10-07-2011, 12:07 PM
A Valley Without Wind has a cool feature (common in many applications) that checks for updates from the main menu and allows you to click a button to download and install them automatically. The file is downloaded from within the game, at which point the game exits, calls the installer of the file, and then restarts the game (there's a check mark in the installer to start the game automatically).

This shouldn't be too hard to do, and it allows you to update the demo, which is basically your sales pitch, with the latest beta patch. The downside is that the demo needs to have all the assets from the main game -- essentially it IS the main game just without the license that removes the demo limitation. This removes a little bit of security, but I think is justified. Besides, hackers post hacked versions of the game regardless of what one does.

I think it's worth considering.

gornova
10-07-2011, 04:04 PM
I like self updating version for Soldak games. Shadow support at patch comes out at high rate, so this a good idea!

Shadow
10-07-2011, 04:54 PM
I've wanted to do auto updating for a long time. It's mostly just a matter of figuring out how to do it, which unfortunately is not trivial.

Bluddy
10-08-2011, 10:30 PM
I've wanted to do auto updating for a long time. It's mostly just a matter of figuring out how to do it, which unfortunately is not trivial.

Shouldn't be that hard... keep a file on your server containing the latest version and an md5, build libcurl into your executable, and just get info from that file, then download the latest patch file, check against the md5 and install.

BTW the patch installer on OSX requires superuser permission, which would be a problem for auto-updating. The game 'installer' is a dmg, so it doesn't require root access, but for some reason the patch installer does.

gornova
10-10-2011, 11:25 AM
auto-patching = auto patch also save files!

Shadow
10-10-2011, 01:47 PM
auto-patching = auto patch also save files!

I'm not sure what you mean by that. Are you worried about an auto patch and your saves no longer work?

Shadow
10-11-2011, 10:39 AM
Shouldn't be that hard... keep a file on your server containing the latest version and an md5, build libcurl into your executable, and just get info from that file, then download the latest patch file, check against the md5 and install.

That's the easy part. :) I think the hard part would be to get around all of the permissions stuff that is in all of the major OSs these days in a user friendly way.

Bluddy
10-11-2011, 10:52 AM
That's the easy part. :) I think the hard part would be to get around all of the permissions stuff that is in all of the major OSs these days in a user friendly way.

Firewall-wise that's not much of an issue since it's an outgoing connection. In OSX there's no permission problem if you just modify application files, which is what you're doing. The only problem might be Windows with its weird permissions. It doesn't like programs writing into \program files (mostly because of the messed up design windows has).

However, all you do from within the game is get a temporary folder and download the latest installer into it. You then quit the game and run the installer (at least this is how AVWW does it and I think it's smart) so if there are any permission problems, they'll come up as a prompt for the user to enter his credentials once the installer has started installing. So really, permissions shouldn't be an issue and you can even keep the OSX installer as is (though there's really no reason for it to require permissions as it currently does).

Arcen also built a nice little progress bar into their game updater so as it's downloading (probably with libcurl or something like that) you see the progress. So you can tell if something's wrong or if your connection is just slow.

And of course, from your perspective, you get to see how many people are playing the game, but even more importantly, how many are playing the demo.

gornova
10-15-2011, 06:03 AM
I'm not sure what you mean by that. Are you worried about an auto patch and your saves no longer work?

Yes, in particular for Beta period of Drox.

About permissions: just check online, download setup and ask permissions, you can't install something without any permissions.. or not?
For example with League of Legends at every start of the game just self-update without any permissions...

Anyway, it's a secondary point, a better and balanced game is more important

Shadow
10-17-2011, 10:39 AM
Yes, in particular for Beta period of Drox.

I've always managed to keep save games valid at least going forward. You can't always go back to an older version though.