Sign in to follow this  
Exorph

Keeping track of the version

Recommended Posts

This has always been a bit unclear to me. What's the best way to keep track of which version of the game you're working on? Is there some way of doing it automatically, or do you have to change it manually? Do you change the version every time you change the code or build the game or only when you've made changes that actually matter?

My project is growing, and this is starting to feel like it'll be important soon.

Share this post


Link to post
Share on other sites
We used SVN at school, which I'll probably start using for my own project soon, but I'm unsure how it helps keeping track of the current version in the way I mean, which is more in-game related than project related. Say I want to check the version on my save files agains the version of my game, or just display the current version in the main menu. How do I get that info from SVN into my game?
Maybe Git and Mercurial have functionality for that which SVN doesn't have?

Share this post


Link to post
Share on other sites
With Subversion, there is a kind of "macro" that expands to the current revision. This will be expanded automatically by subversion. However, this probably isn't what you want. If you fix a minor bug in the map loading/saving you don't necessarily want to call this a new "verison".

Instead, you'll probably want to build in versioning into your map format. So you might have a version field, which is incremented when you make breaking changes to the map loading/unloading. If you write a set of test scripts (which you might automate as part of integration tests depending on your setup) which build the current version of the game and try load all current maps into it (you may need to produce an extra executable or a command line flag on your game to support such a mode) you can get "early warning" if you've broken any existing maps.

In general though, determining if you've made a breaking change is a manual process. For example, the existing maps might not be using a particular feature of the map format, so you cannot rely on them loading successfully to know that all possible version N-1 maps will load.

If you want, you could to make a converter that loads map version N - 1 and saves version N. If you maintain all the map converter executables between breaking versions in your source control, you should be able to at any time take an early map and migrate it by running successive converters up to the current version.

Share this post


Link to post
Share on other sites
SVN keeps track of revision numbers that is updated for every update made. To me this has very little to do with the version number of the game. What is important is that the version number is different for each official release of the game so that the users can see that this is a newer version than the last one. If you use a date versioning scheme you might be able to have the version number updated automatically but my guess is that it's much easier to handle it manually.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this