[.net] [XNA] What have you discovered by playing with XNA?

Started by
18 comments, last by Moe 17 years, 6 months ago
Quote:Original post by Billr17
Its one of those, do I say screw the pipeline and write everything myself, or do I wait and reap the benefits.

Are you under some kind of deadline? If not, wait. Isn't there other non-pipeline code you can work on?

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

Advertisement
It just occured to me that XNA Game Components require you inherit a class and that C# does not allow multiple inheritance. Kind of lame if you ask me.
I haven't had a problem with it yet. I've whipped up almost a half-dozen components so far. I've rarely come across a need for multiple inheritance with C#. There's always interfaces, which you can implement along with inheriting from a base class in C#.

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

Quote:Original post by Krisc
It just occured to me that XNA Game Components require you inherit a class and that C# does not allow multiple inheritance. Kind of lame if you ask me.


While its true that you can only inherit from a single class, you *can* inherit from as many interfaces as you wish (in addition to a single class if you so choose.)

Honestly, I have never run into a case that was best solved by true multiple inheritance. The implimentation is sticky in languages like C++ and its considered to be a broken paradigm by many smart programmers (though I'm sure there are smart programmers who would disagree with them.)

throw table_exception("(? ???)? ? ???");

I've discovered that it took me 30 minutes to get something vaguely looking like a pong clone with no prior experience with XNA. That's what I discovered and it freaking rocks.

Quote:Original post by Ravyne
Quote:Original post by Krisc
It just occured to me that XNA Game Components require you inherit a class and that C# does not allow multiple inheritance. Kind of lame if you ask me.


While its true that you can only inherit from a single class, you *can* inherit from as many interfaces as you wish (in addition to a single class if you so choose.)

Honestly, I have never run into a case that was best solved by true multiple inheritance. The implimentation is sticky in languages like C++ and its considered to be a broken paradigm by many smart programmers (though I'm sure there are smart programmers who would disagree with them.)


Deriving the class you want to inherit from the game component class.
I teleported home one night; With Ron and Sid and Meg; Ron stole Meggie's heart away; And I got Sydney's leg. <> I'm blogging, emo style
I have discovered that if you get it installed, there is no reason at all why you can't use it with .Net languages other than C#. I was kinda annoyed that I had to download both C# Express and Game Studio Express just to use the XNA Framework assemblies in a VB.Net Project. It works just fine. I plan on using it for a lot of 2D graphics, but I haven't gotten that far into it yet.
Well, I think I just learned something new. You can't pass a GraphicsDevice by reference. So, does this mean the only way to do it is by value? That seems like a lot of memory copying going on, each time I need to use it in my own home grown modules.
Isn't a GraphicsDevice a reference type? Passing by value then means that the reference is copied, not the entire object!
Quote:Original post by Moe
Well, I think I just learned something new. You can't pass a GraphicsDevice by reference. So, does this mean the only way to do it is by value? That seems like a lot of memory copying going on, each time I need to use it in my own home grown modules.
I think what you're talking about is ownership of the GraphicsDevice object, which introduced the concept of GameServices and the GraphicsService to manage the creation and deletion of GraphicsDevices.
Rob Loach [Website] [Projects] [Contact]
Quote:Original post by ernow
Isn't a GraphicsDevice a reference type? Passing by value then means that the reference is copied, not the entire object!

Is that the case? If it is, sweet! [smile] I can't say I have done much more than reading a few simple tutorials, and my own poking around with XNA. Perhaps I should do a little more digging around in the documentation...

This topic is closed to new replies.

Advertisement