Part 4 of Learning how to build a game in C++

Anecdotally I understand Visual Studio to be the IDE of choice for C++ game development. I suppose that one of the historical reasons for this is that the PC gaming market seems to be solely focused on the Windows platform. More recently, the prevalence of Xbox has probably also contributed as its SDK is Windows based too.

In any case, I’d love an editor that I could potentially use cross platform and that rules Visual Studio out. So what are the other options?

  • Eclipse
  • XCode
  • Code::Blocks
  • A text editor
  • CLion

Eclipse

On the plus side, it’s cross platform, but I’ve made several attempts to use this over the years and have never got on well with it. That’s not necessarily a complaint about the IDE itself but the barrier to getting it working for a beginner seems unnecessarily high. Further to this, it doesn’t suppose CMake as a project format which would be a great feature, seeing as so many C/C++ projects use it.

XCode

I had a go at developing with this and it was really quite nice, but it suffers the same issues as Visual Studio - that is it’s limited to one platform. It also doesn’t support C++ refactoring which, although I understand it a complicated task, is annoying for a modern IDE.

Code::Blocks

Another cross platform IDE, but one with its own build system. I’ve no interest in that - I just want to use CMake. I can’t fairly comment on the features of this IDE because I only briefly tried it out on a Debian VM when getting Tetris working cross platform but I wasn’t blown away.

A text editor

Experienced C++ developers may favour a text editor like vim or emacs. I’ve no interest in improving my skill with either of those editors.

Sublime and Atom both offer language highlighting and plugins for C++ and CMake, but at the end of the day these are text editors and don’t provide features like code completion and analysis in any meaningful depth for a C++ project. I love both of these applications though, they’re just not suited to this task.

CLion

CLion is like the cowboy riding into town to shoot all the bad guys. The makers of CLion - Jetbrains - also make the Java/Scala IDE that I use day to day - IntelliJ. This might sound like I’m just favouring the tool that I’m used to. Perhaps there’s an element of that, but there’s a reason I chose IntelliJ as that tool - it is simply the best IDE I’ve ever used.

There isn’t one killer feature - it’s just lots and lots of really well thought out functionality sewn into one IDE - but one big selling point is that the first build configuration system that JetBrains supported out of the box is CMake!

CLion is currently in Early Access Program so there are issues because it’s early days, however it offers all the great code completion, debugging, generation and refactoring tools that I’ve come to expect as a result of using IntelliJ.

The fact that it’s cross platform, supports CMake and has a wealth of excellent development functionality makes CLion an obvious choice for my requirements.

Other posts in this series