Game Updates?

So i’m about a quarter of the way through development on my game at the moment and have been thinking ahead a little bit.

I have been constantly testing the game a lot, even in its infancy, and have realised that so many little changes need to be made as you go along, little tweaks here and there to balance the game out a bit.

Now I’m not really anywhere near the stage of “save as runtime”, but when I do, is it possible to still make modifications to the game when it has been released. It would be easy to create an installer for the game, if needed, I just cant get my head around if there is a way to perform updates.

Is it possible for the exe file itself to this sort of operation, or has any one had any experience with creating another executable that deals with updating the game/ launching the game etc…

From playing games, I have learnt that users are the best ‘de-buggers’ of games, finding glitches and bugs that the developers wouldnt think of. Having the ability to update my game is not essential, I just thought it would be nice to know if its possible or not.

Cheers

k

Preparing the game.

You won’t export your game all into a single exe ( that would be a big mistake).

You need to have a blend that only init the game levels,menu,etc.

You will store your levels into different encrypted blend files, with textures and sounds that would be loaded externaly. (This way the level .blend will have a smaller size)

Why this?
When you will be creating patches , you will just be updating the levels, and maybe texture/sound files.
Also, store your scrips externaly by using modules; this way you can easily edit them, without needing to open the level blend file that contains the scripts.

It would be easier to put the game files in separate data file directories and then create an application to patch the folder. This can be done using the automatic archive extractor feature in 7-zip. This will replace all the files specified in the game directory with the newer patched ones. You could even set up an update system in-game to check a database using python and mysql, and then to check what version the current game is, and if there is a newer version.

Thanks guys,

I am already seperating my data into different folders. I just get into a mess if I dont organise things a little. Thanks for letting me know thats its possible. Sounds a bit easier to do than I first expected it to be. Yep, setting up a database on the server to check versions sounds good, think I’m going to try and implement that when i get to that stage.

If anything, this is a good reason to continue keeping my files in folders and keeping them nicely organised and away from the actual blend file.

Thanks again

I suggest to use a file repository like cvs, svn or git. With that it is easier to track changes. This becomes very important after your first distribution.

From my experience I can tell it is very important to establish a well defined game structure (folder tree) as early as possible. Later changes result usually in a big mess.

If you keep your files small it is easier to update them. The updates will be quite small as you do not need to deliver that much redundant data.

I think he was also talking about DLC (Downloadable Content) for his game…

I wasnt really thinking about this. It was more code fixes/ collision bounds/ GUI tweaks etc…

I am miles away from being able to include DLC for games in blender. Need to get the core completed first. Has anyone managed DLC with a blender game? I’m sure that would require a lot of pre-planning and VERY clean file layouts. Honestly, I have never even considered DLC for my game. I have a habit of looking too far ahead and scaring myself away from a project, or conversely, exposing it too soon and loosing the “personal” factor of it.

When you update something in your game, you want your user to have the least amount of bother. Things like adding levels should be really simple.
For my game, the executable is a completely separate thing from the game data, and the executable runs a search for the data in it’s current directory. This means that I can release an executable for each operating system, while having the data being the same.

The easiest way for a user to update a game is simple to download all the files again, otherwise he had to download the initial version, and all the subsequent updates, so aside from the separation of executable and data, it is all in “one pack”
However, my game is rather sneaky, allowing, as MouseDroid said, DownloadableContent. Levels for my game are as simple as blend files with appropriate empties (to signal spawn-points etc) placed in the “Levels” subdirectory.
Levels can contain their own unique players or enemies as well meaning it can really expand the game.

On top of that all files that can be separated out are, the scripts are py files in a set directory, which means that I can edit them easily, and using a system like “dropbox” for beta versions, there isn’t a massive download each time I update something.

This all did take a lot of planning, but blender has a rather good API for this.
The libLoad functions are awesome, and when coupled with the function that gets a list of blend files in the current directory, you can search and load additional blends. (that’s how I do it for levels)

As Monster says, a good folder tree makes a lot of difference. I had to rebuild my game from the ground up because of bad initial planning.

If you want to see how I’ve done my game, have a look at the files on sourceforge. Grab the “data” package and run it from blender.

Thanks for the detailed reply sddgeoff. I definitely will take a look at the structure of your game, and play it. :slight_smile: Yea I took monsters advice and have really tried to get a good structure going with my files. When I was making mock up scenes and testing characters in different environments by linking in random things from all over the place. I quickly saw it was not going to work doing it this way, so have restructured it into, what I think, is a suitable way. But I am not going to continue until I take at look at your project.

I’m definitely going to make one file that deals with Searching through the directory for the blend files. Glad I now know these things, should hopefully make things a bit easier down the road.

Also thanks for linking to that document on linking Monster. That cleared up many things that were bugging me.

I will just drop this links here:

http://www.daemonology.net/bsdiff/

Some no0bs use them, like Google…

You might consider 0install. It’s cross-platform and handles automatic updates.

Has anyone managed DLC with a blender game?
Yes! That feature is currently being implemented in our game Wizzardz Online (still alpha).
Here’s the general idea:
-The server maintains dictionary of all .blend files in a certain folder along with their version number and MD5 sum
-When the client joins a match and it either 1. Doesn’t have the file, 2. has the wrong MD5, or 3. the wrong version number, the file is downloaded - overwriting the existing file if applicable.
You can also spawn the download in a new thread so users can monitor the progress.

The same philosophy applies if you want to make your own automatic updater.
But if you plan on supporting Windows you need to make sure open files don’t try to update themselves, because Windows™ will throw a sharing violation error.

For our updater we used Pygame and this gui from opengameart.org


The problem with that its if you change 1 Bit, its needs to download 3840923843934 Gigabytes of your game for all clients all times at the same time

(or what ever the entire game weights)

With 0install, yes. But when the game is ~50 MB, it really shouldn’t be an issue.
Especially when you consider that it’s easy to use for people without programming experience.

Using a custom updater can be pretty efficient assuming an appropriate design.
(External scripts, making use of libload to keep one file from getting too big)

Binary patching is a good thing, but it’s kind of excessive for us small-time blender users.
I can see where it would be worthwhile for a larger project though.