Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


Why does a gameplay programmer need to know C++?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
11 replies to this topic

#1 khecks   Members   -  Reputation: 102

Like
0Likes
Like

Posted 08 June 2013 - 07:32 PM

Sorry if this is a naive question, but I haven't been able to find much advise other than "Game programmers need to know C++!"

 

For the past year I've been working at a start-up using Unity 3D and C#. I'd like to move to a larger studio and have been looking to apply as a gameplay programmer at a few different companies. However, all the positions I've found require "strong knowledge of C++."

 

My question is, why do you need to know C++ as a gameplay programmer? Correct me if I'm wrong, but from the research I've done the most popular engines use some kind of scripting language for gameplay programming, like UDK (UnrealScript), CryEngine (Lua/FlowGraph), and Unity (which treats C#/UnityScript as scripting languages by compiling them behind the scenes). Low-level things like actual engine programming use C++, but that's not really what I'm interested in.

 

So why does a gameplay programmer need to know C++? I know many large companies write their own engines, but are they that different from the ones publicly available like UDK which uses a scripting language? Or am I just confused about what a gameplay programmer actually does?

 

Also, as an aside, if anyone has any advice for transitioning from an indie start-up to a large studio, especially when my only game development experience is with Unity, it would be greatly appreciated!



Sponsor:

#2 Dimension10   Members   -  Reputation: 123

Like
0Likes
Like

Posted 08 June 2013 - 09:43 PM

C++ may not be "required", but it's about as highly recommended as you get. Scripting languages have to run on top of some sort of interface, and that interface is usually programmed in a language like C++.

 

The point being: If you're a gameplay programmer, you'll probably be programming such interfaces, such as how UnrealScript translates to actual executable commands.

 

But if you know C#, C++ should be cake. The C languages are quite similar. And if a company is looking for C++ knowledge, I wouldn't count yourself out just because you only have C#. DirectX and OpenGL can use either.

 

But it would help you, overall, to get your feet wet in C++. Try the google channel "programminghelp.org". It's where I learned, and he's quite descriptive.



#3 Hodgman   Moderators   -  Reputation: 32049

Like
15Likes
Like

Posted 08 June 2013 - 10:09 PM

At the last big company I worked at, the primary gameplay language was Lua, but they won't hire anyone who doesn't have a good grasp on C and C++, for a few reasons.

There's tasks other than gameplay that ocassionally need doing by the gameplay team, e.g. Interaction wih external/online achievements/matchmaking/analytical APIs, data compilation tools, new bits of middleware etc... If everyone is somewhat of a generalist as well as being specialized in gameplay, then you'll always be able to get these other tasks done.

Mastering the dangerous tools that are C/C++ are a kind of rite of passage. They are such ugly languages that allow you to shoot yourself in the foot at every turn, that a competency in them implies a competency in the general ability to deal with complex systems. They also operate on a completely different level of abstraction than managed languages, allowing you to view RAM as a big bag of bits that you can manipulate, so a competency also implies a competency with basic computer architecture. Also, because they're so complex, it's much easier to trust a C++ programmer to start writing in Lua, C#, etc than vice versa. If a candidate isn't proficient with C++, then the range of tasks that you can trust them to complete without supervision is greatly diminished.

Even in the team I mentioned above where Lua is the main gameplay language, it's not the only gameplay language. If a bit of code is too slow, it may need to be converted to C++, or parallelized, or vectorized (SIMD'ed), or ported to the SPUs, etc, at which place they would use C++.
Also, the engine is C++, which is 'bound' to Lua; by understanding the engine AND the binding system (which are C++), you'll write better Lua code.

#4 0r0d   Members   -  Reputation: 819

Like
6Likes
Like

Posted 09 June 2013 - 05:09 AM

For the past year I've been working at a start-up using Unity 3D and C#. I'd like to move to a larger studio and have been looking to apply as a gameplay programmer at a few different companies. However, all the positions I've found require "strong knowledge of C++."

 

Simply, as you're finding out, most game companies use C/C++ for the engine, usually for all, most, or some of the gameplay code, and usually also for their tools.  If you're applying for a position that only requires C#, LUA, JavaScript, or whatever, then it's probably just a "scripting" position.  This might mean scripting UI, or AI behavior, or some gameplay... but they will still need others who can do C++ gameplay programming.

 

Even if the gameplay is mostly or all in script, many times hooks need to be written in the engine, or script converted to C++, or gameplay programmers need to be moved to do engine work, or tools work.  Also, many times there's not a clear separation between gameplay and engine... they can be very closely tied together if the "gameplay" code also requires you to interact with the rendering or physics systems, or something like that.

 

 

Also, as an aside, if anyone has any advice for transitioning from an indie start-up to a large studio, especially when my only game development experience is with Unity, it would be greatly appreciated!

 

1. Learn C++

2. Get good at C++

3. Learn how the hardware works (cpu, gpu, memory, etc)

4. 3D math... not necessary for all programming positions, but it's a huge boost to you if you're good at it

5. Pick a specialty and start learning... graphics, physics, UI, tools, AI, ...



#5 Rattenhirn   Crossbones+   -  Reputation: 1817

Like
3Likes
Like

Posted 09 June 2013 - 08:21 AM

A couple of comments:

 

Firstly, many companies or teams do not distinguish sharply between gameplay programmers and other programmers. The skillsets overlap too much to make that a useful distinction anyways. It's rather an affinity towards certain kinds of problems.

 

Secondly, scripting languages are usually only available for very specifc domains. Like the GUI, AI scripting or cutscenes. And they are supposed to be used by non-programmers. The reason you can script everything in engines like UDK and Unity is that they do not like giving out the source code or native APIs, making scripting pretty much the only option.

 

Thirdly, there's nothing wrong with knowing C++. I'd say, it's probably one of the most useful programming languages to know, even if you don't use it, as it gives a lot of insight into how programming languages do things and what the costs of certain features are.



#6 khecks   Members   -  Reputation: 102

Like
0Likes
Like

Posted 09 June 2013 - 10:15 PM

Thanks for your input everybody. It makes sense that a gameplay programmer should be able to work on other tasks like modifying the engine. I was surprised when positions for a gameplay programmer required experience in C++ but no scripting languages, but I supposed this is because if you know C++ you can likely pick up most other languages easily.

 

I actually used C++ throughout college but haven't used it for any sort of game development. I'm also rusty since I've only been using C# as of late. Would it be worth it to make a simple game with C++ using an engine/library that's more similar to what I might be expected to use at a professional studio? Maybe something like SFML or Ogre 3D. I'm worried that companies may not consider my experience in Unity relevant since it's likely quite different from the engines they use and focused more on high-level development.



#7 Geometrian   Crossbones+   -  Reputation: 1603

Like
0Likes
Like

Posted 09 June 2013 - 11:19 PM

But if you know C#, C++ should be cake. The C languages are quite similar.

No. C# may borrow some C syntax (just as many other languages also do), but C++ is chock-full of oddities that make it infinitely more difficult than C# (or Java, which is very similar). Not only does it have countless features neither C# nor C possess, C++ has protracted (but useful) initially nonintuitive behavior that is oriented towards expert programmers. Add to that C's low-level memory management, which C++ inherits, and different runtime mechanism, and it's a whole different game.

 

Mastering the dangerous tools that are C/C++ . . . implies a competency in the general ability to deal with complex systems. . . . a competency also implies a competency with basic computer architecture.

This. Many, including myself, will also add that knowledge of an assembly language is a further demonstration of competence.

 

But it would help you, overall, to get your feet wet in C++. Try the google channel "programminghelp.org". It's where I learned, and he's quite descriptive.

 

Would it be worth it to make a simple game with C++ using an engine/library that's more similar to what I might be expected to use at a professional studio?

I'll be honest. Fewer new games are written in C++ than in any other language. This is partly because C++ is less preferred, but more because C++ is a difficult language to program right. A game you write in C++ will likely end up less featureful, more fragile, and less profitable than the same game if written in any scripting language.

That said, the exercise of (re)learning C++ is worthwhile (for all the above reasons), and a simple game is a perfect way to start. If it were me, in addition to writing in C++, I would try to do as much implementation as possible without a library. This is make your task still harder, and likely the end product still worse, but you'll learn much more. If I were hiring, implementing a simple graphics layer around OpenGL is far more respectable than calling callbacks through Ogre. Und so weiter.


Edited by Geometrian, 09 June 2013 - 11:20 PM.

And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.

#8 0r0d   Members   -  Reputation: 819

Like
0Likes
Like

Posted 09 June 2013 - 11:20 PM

Would it be worth it to make a simple game with C++ using an engine/library that's more similar to what I might be expected to use at a professional studio? Maybe something like SFML or Ogre 3D. I'm worried that companies may not consider my experience in Unity relevant since it's likely quite different from the engines they use and focused more on high-level development.

I dont think that would be the best thing to do.  Making a game, even a simple one, involves a lot of things only one of which is knowledge of the language you're using.  If your goal is to get a job as a programmer in a game studio, then what you need is to work on your C++.  Your Unity and C# experience will be useful and should be an asset when you're applying for the job, but right now you'd be best advised to focus just on C++.

 

So, I'd try to find small projects to do that will allow you to brush up on your C++ and then improve on it.  Not entire game projects, but stuff where you're just solving specific narrowly-focused problems.  Maybe some math problem where you can work on different algorithms, memory management, and maybe even multi-threading.  Maybe a command-line tool of some sort... I dont know.  I'm thinking fairly small projects that would take about a week to complete.  This should give you a bunch of interesting stuff to work on, but wont waste your time learning APIs that you wont use in a game company (Ogre3D, SFML,..).



#9 Buster2000   Members   -  Reputation: 1782

Like
0Likes
Like

Posted 10 June 2013 - 01:50 AM

Some companies will expect their gameplay programmers to be cross skilled and be able to help out in the engine, tools or whatever.  Also some companies may have a full source licence to the engine.  I worked at a compoany using the Unreal engine and there was very little UnrealScript programming done.  The majority was in C.

 

 

Also one other thing to bear in mind is that C++ has become the "Latin" of the programming world.  Even at companies that use C# or some other languages they usually have as a plus in their job listings "Experience of C++".

I have even seen PHP jobs at companies that don't even have a line of C++ that still use programming tests written in C++.



#10 NightCreature83   Crossbones+   -  Reputation: 3038

Like
0Likes
Like

Posted 10 June 2013 - 01:52 AM

Thanks for your input everybody. It makes sense that a gameplay programmer should be able to work on other tasks like modifying the engine. I was surprised when positions for a gameplay programmer required experience in C++ but no scripting languages, but I supposed this is because if you know C++ you can likely pick up most other languages easily.

 

I actually used C++ throughout college but haven't used it for any sort of game development. I'm also rusty since I've only been using C# as of late. Would it be worth it to make a simple game with C++ using an engine/library that's more similar to what I might be expected to use at a professional studio? Maybe something like SFML or Ogre 3D. I'm worried that companies may not consider my experience in Unity relevant since it's likely quite different from the engines they use and focused more on high-level development.

 

Last job I worked at even the UI was completely written in C++, you just have to know it to work in the industry. It is less of a requirement when going into tools as most of that will be C# or Python or another managed language, but even there you will need to know a minimum of C++ as you have to interact with the game libs sometimes.

 

Experience with Unity counts as it is an engine and big code base you are working on, what it ultimately will come down to though is how well can you program and how well do you fit in to the team.

 

Also when restarting C++ focus on C++11 CLang lets you compile this with almost every feature of the specification implemented.
 


Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, Mad Max

#11 foxefde   Members   -  Reputation: 144

Like
0Likes
Like

Posted 10 June 2013 - 11:04 AM

It's the hardest language,a lot of risks in it,you must do everything perfectly.

Those languages,which born from C are the most popular nowadays ,like:java,C sharp etc.

 

And those languages are easier than C ,so if you know C/C++ ,you should easily learn other one.Don't company owners think like this?


Edited by foxefde, 10 June 2013 - 11:04 AM.


#12 NightCreature83   Crossbones+   -  Reputation: 3038

Like
0Likes
Like

Posted 10 June 2013 - 01:56 PM

It's the hardest language,a lot of risks in it,you must do everything perfectly.
Those languages,which born from C are the most popular nowadays ,like:java,C sharp etc.
 
And those languages are easier than C ,so if you know C/C++ ,you should easily learn other one.Don't company owners think like this?

They do to an extend however if they are interviewing you for a C# position and you have no experience in C# but have in C++. And the other candidate has experience in C# and not in C++ they will most likely pick the other guy.

A friend of mine learned C# on the job in between two projects and that is more on how they will allow you to learn on the job. Bloody brilliantly usefull tool he wroth as well, which takes the debug output and parses it in to channels like based on some regexs, very usefull if you are only interested in one log channel.

I learned WPF this way at the job writing a action map editor, I luckily already knew C#.
Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, Mad Max




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS