Wednesday, June 17, 2015

c# - How should I go about learning XNA?



I want to start learning how to make games in XNA, but I have no idea where to start! If someone could advise me on what pieces of software I need and some good books or tutorials to look at, that would be most helpful.



As for my current coding knowledge, I have some good experience with Javascript (in conjunction with HTML5 canvas). I'm pretty sure I would also need to learn C# to code with XNA, so keep that in mind.



Answer



If you understand the general programming fundamentals work - datatypes, classes, functions, etc - I would say go for it.


When I started learning C#, I did have games in mind, but started with developing console apps that, while they looked very basic, incorporated some advanced C# techniques, in order to better my understanding of the language.


Once you have an understanding of how C# works, I'd go ahead and download the XNA studio from here - http://www.microsoft.com/download/en/details.aspx?id=23714


You will want to start with learning SpriteBatch. Some good tutorials can be found here...



From there you can start experimenting with pixel shaders (on SpriteBatch, http://msdn.microsoft.com/en-us/library/bb313868(v=xnagamestudio.31).aspx ), and also matrix transformations ( http://www.david-amador.com/2009/10/xna-camera-2d-with-zoom-and-rotation/ ).


Once you have a good grasp of that, you can finally move on to using the graphics device to draw primitives and models using BasicEffects and custom shaders.


Good luck!



No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...