C++ for Gaming Industry

Started by
19 comments, last by GameDev.net 11 years, 1 month ago

Hi guys.

I'd like to pose a question for people who've been around for a while. I decided to guide my studies checking hiring requirements of gaming companies. When I didn't know whether to go with C++, Java, Unity or the HTML5 Stack (HTML5, CSS3 and JavaScript), I checked job offers and noticed the most promising ones were C++-related. So I'm going with C++.

The thing is: what do they mean with "C++"? Core? Is there something intrinsic to that sentence, like OpenGL, SDL, SFML (which seems to be built on top of OpenGL), ...? I'm currently studying SFML, but I have no idea if it's industry-accepted, so I just might be wasting my time. So, I ask: should I direct my studies to something specific, or all that is needed is core C++...?

Thanks everyone =]

Advertisement

I doubt that SFML is particularly widely used in the games industry since most companies will either buy or develop an engine with cross-platform functionality that includes consoles/mobiles, etc. That's not a negative though, use SFML or SDL for your demos and experiments so you can get on with the interesting stuff instead of messing around with awkward platform functionality.

That said a familiarity with OpenGL and/or Direct3D will probably be considered a plus from a new hire. Looking briefly at SFML it seems you can choose to use their abstracted 2D graphics calls, or just use SFML to handle the windowing and use OpenGL calls direct. I'd recommend you do the latter.

What C0lumbo said. SFML or SDL are not industry relevant tech in themselves, but they get you up to speed a ton faster than building everything yourself from the ground up. When you have something (anything) that is a working whole, you can then iterate on it and add more tech.

If you aim at a graphics programmer position, you'll eventually need to know intimately how to output stuff with OpenGL or Direct3D. But even then there's no need to start there. For instance, building stuff like proper collision and physics will teach you a lot of math and algorithms you'll also need for high-end graphics.

Where are you starting from in terms of skills and experience? What (live) programming education do you have access to?

What they mean is that you know C++ so well that you can tackle any problem with the language and understand what the performance impact of that solution is. So use reference passing instead of by value for large objects, but also what functions are called when you assign a new object to a variable.

Knowing additional API's is helpful as well, the ability to know how to program and use C++ however is far more appreciated then knowing one particular API, unless the job advert asks for it of course. What we want is a programmer that can be productive nearly immediately from the day he starts, of course you will have to learn how to use the codebase but we will not teach you how to use C++ at the same time though.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion

I would think core is referring to the most commonly used libraries and understanding the language itself. So that would be operator overloading, pointers, memory management techniques, by reference, value, pointer, const correctness, functors, stl, OpenGL, DirectX, multi-threading including semaphores and critical sections, IO (files and sockets), OO, etc. The list I am sure is much longer. Make your own game and then to have a good idea of the kinds of things needed to program a game you might want to look at some open source projects code such as irrlicht and make sure you pay attention to the details. For instance, pay attention the constructors. what does it mean to have MyClass(MyClass& aClass); as a constructor.



to have a good idea of the kinds of things needed to program a game you might want to look at some open source projects code such as irrlicht

Only if you are looking at it for the humour value.

There is very little code in IrrLicht (and the same goes for many similar projects) of a quality to exist in a production codebase.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

For instance, pay attention the constructors. what does it mean to have MyClass(MyClass& aClass); as a constructor.

If this is an unfamiliar construct for someone, I think they need to finish their beginners' C++ book instead of digging through open-source game engine code. (And why no const? Looks likely to be a design error... smile.png)

the ability to know how to program and use C++ however is far more appreciated then knowing one particular API, unless the job advert asks for it of course. What we want is a programmer that can be productive nearly immediately from the day he starts, of course you will have to learn how to use the codebase but we will not teach you how to use C++ at the same time though.

I really want to emphasize this. It doesn't matter what language you're playing with at home, or what APIs you're learning. You're not going into a job knowing enough to do anything. Even if you've got all of OpenGL's API memorized, it still can be used in a multitude of ways, and every team will have their own encapsulation layer ontop of it so that everyone can think in "Animated Art Asset" instead of VBOs and whatnot.

Learn to program. Learn the concepts. Learn how to look things up. Don't waste your time memorizing the complete syntax of a language and all the API functions it provides. If you know what a hash-map is, you can Google for the canonical implementation API for any language out there, and most IDEs will then fill you in on what the exact functions it provides are.


to have a good idea of the kinds of things needed to program a game you might want to look at some open source projects code such as irrlicht

Only if you are looking at it for the humour value.

There is very little code in IrrLicht (and the same goes for many similar projects) of a quality to exist in a production codebase.


could be. (just writing in general, not actually seen the code for Irrlicht)

I have before made the observation that in many cases, the smaller and more narrowly defined the scope is for a project, often the worse the code is (on average).

granted, I have seen a few exceptions here (a few large projects with some fairly nasty code, and a few small libraries with reasonably clean code). I hesitate to get more specific, as it is possible that code quality/cleanliness is largely a matter of personal or community taste.

some people claim it should be the other around (say, smaller projects being cleaner due to the developers being able to focus more polishing effort on a lot less code, vs developers being spread more thin for a larger project), but this doesn't really seem to match my general experience (at least for the sorts of codebases I have seen).

It doesn't have much to do with the size of the codebase - it's a matter of the experience and calibre of the developers involved.

Did they establish a coding style? Did they establish a testing methodology? Did they provide adequate documentation? Have they performed profile-guided optimisation? Did they produce a comprehensive threat model?

These may not be the fun parts of 'programming', but when a company advertises a position for a 'C++ developer', they are looking for all of the above.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement