Jump to content
  • Advertisement
TobyTheRandom

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

This topic is 390 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement

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.

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

(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.)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!