Advertisement

Are C++ and C# a double edged sword for every game developer?

Started by November 03, 2017 07:39 AM
10 comments, last by Nypyren 7 years ago

Dear all game developer out there,

Should I learn C++ or C# first before getting my hands dirty with any game engines because I saw a lot of posts talking about how these two computer languages (object-oriented language) is quite useful for making games. And where can I learn it step by step as a complete beginner

Thank you

I'm a student who is starting to learn into game development industry , please be patient with me if I ask you anything anything

 

Hello,

Although I work as C++ programmer, for making games I personally prefer C#, since the development in C# is much faster and easier and for smaller games you dont need the fastest language arround - in C# you can still make 3D games with nice realistic graphics running hundreds of fps.

Advertisement

I'd you learn Unity you'll need to know C#, and if you learn Unreal you'll need to know C++, so yes, if you want to be a game programmer you should learn these languages. 

(A "double edged sword" is a term normally used to talk about something which has some positive aspects but also some negative aspects associated, possibly not as obvious. As such, C++ and C# are not a double edged sword.)

I've enjoyed using C# and monogame/xna to develop independently, and if you are looking for a good starting point without having to spend a ton of money on books, then check this out http://www.introprogramming.info/english-intro-csharp-book/

I've gone through it and it teaches quite a bit about the fundamentals of programming, but if you are planning on using Unity then it may be overkill to learn so much about the fundamentals.

14 minutes ago, kostile said:

I've gone through it and it teaches quite a bit about the fundamentals of programming, but if you are planning on using Unity then it may be overkill to learn so much about the fundamentals.

Learning the fundamentals is essential if you have plans to be a programmer.  Without them tracking down bugs is a task in frustration and often leads to people giving up.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

Advertisement
On 11/3/2017 at 12:39 AM, TobyTheRandom said:

Should I learn C++ or C# first before getting my hands dirty with any game engines

Yes

or No

possibly Maybe

Seriously, you've given us absolutely nothing to base an answer on.   So you can pick whichever of the above two you prefer.

Both languages, and many more, are used in the industry.  

  • C++ - used for systems-level work, many game engines, and other code.  The primary language for Unreal development.
  • C# - used for many tools and some game scripting libraries. The primary language for Unity development.
  • Java - Used for much server side code, many tools. The system language for Android development.
  • Objective C, Objective C++, and Swift - Used in Apple development.
  • JavaScript - Language of web browsers and browser-based games. Also found in an ever-increasing amount of tools and other code.
  • SQL - Data back-ends for all the server work.
  • Python - Many build systems, tools, and a few games.
  • Many others, but I feel these are currently the most mainstream.  C, more specifically the C-style bindings, are used by many languages and tools. The C language (which is neither a subset nor superset of C++ as some people maintain, they diverged in the 1980s) is used on some code. Assembly code is used sparingly as a source, but reading disassembled code is a critical skill for senior developers. Scripting languages like Lua, markup and encoding languages like HTML, XML, JSON, and YAML, you'll likely encounter these.  

C# and Python both have relatively gentle learning curves. C++ is usually not recommend for a first programming language because of the knowledge the programmer is expected to have.

These days I expect that mid-level programmers should be able to read and understand all of them when encountered. They should also be comfortable writing code in at least two of those languages. I expect senior level engineers to be comfortable in four or more.

 

Languages can be used together, and with the right compiler glue can work together seamlessly. Each language has its own pros and cons, there are problems and solutions that are better suited to each.  If you choose to be a game programmer, you'll probably end up learning five or ten or more programming languages over your career.

If you're new to coding go with C#.  C++ learning modules are very convoluted with lots of code they tell you to put in and will explain later.

On 11/3/2017 at 3:39 AM, TobyTheRandom said:

Dear all game developer out there,

Should I learn C++ or C# first before getting my hands dirty with any game engines because I saw a lot of posts talking about how these two computer languages (object-oriented language) is quite useful for making games. And where can I learn it step by step as a complete beginner

Thank you

I would suggest to start with C++. It might take longer to get results, but it might also teach you a bit more about the 'behind the scenes'.

Once you know one language, jumping to another gets easier (and incrementally easier with each successive change as you start thinking in terms of how this language is a bit like language A using some concepts of language B with a syntax that feels like language C).

That being said, I abide by the rule that it's better to 'start somewhere', so either works.

OOP in and of itself is a mindset. You could start making C++ and C# and break pretty much every precept of OOP, so make sure you teach yourself about that as well, not jut syntax and script.

This topic is closed to new replies.

Advertisement