Sunday, 8 July 2012

Programming in C# with XNA - Preamble

What I am going to try and do with this run of posts is to try and give guidance to those coming to XNA with absolutely no experience of programming. My intent is to give very high level posts on how to program in the context of XNA, from the very basics of project/solution creation, variable declaration, and on to some object orientated principles etc..

I have seen a few tutorials on getting started with XNA, but they all seem to assume a level of programming experience. I have actually found a useful link on the creators club here that points to a few useful Microsoft sites like Development for Beginners and the related C# tutorial. All great if you are learning to code, but they don’t give you the lessons in the context of XNA and I think for those out there that are totally new, this is a daunting task to put these two things together.

I remember way back in the 80’s as a young boy trying to learn to program on a ZX81 using ZX Basic and it took me ages to understand what a “variable” was! (For those of you who are new to programming, don’t worry, I will cover variables) Even now 20 odd years on, I remember the frustration this gave me, being on the first chapter or so of a ZX Basic book and not being able to progress because I could not take in this fundamental basic principle. So, that’s kind of my mission here, to try and break these things down, so those that come to them for the first time, can absorb them first time; and if not, then to ask for more detail. It wont be your lack of understanding, rather my poor explanation that will be at fault.

I wont be covering things at a great level of detail either, this is intended to get people into programming games in XNA using C# so some areas you may feel that I will be skimming over and indeed I will be as the intention is to get people involved in programming. I figure the next layer in can either be googled or, just ask for more details.

Remember, the most important thing you can do if you don’t understand something, is to ASK. If you don’t tell me you don’t understand what I am writing, then I can’t do anything about it. If you don’t feel confident enough to post here on the blog then please feel free to PM me here and I will reply as soon as I can and try and clarify the point you need clearing up.

I hope at the end of this set of posts a none programmer will be able to pick up XNA and confidently start to write some simple games, be able to display text on the screen, sprites, move entities about on the screen and maybe a bit more :)

I hope to get the first post out this week or next if I can, I will be working away from home for most of next month and so doubt I will be able to get much done in August.



  1. I'd love to learn XNA by using your tutorials, is there a specific area where c# tutorials are in your blog? I keep looking around but all i see is c++ :(.

  2. This whole blog is ALL C#, none of it is C++, at the top of this page there is another XNA/C# blog of mine, click the Adventures with XNA link, both that and this blog are ALL 100% C# and XNA

    1. I planning on to make video games, and i am wondering what would be more recommended for me for my goals, which is to make a basic game, would you recommend me to use unity? or stick to XNA c#?

    2. If you are just interested in game creation, rather than engine creation, and you want to get a game out quick, I would recommend Unity.