C, C# or C++?

Started by
26 comments, last by PropheticEdge 13 years ago
Okay I want to learn a few game programming languages to get a head start in Uni but I'm not sure which of the three in the topic is best to start out with. Once I have a good knowledge of one or two of the above languages I will move onto Python and Java to cover all the bases :P
Advertisement
Why not start with Python, then C#, then C++? :P
Does Python have similar syntax? I've made a little application with C# before so it should be easier to get to grips with :)
Start with C# and make some simple programs (stuff that reads in a text file, a calculator, an organiser etc).

Then add in the XNA framework. There's some really clear setup and installation instructions on the XNA website on how to get started. There are also a few good tutorials to get you started making some simple games. It's free to make games for Windows and if you find yourself getting interested you can purchase a creators club membership for about £80 which allows you to publish for Xbox 360.

That should easily keep you busy for the next few months.

I would only move on to C++ once you are competent with object oriented principles (Classes, Abstraction, Encapsulation, etc) and data structures (stacks, queues, lists, etc).


Does Python have similar syntax? I've made a little application with C# before so it should be easier to get to grips with :)


Once you are adept at C#, python will seem incredibly easy to get to grips with. The only reason I would advise learning C# first is that it prepares you for learning C++ which will help you get into the games industry (which based on your previous threads; I am assuming is your goal)
Game Designer at Playground Games
I may be a bit stuffy regarding that topic (or like reinventing the wheel) but I suggest using C++ if you really want to learn something. If you just want to "make game" use C# and XNA.
I don't want to start a C# discussion, but I know a lot (often younger) people who use C#, .net + Frameworks and consider themselves to be superior but in fact don't even know basic stuff. For example using linked lists etc. without knowing what it is. My two cents.:P
If your only goal is to be prepared for Uni use Java.
In general, many concepts you learn with any programming language are going to be applicable to any other language. The kind of things I'm thinking about here include data types, flow control, data structures, etc. At your stage I think these are going to be of most immediate benefit to you, and will give you a decent head-start on your course. So pick the language that you feel most comfortable with right now, and exercise yourself a little on that. Try to push the boundaries of your knowledge.

If you want to get into games - aside from perhaps game logic scripting - you absolutely must have more knowledge of what goes on "under the covers" than languages like C#, Python or Java provide. You need to know a lot of ugly details about pointers, memory architectures, algorithmic efficiency, and so on. I'd say don't bother with these for now; they'll only confuse you, or at worst put you off. But do bear them in mind as an avenue that you're going to have to explore at some time.

The same applies to C++/STL - it contains a lot of nice containers for handling common data structures, but unless you know what's going on behind the scenes with them you'll only end up using them inefficiently or inappropriately, and writing O(n[sup]2[/sup]) algorithms everywhere. You need - IMO - to know how to write, for example, a linked list yourself before you start using a pre-canned container. That way you know the correct access patterns to use for it, you know the incorrect access patterns, and - more importantly - you know why they're correct and incorrect.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

If you're getting started in Uni soon so you know where you'll actually be going, I'd say take a look at their computer science department's web page or find some of their recent syllabi or talk to someone currently attending to find out what languages they're teaching right now. And go ahead and get the ball rolling in the same language.




If you don't know where you'll be going (like if things aren't lined up yet as it's too far in the future), then out of the 3 you offered as choices, I'd say C#. It's simpler to pick up than C or C++. And knowing it will ease a later transition into learning C++.


I may be a bit stuffy regarding that topic (or like reinventing the wheel) but I suggest using C++ if you really want to learn something. If you just want to "make game" use C# and XNA.
I don't want to start a C# discussion, but I know a lot (often younger) people who use C#, .net + Frameworks and consider themselves to be superior but in fact don't even know basic stuff. For example using linked lists etc. without knowing what it is. My two cents.:P
If your only goal is to be prepared for Uni use Java.


Sorry but I think you might be missing the goal of software development. The goal is always to produce something. Languages are just tools. Do you have to know how to make or use a linked list to be a good developer? Not at all. Use the best tool to get the job done. If you are making a device driver, I would say, use c/c++. If you are making a basic windows app or indie game C# does the job just fine.

This whole "this language is the best" idea is just utter garbage.
c#, its a nice middle ground, particulaly with xna. I'f your going to be learning java at uni though, then you might as well just go straight for it.

Interested in Fractals? Check out my App, Fractal Scout, free on the Google Play store.

Common Lisp or maybe even Scheme. Primarily because they have a lot of good material for people new to programming in general. C and C++ don't, really. Also C# is more Java than C or C++. Maybe C# has good introductory material. I don't know. I thought the O'Reilly XNA book was pretty worthless.

The other advantage with starting with CL or Scheme is that a lot of the really interesting idea from those transfer really easily to something like Lua, and apparently Python and Ruby as well though I don't really know those.

The problem with starting in C++, I think, isn't so much that C++ is hard, but that a lot of the pedagogy and theory about it is either bad or flat-out wrong. I don't know much about C beginner materials. It might be better.

This topic is closed to new replies.

Advertisement