Setting Up a Cross-platform Game Development Environment


Mercurial

Next we need a way to manage the revisions we make to our programs. You may be thinking that you don’t need revision control because you are just one person and you can keep track of everything by yourself. That’s true as long as your program doesn’t get too big or go through many changes, but successful programs tend to get large. And over time they change in ways you may not expect. You might even find yourself deciding that you’d like to roll back a large change that you made – perhaps a wonderful new scene manager you were implementing turned out not to be so wonderful after all. And of course, if you ever start having other people working on the project, a way to coordinate changes becomes a must.

Revision control to the rescue! And the easiest one I’ve encountered so far is Mercurial. I’ve tried cvs and svn, and looked at git, and those all have their place, but Mercurial is the one that I’ve found to be most intuitive and unobtrusive. The commands are easy to understand and easy to use. It even comes with a way to create a web-based repository browser with a single command. Simply run “hg serve” from the main repository directory and you instantly get a website providing access to your code. How much easier could it be?

Installation:

Fedora

From the command line as root, run

$ yum install mercurial

Ubuntu

From the command line, run

$ sudo apt-get install mercurial

Windows

Mercurials installer has no options to worry about. There are, however, two versions for you to consider. The official version and the TortoiseHG version. TortoiseHG includes the official command line tools as well as providing integration into the Windows Explorer graphical shell, so this is the one you really want to get. Simply download and run the installer file for TortoiseHG and you will be ready.

2 Comments

  1. Wow, awesome timing. You’ve published this and your later article on CMake as I’m embarking on this very task. Thanks for the articles!

    • You’re welcome. I hope the information is useful. I’ve never written for others before, and I’m still learning this stuff myself, so I’m not sure if I’m really presenting things in a way that others can use. I’m trying, though.

      My next major post is probably going to be presenting a sample program that is a Mandelbrot set viewer. It’s not a game, of course, but it demonstrates using SDL. Benoit Mandelbrot died this past week, so I was inspired to create it in honor of his work.

Comments are closed.