XNA vs C++

Started by
19 comments, last by DevFred 14 years, 10 months ago
I learned C# at school, and I'm mostly learning C++ in my spare time--I'm stuck with Java at UNI :). There isn't really that big a gap between the two languages. Sure, some things are more difficult to do (Meet your new friends Pointer To Memory, Lib and Header file), but I think you'll find that knowledge gathered from one language will actually compliment the other pretty well--And this works both ways, IMO you can't completely understand referential integrity in Java/C# until you see it's ancestor in C.

Of course, it's better to learn C++ from some kind of course, rather than on your own...if only for the certificate :). But there are plenty of resources out there.
Advertisement
Thanks for the replies. I know exactly what I'm going to do now. You guys are awesome.
Quote:Original post by ahung89
How realistic would it be to try to learn both C# and C++ at the same time? I still feel like it's really important that I know C++ by the time I graduate. I could work mostly on the C# and take an online course in C++/take the C++ course at school on the side... I think I can manage it, since I'm a very disciplined and responsible student. Unless the nature of the languages would make it very hard to learn them both at once.


Your correct in that the nature of the languages does differ quite a lot. C# is managed and is based upon the .NET framework, C++ is un-managed and uses STL (you don't have too, but it is good too).

You will find that from an architecture point of view, both languages, in fact all OO languages are similar - but not the same. It is better to concentrate on one or the other. This way you can learn one language well rather than two OK.

Thinking also of the fact that the programming APIs you will use are different too. XNA differs greatly from DirectX and OpenGL.

There is nothing wrong with doing both at the same time, but don't let the fact that the languages' syntax are similar fool you into thinking that the languages themselves are similar.
Quote:Original post by WazzatMan
Why not use python?


I've actually been wracking my brain over this question, but I didn't feel like making another "X vs. Y" topic. Although I haven't seen a wealth of Python + Pygame vs C# + XNA topics. Thing is, C++ has pretty much intimidated me into submission because of pointers (I had a class where a 50 on the midterm was considered a B...), and I am much more comfortable with Java now as a result. Interestingly enough, my Java and C++ classes eventually both had us making linked lists and nodes, and while the C++ implementation was more robust (templatized), the Java implementation was so easier to write.

But I digress. I am of two conflicting mindsets. One is to continue on the path of familiarity laid by Java by picking up C# and XNA. C# appears to be an enhanced re-implementation of Java, which is appealing, but XNA's platform dependence has me a bit coy.

The other is to strike into unknown territory with Python and with time Pygame (can't learn an API before learning the language). On one hand, I would have to learn the language from scratch, but at the same time, the code I have glanced seems pretty simple. Although reading and writing code are two utterly separate tasks.

Its also noteworthy that while Python is platform agnostic, XNA locks you into Windows and...Zune (my screen cracked so that's not much of a selling point...), but allows you to deploy to the 360. However, that costs money, and I don't think anything I make for a while will be worth paying for. Its nice to know that the option is there, since I can only imagine how much a legitimate devkit costs, that's not really a huge factor in my final decision.

I've been ruminating on this for quite some time now, and still haven't been able to reach a decision.

[Edited by - napalmb on June 11, 2009 4:00:43 AM]
I would recommend Python and PyGame. Both the language and the API are very easy to learn and use and can get you started very quickly. They can be great learning aides but suffer the problems inherent in a scripting langauge (you need to install the interperter, they are slower than compiled, etc), but can give you the feeling of accomplishing game programming while you are struggling to learn the depths of C++.
I agree with the above. In the end it depends on what you want to do. If your lack of familiarity with Python is the only thing keeping you away from it, then let me assure you: Python is an incredibly easy and intuitive language. I used to think C# was the most intuitive language, with the most intuitive libraries. But in that respect, it eats Python's dust.

Intuitiveness will help you gain familiar with a language, and speed up both the learning curve and actual development time. I still don't feel comfortable writing C# out in notepad, but I have no problem with Python (And no other option, there still isn't an IDE out there which can tame it).

Another plus for python is that it's user-base is -Enormous-, and it's doc feature extremely easy to implement. Whatever you need to do, you will find either:

A. A library.
B. A code snippet.
C. A very helpful manual (Always the best choice).
D. A very well organized reference.
E. A very good forum.

Teaching yourself to think the python-way will not take that long. It took me about a week.

P.S. If you want to create 3D games, I'd recommend Panda 3d over Pygame. Disney use it for their games, and Carnegie-Mellon University students use it for some of their projects.

See: http://www.panda3d.org/

P.S.S. Be sure not to get too addicted to Python. I had to beat my head on the wall a couple of times before I went back to C++ :).
I would recommend just to learn to make games, no matter what language or framework. I think learning another language isn't all that difficult compared to learning how to design software.
Quote:Original post by napalmb
Thing is, C++ has pretty much intimidated me into submission because of pointers [...] and I am much more comfortable with Java now as a result.

Java uses pointers a lot more than C++, it's just that you don't have to write the * all over the place. And you can't do pointer arithmetic. (And they're called references.)
Quote:Original post by DevFred
Quote:Original post by napalmb
Thing is, C++ has pretty much intimidated me into submission because of pointers [...] and I am much more comfortable with Java now as a result.

Java uses pointers a lot more than C++, it's just that you don't have to write the * all over the place. And you can't do pointer arithmetic. (And they're called references.)


I know. But I don't have to "see" them.
Quote:Original post by DevFred
Java uses pointers a lot more than C++, it's just that you don't have to write the * all over the place. And you can't do pointer arithmetic. (And they're called references.)


((Except when one of them is null and gets dereferenced. :) ))

This topic is closed to new replies.

Advertisement