TobyTheRandom

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

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

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'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
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
On 11/3/2017 at 3:46 AM, Kylotan said:

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

C++ and C# don't have obscure, negative aspects?  Where's your winking smiley?! ;)

Edited by Nypyren

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


  • Announcements

  • Forum Statistics

    • Total Topics
      628400
    • Total Posts
      2982447
  • Similar Content

    • By RidiculousName
      So I have a class next semester where I need to learn C++. I'll be going through the class textbook too of course, but I hate textbooks because I learn much better by programming than taking notes. I understand there's got to be some reading just to understand the syntax, but I have trouble remembering much from a whole chapter before programming. I prefer to work with smaller bits of information and gradually expand.
      So my question is, how could I learn C++ in smaller bits?
    • By JediEwok
      I wasn't sure if I should post this here or in the art section, but in the end it seemed more of a career question. If it needs to be moved, please do that.
      I'm a writer first.  That's what I've been doing for years (comics and screenplays) and that's the main path I want to take in the gaming industry.  But I'm realistic, and I know that I'm one in millions competing for very few spots, so I want to add some more skills to make myself more appealing.  I had to learn some programming for school, and I know that's not the path I want to take.  It just doesn't click with me. I've been learning 3ds Max for a while, and I think I'm decent at modeling some basic stuff (non-character) but I also recognize that I have a long way to go before I'm actually good. I'm not very good with materials and textures yet, and horrible with animation, and I get a little overwhelmed looking at just how much I have left to learn if I want to do it all.  I think I should focus on one area to improve for now, and eventually work on the rest.
      I've worked a little bit with particles in a few learning projects in Max and Unreal and really enjoyed it.  So the question is, if I want to really focus on the VFX side of things, what's the best way to do it?  Should I focus on doing it through one of the modeling programs like Max, Maya, or Houdini,  or should I focus on the stuff built into the game engine (Unreal is what I use now because it's what we use for school, I plan to eventually get a feel for Unity and maybe Lumberyard)?  Or should I focus on a 3rd party plugin like PopcornFx that can be used in multiple programs?
    • By rXpSwiss
      Hello,
      I am sending compressed json data from the UE4 client to a C++ server made with boost.
      I am using ZLib to compress and decompress all json but it doesn't work. I am now encoding it in base64 to avoid some issues but that doesn't change a thing.
      I currently stopped trying to send the data and I am writing it in a file from the client and trying to read the file and decompress on the server side.
      When the server is trying to decompress it I get an error from ZLib : zlib error: iostream error
      My question is the following : Did anyone manage to compress and decompress data between a UE4 client and a C++ server ?
      I cannot really configure anything on the server side (because boost has its ZLib compressor) and I don't know what is wrong with the decompression.
      Any idea ?
      rXp
    • By Canislupus54
      I'm looking for programmers for an rpg I want to make. If you're wondering what "semi-turn based" means, it means that you take turns, but instead of a rigid back and forth like Pokemon, a timer determines when you can act, a sort of modernization of the classic Final Fantasy Active Time Battle system. Right now, I'm looking for programmers to create a prototype of both the combat system and the movement outside of combat. Preferably for Unity C#. Concept artists, particularly for characters, and writers to help me flesh out the character and story aspects, would also be helpful.
      Here's a concept doc to fully explain things: https://docs.google.com/document/d/1ObDMAUWsndSAJ1EpQGRDxtR8Xl9xPotx89OZ0sgRaIw/edit?usp=sharing
      If you can fill another role and are interested, feel free to let me know as well.
      At the moment, this is purely a hobby project, with no payment planned. If we produce something we feel we can release, then of course we'll work out something for compensation. But, again, don't join this project counting on payment.
      If you're interested, contact me on here, or at jordestoj@yahoo.com . Thanks.
    • By noodleBowl
      So I have some quick questions about constructors and pointers

      Question on constructors:
      1. I'm working on this Sprite class and in general sprites need some kind of texture in order to display to the screen. So I have my class looking like this:
      class Sprite { public: Sprite(Texture* texture); ~Sprite(); Texture* texture; //Other class stuff } Now in the current state of my Sprite class would I be correct in that I cannot use it as a member in a different class, because it has no no-arg (default) constructor? That the only way this class could be a member is if it was a pointer?
      class SpriteContainer { public: SpriteContainer(); ~SpriteContainer(); Sprite singleSprite; //**BAD** not allowed because Sprite has no no-arg (default) constructor Sprite* singleSpritePtr; //This is allowed because its a pointer std::vector<Sprite> sprites; //**BAD** not allowed because Sprite has no no-arg (default) constructor std::vector<Sprite*> spites; //This is allowed because its a vector of Sprite pointers } I guess my really problem here is that I struggle with when a variable/class should be a pointer or not
      2. How do you make an abstract class where there are no methods that should be pure virtual functions?
      All the functions of the base class have there implementation, but I also do not want this class to be instantiated
      //Should not be able to instantiate this class. Should be an Abstract class class BaseClass { public: BaseClass() { x = 0; }; virtual ~BaseClass() { }; int x; void coolMethod() { ++x; } } //Can instantiate this class. coolMethod can be called from this class class DerivedClass : public BaseClass { public: DerivedClass(); ~DerivedClass(); }  
      Questions about smart pointers:
      1. I have never used these before, but are smart pointers ok when working with COM objects?
      Will the smart pointer automatically call a COM object's Release function or should I wrap my COM object and explicitly call Release in the wrapper class' destructor?
      2. Lets say there is a case where I wanted to give back the user of some APIs a pointer to a resource, but I also want them to know that they don't have to worry about cleaning it up. EG There is resource loader that will clean up all loaded resources once the program shuts down. The user has to do/worry about nothing.
      What type of smart pointer should I use in a case like this? Should it be a Shared pointer? Or should I make the resource a Unique pointer and then return to the user a raw pointer?
  • Popular Now