The Joyride Labs no longer actively work on this project. A lot of the information on this website is outdated. See this blog post to find out more.
Nikki and the Robots

Here we write about Nikki and the Robots development and other news. Be sure to subscribe! Visit our reddit forum and join IRC for even more info!

Auto Updates

WARNING: This is a development post. So if you're not into programming, you might find it pretty boring...
 
We want to have an auto updater for our game "Nikki and the Robots". This updater will do the following things when you start the game:
  1. It will look if there is a newer version of the game available online. If yes, it will:
  2. Download the new version.
  3. Install it.
  4. Restart the game.
One rather funny problem I ran into was this: When I was done writing the basic procedure, I wanted to test and debug it. I created a testing repository containing the then current game with an artificially increased version number, to convince the updater to actually update the game. When testing the updater, I had to fix some quirks. After some testing and debugging, I got an error message, that I couldn't quite explain. I wasn't even sure, where it was raised. I tinkered around a lot, I even tried using the (often invaluable) "-xc" option (after manually chasing all the cabal dependencies that were installed without profiling support), just to find out, what part of the code was raising the error, without success. I started to feel, that I was missing something important. After some time, I realized what that was. The updater was already working correctly: It downloaded the version from the server, installed it and restarted the game. The version from the server, however, was an older version, that raised an error, which was, of course, impossible to find in the newer code.
 
Sometimes, I feel stupid.
 
(Of course, players will be able to disable the auto updater. Right now, this works with a command line option, but future releases will ask through the GUI before downloading anything.)

Tags: , , ,

Leave a Reply