Sign in to follow this  
escanive

XNA - should I spend time on it?

Recommended Posts

Hi, I have some experience in PHP and TI-BASIC. I have made snake for my calculator, and I feel that soon I'm ready to "take the leap" into the world of gameprogramming for Windows. I have long wanted to learn C++, but a few days ago a friend of mine told me about something called XNA. I was wondering: Should I learn C# (as far as I have understood, it is one of the languages supported by the XNA toolkit)? Or should I stick with my plan and learn C++? Or perhapps I should learn both? I have heard that these two languages are pretty similar, at least when it comes to the syntax. If I'm going to learn both languages, which should I learn first?

Share this post


Link to post
Share on other sites
Whatever you do, learn to program in the language first. A lot of people seem to want to jump right into graphical game programming, but if you don't have a solid foundation in programming, you won't get far before getting confused and giving up.

As for what language and libraries to use: It entirely depends on what you want to do. If this is just intended to be a hobby, then sure, XNA is a nice choice for a beginner. C# is great to work with, and XNA is pretty easy to use.

If you want to eventually work in the game industry as a programmer, I don't see anything wrong with picking up C++ from the start; it's not as tough to learn initially as it's often made out to be, although it takes a lot of time and effort to get really good with it, and it's kind of a pain to work with once you've experienced the convenience of higher level languages.

If you're interested in making and selling indie games, I'd look elsewhere, though. XNA comes with some serious caveats which make it very hard to distribute your game, and C++ makes things way harder than they need to be if you just want to see results. Here are some good alternatives to XNA or C++:

Torque Game Builder
BlitzMax
Java
Python + PyGame
GameMaker

Share this post


Link to post
Share on other sites
Asking what language to learn on here will open up a can of worms. Basically, everyone will have their own opinion.

I would suggest you take a look at what learning assets are available (books, websites, tutorials and such) and see which best fits the way you learn and what you want to achieve.

Whatever you go for, best of luck in your goals.

Share this post


Link to post
Share on other sites
Starting off with C# is a great idea. C# usually means shorter development times because standard libs are very good (.NET framework), and the language itself is much more easy to work with (mostly because of GC). C++ is much more low-level and it's more complex to work with, even with good libraries. So if I was you I'd choose C# over C++. You'll be able to learn the C++ syntax and features quite easily once you've mastered C#.

Syntaxically the languages are very similar, but C# enforces better coding practices, so if you'd start with C#, you might develop better habits which'll translate into nice C++ (as C++ code can be complete junk if you're not careful).

Finally, XNA is a great idea, but be sure to start with 2D games before jumping on to 3D, 3D can be much more complex than it seems, even using XNA.

Good luck!

EDIT : I'll say as OremLK : don't aim for graphical programming too quickly. Learning the language is a mandatory step before being able to program games with it. Yes, this might mean console applications =).

Share this post


Link to post
Share on other sites
Quote:
Original post by Trillian
Starting off with C# is a great idea. C# usually means shorter development times because standard libs are very good (.NET framework), and the language itself is much more easy to work with (mostly because of GC). C++ is much more low-level and it's more complex to work with, even with good libraries. So if I was you I'd choose C# over C++. You'll be able to learn the C++ syntax and features quite easily once you've mastered C#.

Syntaxically the languages are very similar, but C# enforces better coding practices, so if you'd start with C#, you might develop better habits which'll translate into nice C++ (as C++ code can be complete junk if you're not careful).

Finally, XNA is a great idea, but be sure to start with 2D games before jumping on to 3D, 3D can be much more complex than it seems, even using XNA.

Good luck!

EDIT : I'll say as OremLK : don't aim for graphical programming too quickly. Learning the language is a mandatory step before being able to program games with it. Yes, this might mean console applications =).


I agree. Don't diss console apps now, they can be fun :)

Share this post


Link to post
Share on other sites
From another perspective, the business world is going with either Java or C#. So if you don't get into the gaming business, C# would give you a fallback. But above all, learn to code well. Whichever language you learn. Learn and follow industry best practices (unit-testing, code documentation, etc)

Share this post


Link to post
Share on other sites
Quote:
Original post by jumpingrock
From another perspective, the business world is going with either Java or C#.


umm... no??

but the rest of what he said was good, w/e you learn you will want to get a few books (they will help out soo much more then just looking around the web) and make sure you learn good practices.

Share this post


Link to post
Share on other sites
Quote:
Original post by jumpingrock
From another perspective, the business world is going with either Java or C#.


umm... no??

but the rest of what he said was good, w/e you learn you will want to get a few books (they will help out soo much more then just looking around the web) and make sure you learn good practices.

Share this post


Link to post
Share on other sites
Quote:
Original post by OremLK
Whatever you do, learn to program in the language first. A lot of people seem to want to jump right into graphical game programming, but if you don't have a solid foundation in programming, you won't get far before getting confused and giving up.

...
Torque Game Builder
BlitzMax
Java
Python + PyGame
GameMaker

Yup most people seem to want to jump right into making cool looking games without getting a basic handle on the language they are using to interact with their graphics API of choice.
I recommend C#/XNA for anyone starting out new since there is only 1 way to program in it unlike C++ where you will see code written in the old C way using chars and arrays or the newer way using vector and string so you are essentially learning 2 languages at once!
I think that's one of the reasons it's so hard and won't get very far with any games until you get a good handle on the language and that will usually take more than a single book too.
If you choose C# I recommend "head first C#" and the Hall XNA book since that would get you off to a good start making your own XNA games.

Share this post


Link to post
Share on other sites
Quote:
Original post by escanive
I have heard that these two languages are pretty similar, at least when it comes to the syntax.

The imperative core of C++ and C# is pretty similar, yes. Beyond that, they are completely different languages.

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