Sign in to follow this  
Goober King

[.net] Starting XNA

Recommended Posts

I've been giving the XNA stuff a quick look for a couple of days now. I've been thinking it may be nice to lean something new for a change. C# sounds like a good thing to learn as it will force me to start using classes which I haven't really used. I'm not really looking at it in depth as I do have a major project I don't want to shelf, but I am think a dabble here and there may be fine when I need a change of pace. Anyway I guess I'm wondering a couple of things. First to those who have been using it what are your general impressions? The idea of having provided model and texture loading so you can jump right into the game is appealing. I'm not a super coder and that low level stuff is probably better handled by the experts. My plan is to remake an old puzzle game I made back in the dos days, to learn on. Then I have a SmashTV kinda style game I want to one day do. I was going to use an old style tile system but the engine I wrote uses old Direct Draw which now runs like a turtle on booze. The other thing is I ran through the video lessons on XNA and loaded up the ol' spaceship model OK. I tried to load a basic cube model I saved using TrueSpace but it looks squished, not square. I'm not sure if it has something to do with crappy exporting or with aspect settings, or whatever. The aspect is computed by the current window settings so I'm leaning toward TrueSpace. I actually had to nab their free light version of GameSpace which is newer than my copy of TrueSpace, just to get something that would not error during the build process. Anyone had troubles importing models or know some simple do's and dont's about getting valid models?

Share this post


Link to post
Share on other sites
I like it so far since it's almost as easy as using pygame now!
Can't get much easier than:

graphics.GraphicsDevice.Clear(Color.Green);
// TODO: Add your drawing code here
sprites.Begin();
sprites.Draw(backgroundTexture, position, Color.White);
sprites.End();


just to get something up on the screen. Before even with managed DX you had to mess with presentation parameters,etc just to setup the videocard to get ready to draw something. It looks like XNA takes care of all those repetitive details like pygame.
Only thing I don't like so far is not being able to use VS2005 since I have alot of plugins,vtune,etc I like to use. And also don't like the fact that I need to use C# and not able to use VB.Net, which I used with managed dx, since I prefer using that since it's less typing and like python no need to add a semicolon to the end of everything so I keep forgetting my semicolons;)

Share this post


Link to post
Share on other sites
Well I just tried to import a cube exported by Blender but that was even stranger. The shading was all jacked up and it was very deformed. The TrueSpace model was squished but looked good.

Share this post


Link to post
Share on other sites
I've spent some years programming in C#. My last try of game programming was in directX (some years ago) and I found that quite hard (as in two weeks spent just in initializing the graphics).

After years not doing anything related to game programming, I picked XNA and built a working model of player controlled textured geometric shapes interacting over a plane with nice ODE physics in about three days.

If you learn C#, it can't get much easier than XNA. The next step would be sending a mail with the description of your game and 50$ to the developers and receiving the game.

Share this post


Link to post
Share on other sites
I had never used C# when XNA came out. I decided to create a pong game to get a feel for the language and the toolset. I had it done in about 2 hours (again I had 0 experience with the language). After doing the pong game I made a couple of prototypes in under 30 minutes and I felt pretty comfortable with the language.

It's a really easy language to pick up on (assuming you already know a class based language) and XNA is a great tool. It really does take out all the annoying things of game creation. If I want to create even a simple game in Direct3D I have to create a crapton of framework files, set up all sorts of parameters and devices, and making sure I am freeing up resources properly. With XNA you can spend a lot more time on the meat of the game.

Share this post


Link to post
Share on other sites
I just started xna today--and so far I like it better than MDX. What's cool is that there are a bunch of really good tutorials out for it.

I am attempting to port my mdx engine/game over to xna. So far its been going good. I will have to rewrite all of the render methods, and loading assets is completely different.

So far my only complaint is that the gui stuff appears to be pretty limited, and there is no native mouse support (I spose I can still call directinput).

On the plus side I was able to implement bloom shading in about a half hour of screwing around.

Share this post


Link to post
Share on other sites
Quote:
Original post by spartanx
Sadly, decent .X file exporters are few and far between (I assume that was the format you tried). Have you tried exporting and loading .FBX?


Well I would have tried it but I don't have anything that will export to fbx. I need to try the GameSpace again. I may have squished my cube on accident. Surly I can get a flippin' cube. Still I hate the idea of spending time on some project in the future and finding out I cant get it loaded to save my life.

edit: Tried it, could be square not sure, hard to tell. Screw it I'm going to Disneyland ........or wherever sleep takes me.

Share this post


Link to post
Share on other sites
Quote:
Original post by Goober King
I take it nobody has had any trouble importing models?


I had no trouble importing them, I had trouble exporting. The trouble lasted until I found a 3dsmax plug-in to export to .x

So, just a bit of googling and trying about five or six plug-ins (and some free modelling apps but I didn't really want to use anything but 3ds).

Share this post


Link to post
Share on other sites
Quote:
Original post by nordwindranger
and there is no native mouse support (I spose I can still call directinput).


And what is the Microsoft.Xna.Framework.Input.Mouse class then? ;)

Share this post


Link to post
Share on other sites
I've been wondering about this too.

Is XNA a simple library that takes control over everything, and you can't customize anything? Can I load my own 3d model format, or write my own mesh renderer, or is it all forced to be handled by a pre written XNA routine?

Is there built in skeletal animation stuff, and how limited is it? I hate when all that is supported is simple playback of single animations with no ability to tweak things (like bending a head to look at another object).

What can you do with stuff you create in XNA? Commericial release? Or is it just for hobbyists?

Share this post


Link to post
Share on other sites
Quote:
Original post by ChurchSkiz
I had never used C# when XNA came out. I decided to create a pong game to get a feel for the language and the toolset. I had it done in about 2 hours (again I had 0 experience with the language). After doing the pong game I made a couple of prototypes in under 30 minutes and I felt pretty comfortable with the language.

It's a really easy language to pick up on (assuming you already know a class based language) and XNA is a great tool. It really does take out all the annoying things of game creation. If I want to create even a simple game in Direct3D I have to create a crapton of framework files, set up all sorts of parameters and devices, and making sure I am freeing up resources properly. With XNA you can spend a lot more time on the meat of the game.


At this point I'm going to say your better that I. I'm finding it all sort of a jumbled mess. The classes, classes, and more classes thing is hard for me to follow around. Its sort of like trying to pick out words in alphabet soup. Then the documentation is kinda like having a spiderweb for a road map. Seems like I had less trouble with the Raw DirectX SDK docs.(though I never got into the hard stuff). Maybe its just because I'm not used to it but Its a lot of pieces which I can't figure out how they all fit together. I tend to get real uncomfortable when I don't know how everything ties in together making me very not happy right now.

I get alot of what I see but I'm not real sure what I need know and what is documentation for things I don't need to understand just be able to use. I get all the stuff in the getting started videos for the most part but I want to be able to do better than that. Otherwise its kinda like what's the point.

I'm sure I can make the puzzle game I want but I can't do it the way I want, until I can get the blocks to look right. I can get a solid colored block in but I need it to shine. I want shiny irregular blocks simmilar to those polished rocks you can buy. From what I see on XNA sites I like the look of the normal and cubemaping. However even tough the demos work great I haven't had much luck using my own model. Then there is the whole issue that I want to be able to color the cubes, and randomly use several deformations to make the blocks less repeditive. After that can they even be mixed? Its looking like I will actually have to learn about a bunch of stuff which may or may not be over my head. This is starting to look less like simple side project and more like a project.

Share this post


Link to post
Share on other sites
Quote:
Original post by Vampyre_Dark
Is XNA a simple library that takes control over everything, and you can't customize anything?

Almost every single tiny piece of XNA can be replaced by a custom tiny piece made by you that modifies this particular behavior. However, You won't use this "feature" in any simple project or most of the non-simple ones.

Quote:
Original post by Vampyre_Dark
Can I load my own 3d model format, or write my own mesh renderer, or is it all forced to be handled by a pre written XNA routine?

You can. If I understand correctly what you want, though, it would require quite a lot of work. Just out of curiosity ¿Why would yo want to make your own mesh renderer?

Quote:
Original post by Vampyre_Dark
What can you do with stuff you create in XNA? Commericial release? Or is it just for hobbyists?

It's meant to make hobbyists use it for simple things so they learn it and use it in professional environments. Then Microsoft will be able to monopolize the commercial game business for some more time.

Ok, yes, it's perfectly prepared to make professional games with it, but take into account many games have requirements that need unmanaged code (if your c++ games sometimes use assembler for critical parts, forget about making them in xna).

Share this post


Link to post
Share on other sites
Quote:
Original post by Zanshibumi
Ok, yes, it's perfectly prepared to make professional games with it, but take into account many games have requirements that need unmanaged code (if your c++ games sometimes use assembler for critical parts, forget about making them in xna).



you can still use assembler with XNA but only for PC Builds. I am not sure if the 360 accepts the same assembler instructions that your PC would as the 360 uses a light version of .Net 2.0 and a go between model of DX9.0c and DX10 as far as i know. But as microsoft currently only allow non-commercial(free) games to be made for the 360 all commercial ventures will no doubt be made for the PC meaning assembler instructions are still valid.

If anyone knows more recent info it would be interesting to know.

Share this post


Link to post
Share on other sites
Quote:
Original post by fanaticlatic
Quote:
Original post by Zanshibumi
Ok, yes, it's perfectly prepared to make professional games with it, but take into account many games have requirements that need unmanaged code (if your c++ games sometimes use assembler for critical parts, forget about making them in xna).

you can still use assembler with XNA but only for PC Builds.

What I meant is, "if your game is going to have this kind of requirements, maybe you should stick to C++."

Share this post


Link to post
Share on other sites
Quote:
Original post by Zanshibumi
Quote:
Original post by Vampyre_Dark
Is XNA a simple library that takes control over everything, and you can't customize anything?

Almost every single tiny piece of XNA can be replaced by a custom tiny piece made by you that modifies this particular behavior. However, You won't use this "feature" in any simple project or most of the non-simple ones.

Quote:
Original post by Vampyre_Dark
Can I load my own 3d model format, or write my own mesh renderer, or is it all forced to be handled by a pre written XNA routine?

You can. If I understand correctly what you want, though, it would require quite a lot of work. Just out of curiosity ¿Why would yo want to make your own mesh renderer?

Quote:
Original post by Vampyre_Dark
What can you do with stuff you create in XNA? Commericial release? Or is it just for hobbyists?

It's meant to make hobbyists use it for simple things so they learn it and use it in professional environments. Then Microsoft will be able to monopolize the commercial game business for some more time.

Ok, yes, it's perfectly prepared to make professional games with it, but take into account many games have requirements that need unmanaged code (if your c++ games sometimes use assembler for critical parts, forget about making them in xna).


I have no need to make a custom renderer, I was just trying to understand what XNA was. I tried it out last night, I built the space shooter demo, but after it built, I couldn't find a 'run' option anywhere, only a publish option. [lol]

Share this post


Link to post
Share on other sites
Quote:
Original post by Vampyre_Dark
I have no need to make a custom renderer, I was just trying to understand what XNA was. I tried it out last night, I built the space shooter demo, but after it built, I couldn't find a 'run' option anywhere, only a publish option. [lol]

F5/Ctrl+F5 or Debug | Start Debugging/Start Without Debuggin on the menu.

Share this post


Link to post
Share on other sites
Quote:
Original post by Machaira
Quote:
Original post by Vampyre_Dark
I have no need to make a custom renderer, I was just trying to understand what XNA was. I tried it out last night, I built the space shooter demo, but after it built, I couldn't find a 'run' option anywhere, only a publish option. [lol]
F5/Ctrl+F5 or Debug | Start Debugging/Start Without Debuggin on the menu.
Where is this in the menus at the top? I looked all over, I looked in the solution menu with right click.

Share this post


Link to post
Share on other sites
Quote:
Original post by Vampyre_Dark
Quote:
Original post by Machaira
Quote:
Original post by Vampyre_Dark
I have no need to make a custom renderer, I was just trying to understand what XNA was. I tried it out last night, I built the space shooter demo, but after it built, I couldn't find a 'run' option anywhere, only a publish option. [lol]
F5/Ctrl+F5 or Debug | Start Debugging/Start Without Debuggin on the menu.
Where is this in the menus at the top? I looked all over, I looked in the solution menu with right click.


I don't think its there. You can press the little green play Icon up top though.

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