C++ Is a Terrible First Language

Dev-C++ screenshot

In middle school, my dream was to make video games. I set off to study the dark arts of computer programming. Naturally, I chose to learn C++, the language the pros used. I would need the most powerful tools to build my AAA-level MMORPG. I would print tutorials from my parents’ computer, take them upstairs to my bedroom, and try to learn the language using my ancient Windows 95 PC and Dev-C++. My efforts ground to a halt when pointers were introduced. I only become a competent programmer years later when I was exposed to other languages like Java and Python.

Picking C++ was a mistake, but it is a common one you see newbies make all the time on game development forums. A newcomer’s first game is not going to be World of Warcraft; it is going to be Pong. You do not need the power of C++, and the language is a difficult one with several drawbacks for novices. Explaining why to newcomers is a challenge since they do not understand programming. Otherwise, they would not be newcomers. As such, I will try to give a few high-level reasons why C++ is difficult without going into any technical depth:

1. Verbosity Many programming languages like Python or Ruby have a simplistic syntax and are easy to read even for those with no programming experience. C++ is not like this. Java and C# are not concise languages either, but unlike those languages, C++ is repetitive. The language makes you feel like you have to write everything twice.

2. Manual memory management All software takes up computer memory to hold data. In many modern programming languages when that data is not being used any more, a garbage collector will automatically free that memory to be used again. On the other hand, C++ makes you manually acquire and release heap memory. This is necessary for high-performance games and is one of the main reasons C++ is still the lingua franca of game development today. However, that control just provides unnecessary complexity to newcomers who already have enough struggles to contend with.

3. Difficult APIs Once you acquire a solid understanding of a base language, the next step in making games is learning a graphics library or framework. C++ has several relatively easy options such as SDL and SFML. But if you are the type of person to pick C++ as your first language, low-level graphics APIs like DirectX or OpenGL probably seem appealing too. However, mastering those tools is even more difficult than C++.

These are just a few of the reasons why C++ is not a good choice for most new programmers. Fortunately over the last two decades, more newcomer-friendly game development options have become available. If you want to just make games, pick Unity. If you want to learn the basics of programming, start with Python and PyGame.

Despite my urgings though, many of you will still try to pick up C++. I made the same mistake myself. For many people, the reasoning is they want to be professional AAA game developers. Why waste your time learning something you will not use in the industry like PyGame when you could accelerate your growth by starting with the highest-level tools?

The problem is you have no idea what making video games entails. If you are like me, you wanted to make games because you liked playing them. Fortunately, I discovered I love programming, and hopefully, you will too. Everyone wants to be a New York Times bestselling author, but to get there you first have to enjoy writing sentences. If you want to program games, you have to get excited by making the words “Hello, World!” appear on your computer. 

Start with something easier that will give you a better foundation. Al Sweigart has some amazing books and courses to get you started with Python. But you probably will not listen to me. I know I wouldn’t have.

Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *