• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Greatlayen

Why companies still use C++ and what should I learn then

46 posts in this topic

Hi guys! I was reading what usually companies ask to applicants and it seems that I want to work for let's say Riot or Blizzard or such companies I should know C++ (for Web jobs, php).
But I've looked for topics where members ask what to study first and you usually let is start with C#.
So, my question is:
Knowing the requirements usually include C++, should I really begin with C#?
0

Share this post


Link to post
Share on other sites

But I've looked for topics where members ask what to study first and you usually let is start with C#.

I'd say Python comes up even more often than C#, and for good reason.

 

Anyway, the consensus from academic circles (read: people who are tasked with teaching hundreds of students to program, year after year) is veering towards this: starting with a language that is overly complex, incoherent, low on expressive power or otherwise user-hostile means you are wasting your time. My gut feeling is that it's even more true if you are trying to learn on your own. Everywhere people are opting for Python, Scala, etc. when choosing languages for introductory programming courses.

 

I recall one particular experiment where a school carried out their two initial programming courses in two groups. The first group used Scheme for the first course. It is an excellent learning language that looks nothing like languages common in production use. The second group used Java. Both groups took the second course, whose subject was object-oriented programming, in Java. Even on such a limited timescale, the end result was that the students of the first group were better at programming in Java at the end of the second course. One can only imagine how much better they grasped programming in general. Also note that Java, while clunky and lacking expressivity, is much more forgiving than C++ is.

Edited by Yrjö P.
1

Share this post


Link to post
Share on other sites

Here's another point to consider. These days, a lot of tool development at some major studios in done with C#. So not only is it a great place to start learning to program, it can potentially have practical applications later on down the line if you ever get hired by a game shop.

0

Share this post


Link to post
Share on other sites

 

But I've looked for topics where members ask what to study first and you usually let is start with C#.

I'd say Python comes up even more often than C#, and for good reason.

 

Anyway, the consensus from academic circles (read: people who are tasked with teaching hundreds of students to program, year after year) is veering towards this: starting with a language that is overly complex, incoherent, low on expressive power or otherwise user-hostile means you are wasting your time. My gut feeling is that it's even more true if you are trying to learn on your own. Everywhere people are opting for Python, Scala, etc. when choosing languages for introductory programming courses.

 

I recall one particular experiment where a school carried out their two initial programming courses in two groups. The first group used Scheme for the first course. It is an excellent learning language that looks nothing like languages common in production use. The second group used Java. Both groups took the second course, whose subject was object-oriented programming, in Java. Even on such a limited timescale, the end result was that the students of the first group were better at programming in Java at the end of the second course. One can only imagine how much better they grasped programming in general. Also note that Java, while clunky and lacking expressivity, is much more forgiving than C++ is.

 

If you wish to learn C++ in the end stay away from Python, Java and C# are your better options to start with as a lot of the syntax will be the same. Not having to learn a new syntax in your second langauge is really useful as you are focusing more on learning the particulars of the language instead of feeling like starting over. Having to pick up a new syntax becomes easier when you are more comfortable in constructing non trivial coding solutions and algorithms.

 

I started out with Pascal -> Delphi and then transitioned through C# and Jave to C++, moving away from Pascal/Delphi at the time wasn't really easy as I wasn't that good at coding yet and meant I had to learn a whole new language effectively.

Edited by NightCreature83
1

Share this post


Link to post
Share on other sites
I started straight into C, then C++, then assembly and did fine.
Many game industry veterans also started with assembly because that's all there was at the time and did fine too.

It's more important the amount of dedication and passion you put into it.

Now I know C, C++, C#, PHP, CSS, asm, HLSL, Cg, HTML, Lua, & Python.

To be honest, after I was fluent in C++; the next languages I learned (HLSL, Cg, Lua, Python, HTML & PHP & CSS, C# in that order) looked unbelievable easy and got them in less than 10 days.
Coming from a low level background let me figure what was happening behind the scenes on the higher level ones (and sometimes you get pissed on the documentation for not telling what kind of algorithm a particular construct uses internally).
Eventually you end up learning how to develop, rather than learning languages.
1

Share this post


Link to post
Share on other sites

Hi! I am the same opinion. At university I started with C, then with Assembly, then Java.  C++ and C# I have learned on my own. It was really easy when knowing C. So I think it is good to know a low level language, because it is very easy then to learn higher level languages.

Now I can also Python, which I have also learned on my own.

0

Share this post


Link to post
Share on other sites

The reason I started with C++ is because it has an immense amount of resources and information circulating around the internet and books about gamedev. No other langiage has as many libs, tutorials, or books on gamedev as C++ does. That's why I prefer it.

0

Share this post


Link to post
Share on other sites

I personally had jumped into C++, head on. And boy oh boy did I find those sharp edges. It's partially the reason why I took so long to learn programming even the simple things. Since it discouraged me so often, from me getting lost and also blowing off my own leg. Then I took a Java class and along with some of the basics I learned through that long time of C++, Java was a BREEZE. Then after that C# was also simple. Just syntax changes.

Though, in retrospect, for me at least, it would've been better for me to start off with Python, Java, or even C#. 

Above all noted why/when C++ is used in the real world.

0

Share this post


Link to post
Share on other sites

 

 

But I've looked for topics where members ask what to study first and you usually let is start with C#.

I'd say Python comes up even more often than C#, and for good reason.

 

Anyway, the consensus from academic circles (read: people who are tasked with teaching hundreds of students to program, year after year) is veering towards this: starting with a language that is overly complex, incoherent, low on expressive power or otherwise user-hostile means you are wasting your time. My gut feeling is that it's even more true if you are trying to learn on your own. Everywhere people are opting for Python, Scala, etc. when choosing languages for introductory programming courses.

 

I recall one particular experiment where a school carried out their two initial programming courses in two groups. The first group used Scheme for the first course. It is an excellent learning language that looks nothing like languages common in production use. The second group used Java. Both groups took the second course, whose subject was object-oriented programming, in Java. Even on such a limited timescale, the end result was that the students of the first group were better at programming in Java at the end of the second course. One can only imagine how much better they grasped programming in general. Also note that Java, while clunky and lacking expressivity, is much more forgiving than C++ is.

 

If you wish to learn C++ in the end stay away from Python...

 

 

The fact that python is fairly different from C++ is actually a very good reason to learn it, especially if you primarily intend to work with C family languages.

Edited by SimonForsman
0

Share this post


Link to post
Share on other sites

For your very first language... go with a non-compiled language.  When you are learning programming basics, taking out the edit-compile-link-run cycle from the occassion is a huge benefit.  It lets you focus on learning coding, as opposed to so many other things.  

 

You can spend a few weeks in such a language, then learn just about any other language at a substantially increased pace.

0

Share this post


Link to post
Share on other sites

I think choosing with what language you should start depends a lot on how you think. I for example always like to take things apart and study every little detail of it because i want to know how things REALLY work. That's the reason i started learning c++ very early (just after a bit of PHP which didn't help me a lot with c++). If i had gone even lower (assembler) that would've been too much. If you really wan't to learn something then mostly you can pull it off, even if it's frustrating at some points (which it definitely was, lol) but when you finally understand everything it's very satisfying. Another advantage is that if you understand c++ and the concepts of programming that come with it it's really easy to learn new languages, especially higher level languages. It might be hard in the beginning but later you can understand new things a lot easier.

If you don't really have the urge to know what's going on in a computer and just want to program i think it would be better to start with something high level so you can get right to the point and program something without having to worry about little details like memory management and stuff.

 

 

For your very first language... go with a non-compiled language.  When you are learning programming basics, taking out the edit-compile-link-run cycle from the occassion is a huge benefit.  It lets you focus on learning coding, as opposed to so many other things.

 

I don't really see where the problem is. Any modern compiler with a decent pc will compile a rather long program in a matter of 1-10 seconds and it's up and running. Of course if you have to configure the compiler and such it would be .. lets say a bit distracting but in a great number of compilers that i have used you just press f5 or click run and it does all the stuff for you and you just wait a few seconds.

0

Share this post


Link to post
Share on other sites

One of the main reasons why many companies use C++ is because when the language was in early publication versions it was actually quite useful and gained a lot of attention.  Those massive numbers of students eventually got deep into the industry, so we are seeing the maturing of that C++ subculture.  That same maturing of both the language and the students into careers happened to Java and is going to happen to C# (already is to a large extent).

 

The C++ and supporting libraries, like several major languages, are very powerful and will be used for years to come. 

 

Keep in mind that every language has strong points and other weaker aspects which may be better satisfied in another language, which is why we actually see several other languages commonly used alongside C++ in the game development industry.  For example, C++ is very favored for multi-threading and managed memory coding of areas of the game which are fairly constant, such as handling object loading, terrain issues like cloud to mountain clip hint to be more specific.  In areas of the game which stop and start as the player makes decisions ingame, then an auto-memory management language implementation is often best, such as using Lua for scripting events by "triggers" as the main character does the role play thru the game scene.  Another way of looking at it is when smooth implementation and render to screen is critical, then C++ shines bright with things like weather and terrain, but it may be much faster game development to use another language such as Lua, Python, Java, or C# for areas of the game where smooth rendering of the object on screen or other gameplay feature can afford to have a slight delay, such as a group of zombies suddenly rounding the corners of buildings when the character reaches a certain location.  (Don't misunderstand, because all of these languages may be coded for very fast performance, but many people find Lua, Python, Java, or C# much faster to develop when used for not-performance-critical areas where these languages are typically quicker in development from start to beta.)

 

Clinton

Edited by 3Ddreamer
0

Share this post


Link to post
Share on other sites

I don't really see where the problem is. Any modern compiler with a decent pc will compile a rather long program in a matter of 1-10 seconds and it's up and running. Of course if you have to configure the compiler and such it would be .. lets say a bit distracting but in a great number of compilers that i have used you just press f5 or click run and it does all the stuff for you and you just wait a few seconds.


Compile time is not really the issue. Removing a layer of complexity is. If the person is learning in a REPL environment, changes just happen, there is no running of code. Variables are persisted until the environment is closed, code execution is always at the current point, etc. this is a great way to introduce a person to programming and has unintended benefits, like making debugging intuitive later on.
-1

Share this post


Link to post
Share on other sites
Legacy code, and lots of it.

 

Why is there so much legacy code for C(98) and C++(pre tr1)? Why not VB6, Java 1.2, .NET 1.1 or other popular languages or platforms of past years?

 

In ~20 years, sure we will probably call things like SDL legacy and sure people will still be slating C++ against their new language of choice and yet C++ will still be going strong, SDL will still work and everyone would have long forgotten .NET, C# and XNA.

Edited by Karsten_
1

Share this post


Link to post
Share on other sites

 

Legacy code, and lots of it.

 

Why is there so much legacy code for C(98) and C++(pre tr1)? Why not VB6, Java 1.2, .NET 1.1 or other popular languages or platforms of past years?

 

In ~20 years, sure we will probably call things like SDL legacy and sure people will still be slating C++ against their new language of choice and yet C++ will still be going strong, SDL will still work and everyone would have long forgotten .NET, C# and XNA.

 

 

Washu was talking about the game development industry, predominantly the professional portion of it. There is almost no "legacy code" for VB6, Java, or .NET because it is almost never used for shipping professional games. Additionally, C++ is much older than any of those technologies.

 

You have a highly amusing view of the future.

0

Share this post


Link to post
Share on other sites

 

 

Legacy code, and lots of it.

 

Why is there so much legacy code for C(98) and C++(pre tr1)? Why not VB6, Java 1.2, .NET 1.1 or other popular languages or platforms of past years?

 

In ~20 years, sure we will probably call things like SDL legacy and sure people will still be slating C++ against their new language of choice and yet C++ will still be going strong, SDL will still work and everyone would have long forgotten .NET, C# and XNA.

 

 

Washu was talking about the game development industry, predominantly the professional portion of it. There is almost no "legacy code" for VB6, Java, or .NET because it is almost never used for shipping professional games. Additionally, C++ is much older than any of those technologies.

 

You have a highly amusing view of the future.

 

 

As someone who was doing this 20 years ago, I have a pretty good guess what another 20 years will do.  I agree fully with your last comment.

 

Otherwise I would still be using the Fastgraf library, using the Glide API and talking about how C++ is too slow for real game programmers.

 

Legacy code is not linked to the language it was created from, but instead to the problem domain it was intended to solve.  Once a problem is solved ( ie, OpenGL/DX replacing Glide ) or goes away ( ie. moving from direct memory access to virtualized environments ), the code written to work in those problem domains becomes legacy.  Or of course, code can become legacy because it was replaced with a superior version.

0

Share this post


Link to post
Share on other sites

Additionally, C++ is much older than any of those technologies.

Thats why I was very careful to specify versions of all the technologies I listed to be around the same age but for some reason you have assumed that by me saying pre-tr1 I must have meant the version of C++ straight after it was named from C with classes ;)
C++ from that age doesnt really give us much of that precious reusable legacy code anyway. It would probably be easier to port from java than from how C++ used to be.
I helped out on porting the newly open-sourced CDE to run on FreeBSD and the C (and C++) they used was c r u s t y! Though I am glad they stuck with it rather than just make a new language because I quite like C++ how it is today.
 

You have a highly amusing view of the future.

My view of the future is certainly not amusing since it involves technology and innovation crumbling under the heavy hammer of DRM and app stores. There is no future for developers... ONLY STORES!!

Edited by Karsten_
0

Share this post


Link to post
Share on other sites

 

Many companies DON'T use C++ at all. In some industries the use of C++ is extremely rare or even completely denied simply because its not a very tolerant and safe language. In the game development world though, things are a bit different.
 
There are a few reasons why things are different in game development, and the biggest reasons have ABSOLUTELY NOTHING to do with performance. People to claim C++'s "performance" is the reason its used in game development couldn't be more wrong. The two biggest reasons C++ is used are:

  • Legacy code, and lots of it.
  • The platforms they're targeting (such as PS3/XBox/PS4/Xboner) ONLY support C and C++ targets (for AAA games).

Many AAA games are written, these days, targeting consoles first, and then ported over to the PC. There are big reasons for that, namely the number of units shipped is usually significantly higher for consoles than for the PC. When you're looking at shipping millions of units on a console versus hundreds of thousands on the PC it quickly becomes obvious which one is a better market choice. However, with the exception of XNA (and not long for that either), none of the current generation of consoles supports anything except for C and C++. Some games have been written in Scheme (GOAL actually), however those used a compiler that produced PS2 machine code that was written in house by the developers.
 
It is also important to understand that legacy code is a very big thing, you have libraries that manage resources, libraries that manage memory, various forms of standard libraries (containers, algorithms, etc) that have all been written over the years using C and C++. Thus it is important, from a business perspective, to squeeze as much value as you can from those artifacts. Thus the legacy aspect comes into play. If you look at something like EA Sports... they've been hammering at the same code base for nigh unto a decade now. That's a huge amount of functionality and code that has been produced which would need to be tossed and rewritten should they move to another software platform (such as .Net), assuming one even existed for their target consoles.
 
As for what languages you should learn first? Your goal as a newbie programmer is to learn PROGRAMMING. Not optimization, not a programming language, not "low level" nonsense that people like to claim is the benefit of learning C++ first. No, your goal is to learn to program. Software development. The art and method of solving problems through strategic application of algorithms, data structures, and logic. This skill is independent of ALL languages, but it is EASIEST to pick up when you start with a language that is EASY TO LEARN. C++ is NOT THAT LANGUAGE. C#, Java, Python, Lua... all of these are great starting points that can help you to get started and rapidly develop the appropriate thought processes, which you can then apply to learning a significantly more complex beast, like C++.
 
For those recommending C++ as a first language, here's a simple little quiz. Take it if you dare. Try not to cheat. I.e. answer off the top of your head, not with your compiler or with a textbook.

  • Given the following three lines of code, answer these questions
    • Is the second line well defined behavior?
    • If the second line is well defined, where does the pointer point to?
    • What are some of the legal operations that can be performed on the third pointer?
  • int* p = new int[10];
    int* j = p + 11;
    int* k = p + 10;
  • What output should the following lines of code produce?
    int a = 10;
    std::cout<<a<<a++<<--a;
    
  • Assuming the function called in the following block of code has no default parameters, and that no operators are overloaded, how many parameters does it take? Which objects are passed to it?
     
    f((a, b, c), d, e, ((g, h), i));

Lastly, here's a list of links to similar threads on this issue:

This one enjoys fairly significant popularity. (Note that only threads containing significant discussion are included.)

1) Professional Games Made In C#?
2) Java for game development?
3) Java----C/C++
4) c++ or c#
5) Question about Java Vs. C# Vs. C++
6) Java Games?
7) Java is fast?
8) Secondary Language:VB or Java?
9) What makes C++ so powerful?
10) C# games and cheating...
11) Is C# good enough for system utility programming
12) MC++ vs. C#
13) Which language is best for a 3d Games Engine?
14) C# vs C++ as a choice for development
15) Is Java the Future?
16) why C# and not Java?
17) What do you think of the D language?
18) my c++ d c# benchmark!
19) The Definitive Guide to Language Selection
20) Sharp Java
21) C++ or C#?
22) C++ or C#?
23) Java disadvantages
24) C++ or C#?
25) Visual C++.net vs Visual C#.net
26) C# - huh?
27) which language should i learn?
28) C or C++ or C#
29) learn C or C++ ??
30) Is C still useful in gamedev?
31) Why C# XNA When Everyone Wants C/C++
32) JIT compiled code vs native machine code
33) C++ or C?

This particular list is my top ten, because of the sheer frequency with which they occur. 12 days, 10 threads.
1) c++ or c# (5/1/06)
2) Java for game development? (5/2/06)
3) Java Games? (5/3/06)
4) Java----C/C++ (5/3/06)
5) MC++ vs. C# (5/4/06)
6) What makes C++ so powerful? (5/9/06)
7) C# games and cheating... (5/9/06)
8) Is C# good enough for system utility programming (5/9/06)
9) Which language is best for a 3d Games Engine? (5/11/06)
10) C# vs C++ as a choice for development (5/12/06)

 

 

 

I realy enjoy what you are saying!
To me it seems like people are only focusing C++ just because industry like Blizzard, Riot, Bethesda, EA and others are using it.
Cause alot of us just want to stay Indie and make marvelous games that way, no need for C++.

 

I also believe that C++ is still used by big companies because it would cost and take tremendous of time switching to another language.
Why should they when they can get the same result using C++ as with C#...
Maybe things will change, but atm its no reason for the industry to waste time/money changing language.

Dont tell me that C# wouldent do the same trick making for example League Of Legends...
Bloodline Champion is an AAA game made with C#/XNA.

Edited by Thomas Wiborg
0

Share this post


Link to post
Share on other sites

I think for me it is more the fact that C# is capable but so is Objective-C, Java, Python, Haskell, VB, AS3, HaXe etc.. etc...

 

But the industry had to choose one and that is C++. I would have been just as happy if it was Java and I would then use Java but I simply wont suggest limiting yourself to niche languages (within the gamedev industry) needlessly.

 

The indie gamedev industry is a strange one in that many indie devs are effectively consumers of "game making" products (including languages) so if they have been sold on C# which is highly probable because Microsoft has invested millions in doing so in the past, then who am I to get in the way of their enjoyment.

 

Anyway, this is turning into a pointless language war so I am out (at least until the next one ;).

Edited by Karsten_
0

Share this post


Link to post
Share on other sites

I started out with C++ many years ago.  For the last 10 years I've been doing C# as most companies except in a few niches(such as game dev and those working on legacy systems)appear to be shifting away.  C++ devs I know who are looking for work struggle now(relatively speaking) and have to travel about a lot, whereas I've never been busier and can stay local.

 

I wont get into the argument about why game companies use C++.  I will say that if I wanted to get into game development at a software house that used C++ and didn't use C#, I would just go and learn C++.

 

C++ and C# share a lot of similarities, but there are lots of differences too...and these can be confusing, especially if you're new to both.  One small example is multiple inheritance, which is not allowed in C#. These kind of differences ultimately affect how you write the code and will be confusing for a beginner when you switch.

 

C# is a far more productive language, and I have to say I'm continually impressed by its performance.  That said, the only reason I'd learn C# and C++ is if a likely future employer used both or if I want to make some software where the performance edge C++ might give you didn't outweigh the large productivity benefits given by C#. 

 

In short, it depends on your particular needs, but if you're sure they (and you) will only need C++, just learn that to start with, in my opinion.

 

As a C# dev, C++ is still very useful to know, though.  C# hides a lot of stuff, so having the basic understand of many of the concepts that C# wraps is very useful.

1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0