in Game Development, Programming

I Hate C++

Since I was in middle school, I wanted to make video games. Though I had been passionate about games for years, how they came about was a complete mystery, and creating my own seemed incomprehensible.

Then I discovered I poured over their articles and decided to learn how to program. Like all foolish novices, C++ was the only option I considered. The pros used it, and I was an overconfident seventh grader who was a self-styled genius. I would print out tutorials from and, take them upstairs to my ancient Windows 95 computer, and attempt to learn the language using the Dev-C++ compiler.

Naturally, I failed spectacularly. I gave up sometime around when pointers were introduced. Defeated, I gave up on programming all together. Years later, I would finally gain some amateur programming skills but only after being exposed to languages like Python and Java.

Recently though, I had been watching an episode of How I Met Your Mother. The words of Ted Mosby cut me deep:

Unfinished. Gaudí, to his credit, never gave up on his dream. But that’s not usually how it goes. Usually it isn’t a speeding bus that keeps the brown, pointy, weird church from getting built. Most of the time it’s just too difficult, too expensive, too scary. It’s only once you’ve stopped that you realize how hard it is to start again, so you force yourself not to want it. But it’s always there. And until you finish it, it will always be…

I was going to try to learn C++ again. This past week I have been on vacation and spent most of it devouring two books on C++: Beginning C++ Through Game Programming and SFML Game Development. Both books are well written and informative. For anyone wanting to learn C++ game development, even if you have no programming experience, pick up those two books, and you will be able to create your own video game by the end.

For me though, the problem I discovered was that I hate C++. There are multiple reasons why I dislike the language:

1. Manual memory management Not having a garbage collector makes programming a lot more complicated. Keeping track of heap memory and deallocating resources manually is extra work.

2. Header files Java is a verbose language, but C++ feels no more compact when you have to write both function declarations and prototypes.

3. Error messages Programming language error messages are never concise nor easy to understand, but C++ compilers seem to supply the most complicated ones.

There are other reasons I do not like C++, but already, experienced C++ programmers reading this post may be screaming at me, “Learn to code!” And they would not be wrong. There is only one true reason why I do not like C++: I am not used to the language. Given enough time, I would eventually grow to master C++ and would instead complain about other programming languages. I only have respect for C++ experts, and I do not want to bash their language of choice because of my own shortcomings.

C++ has a lot of great advantages, the biggest of which is its speed. The reason C++ is the lingua franca of the video game industry is because memory management and hardware control are necessary for AAA projects.

But I do not want to make AAA games. I want my games to be personal and smaller in scope. Those sorts of projects can be made with Java and LibGDX. My aspiration is to make games, not learn C++.

If you are a novice wanting to learn to make games, I would not suggest C++. The language is far too complicated, and you can start making games a lot faster via other routes. Try Python. Maybe one day you will need to pick up C++, but that day is not today.

On the other hand if you are already a C++ pro, then stick with that language. Tools are your own personal choice. Just make good art.

Write a Comment