Page 1 of 2
XNA Game Studio / C#
Posted: Fri Aug 07, 2009 3:50 pm
by vargonian
Hi guys,
I'm just curious what you guys think about developing for the Xbox (or PC) with the XNA Game Studio Creator's Club. I am unapologetically a C# fanboy, and this is coming from someone who spent a decade writing in C++ prior to switching to .NET. There are just so many hassles that become non-issues when you switch to .NET, and the performance implications of using .NET are highly overrated. I'm just curious what your feelings are on the subject, from one game developer to another.
Re: XNA Game Studio / C#
Posted: Fri Aug 07, 2009 3:52 pm
by hurstshifter
vargonian wrote:There are just so many hassles that become non-issues when you switch to .NET
how so?
Re: XNA Game Studio / C#
Posted: Fri Aug 07, 2009 4:10 pm
by trufun202
Overall, I'm a fan of C# and XNA development. It can be a bit rigid, but it get's the job done in most cases. And, with that said, I have no plans of moving away from C++ for other gaming projects.
The XNA Creators Club is helpful community, but getting a game approved for Xbox 360 can be pretty painful. There's a giant list of perceived "no-no's" for 360 games, and you have to clear that list before getting your approvals - regardless of your personal opinion on the matter.
Plus, you have to pay to release games on the 360 ($100 a year), so you'll have to make at least that much on your game to break even.
Re: XNA Game Studio / C#
Posted: Fri Aug 07, 2009 5:01 pm
by vargonian
hurstshifter wrote:vargonian wrote:There are just so many hassles that become non-issues when you switch to .NET
how so?
Well, to name a few (sorry if I sound like a commercial):
1. Memory Management
You no longer have to worry about leaking memory since you've got garbage collection. If your objects are no longer being used by anything, they get deleted. (To be pedantic, technically you can still leak memory but you'd have to try really hard.)
2. Headers/implementation file hell
As an experienced C/C++ developer, I've gotten used to dealing with header/implementation files so it isn't as big of an issue anymore, but this drove me nuts when I was newer. You don't have to worry about the order in which you include .h files or worry about what should go in a header file versus an implementation file. In C it's typical to have an "extern'd" constant in a header file, and the actual definition in the implementation file, for example. C# does away with header files altogether; everything gets defined in the .cs file. You no longer get into header hell.
3. Less awkward naming conventions
In other languages it's common to see class names prefixed with letters (beyond just Hungarian notation) to distinguish them from similar classes, when ultimately it just makes the code more difficult to read. For example, I've been doing iPhone development recently and I see a lot of "NSString", "CFDictionary", etc. While nobody's stopping you from doing that in C#, you don't need to because namespaces easily resolve ambiguity. Granted, C++ has namespaces as well... I'm just contrasting this with other languages.
4. First-class debugger/IDE support with Visual Studio
If you've ever used Visual Studio to debug/write C++ programs versus .NET ones, you'll see what I mean. While it's still great for debugging C++ apps, you've got much fewer incidents of call stack corruption and other issues which make tracing your program flow more difficult. Intellisense works more reliably as well.
5. A powerful framework class library
The libraries which ship with .NET are probably the best I've ever seen in any language as far as functionality and ease of use. Using a generic Dictionary versus an STL hash map (for example) is much easier. The same applies to any Collection class for that matter. There are also tons of convenience methods in classes like String.Contains, String.StartsWith, String.Replace, etc.
I know I'm leaving out a ton of stuff like LINQ, events, etc. Really, I'd be hard pressed to find a good reason
not to use C# if you're targetting the Windows/Xbox platform for smaller indie games (obviously if I'm making Farcry 3 I'd use a lower level language).
Re: XNA Game Studio / C#
Posted: Sat Aug 08, 2009 5:28 am
by Panama
Ive used XNA and C# in the past to make little games. C# is definately nicer to use than C++ for the reasons you've listed above but I never really felt right when I was using XNA, there's something about DirectX which i just prefer.
Re: XNA Game Studio / C#
Posted: Sat Aug 08, 2009 1:52 pm
by Falco Girgis
I'm not interested. Not because of anything against C# or XNA, but because I find myself extremely attracted to the computer science and engineering part of game development. I want to work at a low level, I want to write my own collision algorithms, I want to learn physics to write my own physics libraries. My lust for knowledge is one of the things that has kept me going on ES, and I feel like I would be missing out on my favorite part of the development process with something like XNA.
Re: XNA Game Studio / C#
Posted: Sat Aug 08, 2009 3:58 pm
by vargonian
GyroVorbis wrote:I'm not interested. Not because of anything against C# or XNA, but because I find myself extremely attracted to the computer science and engineering part of game development. I want to work at a low level, I want to write my own collision algorithms, I want to learn physics to write my own physics libraries. My lust for knowledge is one of the things that has kept me going on ES, and I feel like I would be missing out on my favorite part of the development process with something like XNA.
Yeah, XNA Game Studio development can hide some of the underlying hardware details from you, but it certainly doesn't hide all of them. You still write shaders from scratch (unless you use the simple ones they set up for you), deal with collision/matrices/physics/AI/etc. all on your own. The XNA libraries do have a lot of collision/intersection/vector/matrix classes which can make life easier for you but there's no requirement to use them. You definitely have to write your own physics libraries, etc. It just handles (in my opinion) the more annoying, repetitive details for you, like the low-level details of loading textures/models, matrix operations, memory management, and that sort of thing. But again, you could still do any of these manually if you really wanted to.
If anything I just want to break any possible misconception that using XNA Game Studio is akin to using a program like RPGMaker, or even that XNA is a "game engine", which it isn't (or if it is, it's horribly lacking in typical game engine features). I don't mean to sound like a Jehovah's Witness trying to convert you. I've developed 12 published titles in C++ and I certainly have a lot of love for the language.
Re: XNA Game Studio / C#
Posted: Sun Aug 09, 2009 5:53 pm
by davidthefat
Its a good start on your portfolio to put in your resume to develop and publish your own game
Re: XNA Game Studio / C#
Posted: Sun Aug 09, 2009 10:23 pm
by wearymemory
davidthefat wrote:Its a good start on your portfolio to put in your resume to develop and publish your own game
Some of that
Golden knowledge from ya there, bub!
Re: XNA Game Studio / C#
Posted: Sun Aug 09, 2009 10:36 pm
by Falco Girgis
davidthefat wrote:Its a good start on your portfolio to put in your resume to develop and publish your own game
. . .
Re: XNA Game Studio / C#
Posted: Sun Aug 09, 2009 11:02 pm
by dandymcgee
GyroVorbis wrote:davidthefat wrote:Its a good start on your portfolio to put in your resume to develop and publish your own game
. . .
It's okay. The drunken grammar threw me off for a second too.
Re: XNA Game Studio / C#
Posted: Mon Aug 10, 2009 2:16 pm
by ibly31
davidthefat wrote:Its a good start on your portfolio to put in your resume to develop and publish your own game
Seriously, WTF is he talking about?
Re: XNA Game Studio / C#
Posted: Tue Aug 11, 2009 2:44 pm
by tendencydriven
I have used C# on and off for about two years now and I have no problem whatsoever with the language. Granted, I have only used it for non-game applications.
As for making games for the XBox, why not? Give it a shot, see what you think.
Re: XNA Game Studio / C#
Posted: Tue Sep 08, 2009 8:31 pm
by zNelson24
I have been using XNA for a while (
PONG Clone and experiments). Nice way to make games, and from what I've heard C# and C++ are somewhat similar languages. I have considered learning the industry standard C++ along the road once I have C# down (and learn all the concepts of proramming along the way).
Re: XNA Game Studio / C#
Posted: Mon Sep 21, 2009 2:31 pm
by captjack
vargonian wrote:The XNA libraries do have a lot of collision/intersection/vector/matrix classes which can make life easier for you but there's no requirement to use them. You definitely have to write your own physics libraries, etc. It just handles (in my opinion) the more annoying, repetitive details for you, like the low-level details of loading textures/models, matrix operations, memory management, and that sort of thing. But again, you could still do any of these manually if you really wanted to.
The libraries are included so you don't have to do all that rewriting. If you're having to rewrite the libraries then they weren't that good in the first place, in which case XNA would suck. Software reuse means a lot. For those who have no desire (or the technical understanding) of how a traditional game engine is developed, then XNA would be ideal. I see it as a huge wrapper around "the complicated stuff" - a RAD tool if you will. It certainly has it's place, and I might recommend it to some folks who "have no clue". That is to say, if I've never programmed a lick of C++ and DirectX/OpenGL/SDL/etc, then I'm far better off trying to learn C# and use XNA - the learning curve is much smoother and I can get a game out more quickly. With DirectX I have to make all the initializations and so on to get the thing ready (determine device types and adapter counts and which rendering pipeline to use...) XNA wraps all that in a few nice function calls.
My biggest beef, though, is the nature of C#. I don't care for a proprietary language. I don't see a reason to have what seems to be C++ done Microsoft's way. It's yet another language to learn and I don't have the time. I spent all that time getting proficient at C++. If my employer needs me to crank out C# code it's easier for me to quit and get another gig.
I also find C++/CLR (aka managed C++) a kludge to band-aid the flaws in Windows, but that's a different story.
I think the $100 a year to publish on XBox live is a glass ceiling to keep crap out of the pipeline. What really torques me is that to be a serious XBox developer you have to have the commercial SDK - and that thing is more guarded than the Crown Jewels. One has to be a large game studio to get that thing. (Anyone know about a PS3 SDK??)
-capt jack