starting with xna

Started by
14 comments, last by iko 14 years, 9 months ago
I'm starting to get back into game dev, since I'm becoming disillusioned with the majority of the current gen of games. Back in the day, the most I ever did was some simple, tic tac toe type stuff using C++ and SDL though. I never was really able to get into intense graphics based stuff, and I doubt I would even have been able to make a mario clone. I struggled at one point to try to get an animation system working, but I don't remember if I ever completed it. I'm thinking of starting with XNA though. As far as I've seen, C# is supposed to be a much easier language. My question, though, is - do you think I would be able to handle making a 3d or even 2d game using XNA and C# on my own, given my previous level of experience and ability?
Advertisement
Absolutely.

C# is fairly easy compared to C++ even though it is a very similar language (hence the name), but you don't have to deal with messy pointers and all those #define's (I'll stop there before I start a flame war). XNA has some built in shaders to do the basics of 2D and 3D rendering for you (some texturing and lighting), it's quite possible to get a simple game going in a few lines of code.

Check it out at http://creators.xna.com/

Moved to DX/XNA forum
Ofcourse,
The thing to remember is that learning a new API and a language might be difficult. It's always good to start off with a language that you are already familiar with as it eliminates the frustration of having to deal with errors from both the API and the language.

If you are familiar /proficient with C++, try C++/CLI, if you hated all the crazy pointers, you could make the move to C# easily as the syntax is pretty much the same.
XNA is really userfriendly. When I started with game programming, I used Basic-languages like QuickBasic, and for a few days BlitzBasic. Then there was nothing for about 3 or 4 years, until I started learning C++ and C#. XNA is like a giant sandbox, that's how easy it is. You load an image file, and draw it on the screen, with less then 5 lines. Drawing a 3D model on the screen takes some more lines [about 15], and the maths aren't to be underestimated. But you'll get the hang of it pretty fast.

I'm close to finishing an animation editor. I had nearly no real experience in gamedev before that , and in less than a year I was able to import a model, add my own animation structure to it, save it, load it, and play the animation. XNA is really easy to learn.<br><br>XNA is like a wrapper around DirectX. And given the current XNA framework, you can do almost anything you want, from very basic functions to the advanced stuff. I would suggest that you just try out XNA and do a simple tutorial. You will be amazed how fast you will see your first results.
As the others mentioned, XNA is extremely fine-tuned in order to accomodate hobbyist and new game developers. If you were looking into learning some basic C# and get a basic XNA 'game' working I'd say you could finish that in 2 weeks with a good understanding of basic C# and XNA with only a few hours of programming a day.

I personally kind of new C# when I went to XNA (needed a bit of a refresher and didn't know some more advanced techniques) and I ended up building a full game (including doing all the artwork) and writing a series of tutorials on 3D in XNA.

I would say your biggest hurdle, as with most game projects, is the art/music assets to get into the game. But, simply from a programming stance of building some kind of engine it could be done relatively fast.

As Blitzwing mentioned, check out XNA Creators Club.

I'd also suggest simply reading over tutorials and seeing if you can relate some of the code with what you know in the hopes of finding some kind of common ground you can work with.

You can find lots of resources online including:
Ziggyware.com
XNA-Development
XNA-Resources
My XNA Tutorials (sorry, shameless self-promotion)

=============================RhinoXNA - Easily start building 2D games in XNA!Projects

Well, from looking around at tutorials and things like that, it definitely looks like something I can handle. Looks much easier than C++/SDL like before, and it seems to place much more of a focus on programming the actual game logic since the graphics part is much easier.

Hopefully I can get started with it soon, looking forward to making some games now. Do I have to pay to start making stuff, or can I just start developing on my computer? Btw I have a wired xbox 360 controller, which plugs into a USB port, so I can use that on my computer.
You can start developing on your PC for free. Currently all development using XNA and targetting the PC platform is free. And as long as you have the drivers for the controller you can program that.

To create games and such for the Xbox 360 you'll need a membership to the Creators Club. I believe currently it's $99 for a 1-year membership or $49.99 for 4 months. Though, you can find trial memberships online in certain places, the most notable being Dreamspark.

I biggest difference programming wise between PC and Xbox is essentially the hardware the Xbox uses. Also, you won't have access to certain built-in XNA libraries on the Xbox.

I'd suggest simply developing for PC when you start so you get a good handle on XNA and don't have to pay (unless you are a student and Dreamspark is available to you).

=============================RhinoXNA - Easily start building 2D games in XNA!Projects

What would be the best way to learn C#, given that I remember C++ pretty well? All the xna learning stuff out there seems to assume knowledge of C#.

Also, would you recommend buying an actual book, and reading that to learn xna, or will reading miscellaneous tutorials online be good enough?
Try http://riemers.net. He's got some really fine tutorials with step-by-step explaining. He handles 2D and 3D development. He helped me out really much when I started XNA.
Since you know C++, you should get the hang of C# pretty fast. Change -> to . and forget about pointers. You don't have to worry about ressource freeing, since the garbage collector gives you a hand, and he's doing a great job.

I used managed C++, and I got into C# perfectly fine.
System::Console->WriteLine("Hello World");
becomes
System.Console.WriteLine("Hello World");
#include is not used at all in C#, you're just adding references and use them by writing
using System;
using System.IO;
etc

You will see that it's a piece of cake.

This topic is closed to new replies.

Advertisement