Setting Up a Cross-platform Game Development Environment


Finally we come to the editor. I’ve saved this for last because the choice of editor is so personal for many people. There are lots of excellent editors you can use that will do just fine, and many people are partial to some specific editor.

My own favorite is Emacs and I highly recommend that everyone give it a try if you haven’t already done so. Most people probably won’t, and that’s fine, but here is why I like Emacs:

Emacs is extensible.

Emacs itself is essentially a Lisp interpreter that runs a variant of Lisp called, strangely enough, Emacs Lisp. The vast majority of the visible functionality is implemented as ELisp extensions loaded at run-time. Over the years lots of people have written ELisp packages that do everything you can imagine: color syntax highlighting of source code; interfacing with revision control systems; running debuggers from within Emacs; reading email; browsing the Web; playing games. It has been said that Emacs is actually a complete operating system cleverly disguised as a text editor. As a result, it makes a strong IDE in it’s own right.

The programability also lets you write your own customizations. My .emacs startup file has lots of little functions I’ve written, such as one that splits emacs into multiple editing windows in my preferred arrangement. I normally use this mode writing code and I’ll have headers files in the right windows and other code files in the left windows.

Emacs supports foreign languages, and not just European ones. Asian languages are fully supported and you can, for example, easily mix English, Japanese, and other languages all in one file. See here for an example, as well as a general tour of Emacs features.

But beware! Emacs was first created in the early 80’s and it’s user interface was designed both before the dominance of graphical interfaces, and before the standardization of keyboard commands. As a result, it can be very intimidating to new users. It does have menus and a toolbar just like any modern program, but it’s real power lies in the keyboard commands available for it, and they are not intuitive. For example, do you see the signature I use? “ctrl-x ctrl-s”? That’s how you save a file in Emacs. You can click on File->Save in the menu, but it’s a lot faster to simply use the traditional keyboard command “control-X control-S”.

Also, while Emacs is a powerful IDE, the purpose built IDEs like Code::Blocks and Visual Studio usually beat it some ways simply because they are designed from the ground up for development, while Emacs is a text editor with a general purpose extension mechanism.

If you want to learn more about Emacs, first read the Emacs tour article linked above, and then try Emacs Wiki. The Emacs Manual is available online, and is also distributed as part of Emacs itself.



From the command line as root

$ yum install emacs


From the command line, run

$ sudo apt-get install emacs


The Windows version can be downloaded from here. The latest version is in the file. Unzip that to your Program Files directory. Once you’ve done that, find the file C:\Program Files\emacs-23.2\bin\runemacs.exe, create a shortcut to it, and put that shortcut on your desktop or in your Start Menu as you choose.

Now you should right-click on the runemacs icon, select Properties, and change the “Start In” directory to something convenient, such as your My Documents folder.


  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.