Is the single best language for a career in game programming C++?

Lots of good advice on the thread. I’ll add:

For starting out in game programming, I recommend the Godot game engine. It uses it’s own GDscript which is similar enough to Python to be useful to learn. It includes a large library of game functionality, an ecosystem, tools for art and assets. The documentation is great and there are getting started tutorials.

Ultimately I wouldn’t worry too much about choice of languages, framework, SDK. Whatever you pick might not apply to the jobs you find. The best language and engine are the ones you will follow through on and get over the initial learning curve. After that you can adapt up anything.

As @engineer_comp_geek said, it’s a tough career path and IME pays less.

Of course, another option is to just stay independent, and make and sell your own games, and not worry about anyone hiring you. Running your own business is tough, and it’s definitely not for everyone, but it’s probably easier than it’s ever been in this era, due to Steam for distribution and a bunch of free engines and toolkits available. Some of my favorite games from the past decade were created by basically one-man teams (sometimes with a little help from one or two other people for things like background music). For a lot of these games, the assets are ludicrously simple, like something a child would draw in MS Paint, but as long as the gameplay is good enough, that’s OK.

My contribution here would be to say, if you’re a newbie, don’t learn a language with a specific career role in mind. Learn a language to learn how to learn a language. Learn a language to achieve some basic task that you’d like to automate. Or learn a language with some specific learning goal in mind. Even if it doesn’t turn out to be your productive career language, knowledge of the differences will make you a better programmer all around.

With that said, if you have no goal in mind other than to get started, I would suggest starting out in C. Some have said it’s like a tour through the history of programming. You’ll find that many languages actually have C bindings under the hood, and you’ll learn what those languages do for you that C doesn’t, and where those conveniences can become limitations or bloat. The goal wouldn’t be to become an expert C programmer, rather just to gain basic competence. It would be analogous to learning the piano before learning other musical instruments. Many people don’t, but for those who do, it’s an incredibly helpful foundation.

So pick up a few. In addition to C, try Python, as currently it’s seen as an all-around “golden hammer” that you can use for many kinds of problems. I’m using it for some ML work right now. Likewise JavaScript is ubiquitous, and you can actually do some productive browser-side stuff in it, like maybe custom browser plugins. And just for fun maybe take a spin through Lua, which is a scripting language used in many games for tasks that don’t need the power of C++.

^ the above, especially the first paragraph. I spent 40+ years avoiding honest work in IT, and one of the most essential qualities I’ve discovered in good developers is the ability to be a “computer whisperer” — that is, to be able to look at a problem or process, not as a human would, but as a computer would*. If one has that, specific language or syntax, while not irrelevant, is secondary.

At one point I taught Introduction to Computers at a local technical college, and when it came to the section on programming I started out by asking the class “What’s two plus two?” Except for an occasional wiseacre, the answer was inevitably “four.” “How did you get that answer? Did you have to count on your fingers?” “No, I just know it.” “Well, guess what? The computer doesn’t know it. You learned through repetition to the point that the answer is pretty much instinctive; but the computer doesn’t have that instinct, so every time you ask, it has to run the calculation again.” Granted that’s an oversimplification, and becoming a tad obsolete in the age of AI and heuristics; the point, however, is that humans use a lot of mental shortcuts which aren’t available to the computer, and programming requires breaking them down into discrete steps that the computer can process to get the desired result.

EXIT HIJACK AND RETURN TO MAIN DISCUSSION

* Yes, I’m anthropomorphizing the computer. But it’s simply for illustrative purposes.

Yes, I used to compare programming to playing Lemmings; doing something useful based on just stacking “dumb” commands. And since then there have been games that are pretty much directly this premise, like 7 billion humans.

But yeah, ISTM quite different to coding these days. On complex projects like modern games, most people necessarily need to be working at quite a high level of abstraction a lot of the time. Not saying this is bad or good, just a difference.

The folks I know moving over to Rust love it absolutely. If my narrow sample is meaningful, I suspect it’ll find its way to being more common in game programming soon.

My take is that the kind of thinking that Rust requires is the same kind of thinking that a good modern C++ programmer is going to do, but the compiler is not going to enforce. I.e., “here is some data. Who owns the data? Do I have permission to modify it or just read it?”.

But most of the teams I see adopting Rust are transitioning from languages other than C++, looking to get baremetal performance with less risk. Fighting with the borrow checker is a pain, but when you’re done with it, you have good evidence that you don’t have any glaring memory issues (provided you have’t loaded up on trust_me_brounsafe blocks :slight_smile: ).

At least up until a few years ago, it seemed to be all the rage with the blockchain bros.

IMHO, as another programmer (though not in games), I have similar thoughts to what @griffin1977 and @engineer_comp_geek said: If you’re just starting out and trying your hand at it, consider learning an engine instead of a language.

If you want a job in the industry, like in an existing, established company instead of being an indie dev, then chances are you’ll be using someone else’s engine anyway, not writing your own.

The big two are Unity and Unreal, and both are free for individuals (and very cheap/royalty-based for small indie devs) and have tons of examples, tutorials, and demo projects you can learn from. There are also some smaller ones like Godot (which saw a surge in popularity a few years back after a Unity pricing scandal), or simpler ones for the web like PixiJS and Phaser.

The thing is that game dev has come along way since the 80s and 90s, when “garage coder” was the norm (the book Jordan Mechner - The Making of Prince of Persia was a fun read about those days). These days everything is hyper-specialized and hyper-complicated and your average game team is bigger than a Hollywood blockbuster would have. Game dev is probably the hardest, most complicated kind of entertainment society makes nowadays, and it’s several orders of magnitude more complex than writing generic web and office apps.

At this level, you’re not just programming in a particular single language — any language. The engines encompass decades of research and work in game logic code, yes, but also graphics and shaders (a specialization unto itself), in-engine scripting systems, sound, physics, quest and dialogue trees, artificial intelligence, pathfinding, weapons, netcode, anti-cheat, level design, etc. There is “programming” in all of those aspects, but it’s almost never one single programmer writing exclusively in one language, but a big team of specialists.

The life of a shader programmer would be quite different from somebody writes quests or does character animations for a living, for example, which are again all different from a small team making an indie game.

If you learned C++ without the context of how it’s used in these engines, you’ll just be learning really primitive building blocks, the kind of thing people used to write by hand two decades ago but don’t usually do anymore. That’s great if you want to write your own engine, but if you imagine your passion to be “making a game” and not “making the software that people use to make games”, then the engines are what you want to learn and work with, not the raw code. It’s the difference between being a writer and being a word processor programmer.

Some indie devs do start out in the commercial industry, learning their ropes and networking and getting familiarized with the tooling etc. before starting their own small project and team. And there are occasionally people like the Dwarf Fortress brothers or the Tiny Glade duo who do it all from scratch as a multi-year passion project, but those are very much the exceptions. Most games aren’t made like that.

Starting from an engine (especially a big one like Unreal or Unity) will let you dip your toes into the various parts of game dev, and from there you can branch out or specialize further as you like. But I think that’d be a better starting point than learning C++ or C# by itself. You’ll naturally pick up one or the other anyway if you choose Unreal (C++) or Unity (C#), alongside their own in-engine scripting methods.

I had a copy of the game Fable, and after I beat it, it ran the credits. I was curious and let them run all the way through. It took literally 40 minutes.

Though in that case, that amount of time and effort from that many people could have been much more profitably used to create, well, almost any other sort of entertainment.

But while the big teams are bigger than ever, there is still room nowadays for the indies.

Yeah, and Fable’s probably considered a small game by today’s standards! Fable 3 has upwards has 600 people working on it (I chose Fable 3 because the first game looks like it has incomplete credits on that site). By contrast, something like Baldur’s Gate 3 took nearly 3000 people, GTA V nearly 5000, Fortnite nearly 6000, etc. And video game budgets can approach a billion dollars these days.

Those are the AAA games, though. Arc Raiders had “only” 600 people, Expedition 33 had 400, Silksong 100. Small teams still can and do make great games.

Absolutely… and thankfully! Many of the recent gems were from smaller AA teams or tiny indie devs, sometimes even solo or duo. The big games have mostly devolved into sequel-itis or gambling cosmetics with very little innovation in gameplay or design, just slightly more realistic graphics than last year. The big commercial industry is kinda imploding and collapsing on itself right now anyway, with layoffs galore and rampant cancellations.

I don’t think I’ll miss them much, though I do hope their staff land on their feet (an increasingly difficult thing to do in today’s economy). I hope some of them will start their own small indie outfits too, maybe hiring @Nublette in the future!

Squirrel with a Gun has 129 names in the credits but probably two-thirds of them are general company staff (executives, administrative and technical support, managers of departments like marketing and social media, etc) or individual musicians who played on the soundtrack, and of the remaining third more than half are QA. The actual list of designers and programmers who are directly responsible for building the game looks to be maybe 20-30 people tops. The game itself has a sloppy, crude aesthetic, but that’s part of its charm. My kids and I laugh ourselves silly while playing.

And (to pick three that I’ve enjoyed) Streets of Rogue, Baba is You, and Stardew Valley each had at most one person who could be called a “programmer”, plus possibly a handful of others who made assets like music, graphics, or level design (and Stardew Valley didn’t even seem to have any of that).

Now, I imagine that for every successful one-programmer games, there are a thousand more that nobody has ever heard of. Some of those have probably transitioned into the world of big corporate developers, while others have kept it as a mere hobby, or given up on it entirely. “I’m going to make solo games for a living” is not a reliable life plan (though it’s probably better than “I’m going to play pro sports” or “I’m going to become a rap star”). Heck, you could technically put me in that category: I’ve made one or two working games on my own, that I’ve never made a cent on, nor expected to (one was a virtual Rubik’s Cube, and the other was a Connect-4 game with a not-completely-pathetic AI).

In the future I think people may be shocked to learn that open-world games existed prior to generative AI. That people could model, animate, script and write absolutely everything “by hand”.

(And yes, I am aware that things like procedural assets have existed since day 1 of game development, of course by “generative AI” I mean the modern flavor)

Stardew Valley gets a chapter all on its own in the book I mentioned above, and, yeah, there was just one guy, for years and years and years. Dedication and faith combined with absolute misery. Sounds like video game development! :laughing:

Interesting the number of programmers. I worked a at a very large software company. The program I worked on was mostly in maintenance mode, but it did provide the company with nontrivial income, and some of the customers were companies and organizations you would recognize.
For this program, there were 4 programmers in my subunit, and maybe 12-20 total.
(I was technically part of another subunit with 4 or 5 programmers, but did almost no work I for that piece of software)
It did intact with another piece of software (that we would have to maintain compatibility with) but I do not know how many worked on that.
I did a LOT of miscellaneous pieces of functionality - when I was laid off it took 5* people to replace my tasks – note that none of the tasks were full time but I still find it funny. Since the program was in maintenance mode, only when customers had issues** or we had to verify our stuff worked with third party updates.

Brian
* Trying to remember how many folks I had to train
** Usually the Wednesday before Thanksgiving or December 23 :wink: