Sign in to follow this  
ahung89

XNA vs C++

Recommended Posts

Yeah I know what you guys are all thinking... use the search right? Well I did and my case is particularly unique because the programming language that I've been learning at uni has been java, not c# or c++. I've already decided that since I am dead set on going into game programming it is absolutely imperative that I learn C++ eventually and hopefully soon so I can develop an impressive level of skill by the time I graduate. However from looking around I also get the impression that XNA/C# is much easier to use to make solo projects, and that having an impressive portfolio is the number one thing that companies look for. Using java to make games is out of the question for me, since I'll be using it anyway for the rest of college and I need to start picking up another language soon. I'm very close to signing up for a curriculum at gameinstitute.com that includes C++ and directX training, but I figured I'd get all of yall's opinion first before I made any move. Considering that I'm a pretty skilled programmer (at least for someone of my experience), do you think I'd be able to use C++ and make some good solo projects that I could showcase to companies once I seek employment? I still have at least two years before I graduate. The only thing that holds me back from choosing it over XNA is that I've been told by a friend that XNA has a HUGE bank of tutorials and other things of that nature to make solo projects easier, while C++ doesn't and I'd struggle a lot more. What do you guys think?

Share this post


Link to post
Share on other sites
If you already know Java then you pretty much know C# already. They are almost exactly the same.

Get a decent book on C# (I used Professional C# 2008) and you will be up and running in no time.

Having said that, if you are a reasonably competent programmer it should not take long to get the hang of C++ either. Obviously there is more to learn but you will be able to get up and running with it pretty quickly.

Share this post


Link to post
Share on other sites
Quote:
Original post by ahung89
Yeah I know what you guys are all thinking... use the search right?
No, personally I was thinking "damnit, another newb who can't even be bothered to use paragraphs."
Quote:
Well I did and my case is particularly unique because the programming language that I've been learning at uni has been java, not c# or c++.
Unique? That applies to damned near every college computer science student in the country.
Quote:
I'm very close to signing up for a curriculum at gameinstitute.com that includes C++ and directX training, but I figured I'd get all of yall's opinion first before I made any move.
Don't bother, it's a waste of money.

Your options are:
1) Use C++. This will involve writing console programs for a while to learn the language, then slowly learning how to get some basic graphics going, then trying to figure out how to actually build a game in C++.
2) Use XNA/C#, and probably modify the sample games for starters, learning C# while you do. Then learn to build your own games from the base up, and eventually transition to C++ with a pretty good idea of where you're going.

Your call.

Share this post


Link to post
Share on other sites
Everyone thinks their case is unique. It turns out that, in almost every case, they are wrong. I'm not sure what you're expecting out of this thread, but everything you could possibly hope to obtain from GDNet in terms of advice related to learning languages and future career choices can easily be found in the uncountable number of preexisting threads on these topics.

There's a reason that GDNet keeps an archive of all of its old thread, and a reason that they provide a search feature for convenient access to all of that knowledge.

Even if you're particularly lazy, you're still in luck. A kind soul has done the work of doing the search for you, and has archived a nice list of them for your viewing pleasure. Expecting people to repeat themselves over and over even when you know that such information has already been given and is readily accessible is quite arrogant and will put people off from helping you in the future.

Share this post


Link to post
Share on other sites
Quote:
Original post by Mike.Popoloski
Everyone thinks their case is unique. It turns out that, in almost every case, they are wrong. I'm not sure what you're expecting out of this thread, but everything you could possibly hope to obtain from GDNet in terms of advice related to learning languages and future career choices can easily be found in the uncountable number of preexisting threads on these topics.

There's a reason that GDNet keeps an archive of all of its old thread, and a reason that they provide a search feature for convenient access to all of that knowledge.

Even if you're particularly lazy, you're still in luck. A kind soul has done the work of doing the search for you, and has archived a nice list of them for your viewing pleasure. Expecting people to repeat themselves over and over even when you know that such information has already been given and is readily accessible is quite arrogant and will put people off from helping you in the future.


That was a very helpful link. Thanks.

Share this post


Link to post
Share on other sites
I give the same advice to everyone, but I'll give it again.

Make games with XNA while you learn C++ on the side. It will make learning C++ seem like less of a chore. XNA wasn't around when I was learning to program. All I wanted to do was make games, but with C++ it's a bit of a long process. These days while I work with C++ (and actually love working with C++), I do all sorts of small games and prototypes in XNA at home.

XNA allows you to get quick results that will help to offset the slow results you'd see with making games using C++.

Share this post


Link to post
Share on other sites
Thanks for the information. Looks like I'll be going with C#. I'll just take the C++ course at my school (one hour a week) to supplement it.

I'll make better use of the search in the future. Apologies to anyone who was annoyed by this thread.

[Edited by - ahung89 on May 31, 2009 1:48:01 PM]

Share this post


Link to post
Share on other sites
Just a note...

Why not use python?

The future of Java and C# is pretty uncertain in terms of commercial game development (And indie game development for that matter), and you already know how to use one of them...plus the other is pretty similar.

Python on the other hand is a scripting language. Something with different pitfalls and advantages. Not only has python been used in MANY more games (Both indie and commercial) than both those languages put together, but it's a heckovalot easier, and has more libraries.

Plus you can easily integrate it with C/C++.

Google and check out pygame, numpy, and panda3d.

My only real complaint against python is the difficulty in distributing a standalone package (Although technically you can just cheat and include the python distributable with a batch file to run your main script)

Share this post


Link to post
Share on other sites
I've been thinking about this a lot today. I've been reading a lot about C# and it sounds like a great way to get started making games. Just one last question though.

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.

Share this post


Link to post
Share on other sites
Learning both at the same time is very feasible. You learn multiple languages in first year university (in my case Java, C and C++), and it wasn't difficult to balance them.

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
Quote:
Original post by Zahlman
Quote:
Original post by DevFred
(And they're called references.)

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

Yeah, that's pretty funny. What were the language designers thinking back then??? :)

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

Sign in to follow this