XNA and Visual Studio
Much of what I might say will most certainly not be supported. Which is not a big problem as the I am sure XNA is not properly supported at the moment. But XNA is a VERY good set of tools to help people learn the process of games programming.
You might find that when trying to install XNA Game Studio 4.0
I found this post Installing XNA on Windows 8 with Visual Studio 2012. I followed this very post for Visual Studio 2013 and despite the folder differences and one MSI not installing, it worked.
Visual Studio 2013 will be within;
- \Program Files (for 32 bit versions of Windows)
- \Program Files (x86) (for 64 bit versions of Windows)
The folder referenced in this post is
Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft
So follow the post as it states with the follow changes;
Step 6. This MSI might not run. I ran this MSI and I found it caused an error. There could be a couple of reasons for this, the Main installed asks about enabling settings through the Windows Firewall before the installation starts but it might be just my machine. Is this required? My believe is, it enables the ability to communicate with the Xbox 360 components to perform debugging on a console (I did like this feature version much). But as the Xbox One is the console of choice from Microsoft and their next version of Visual Studio will have the support for the DirectX 12 games this will be moot.
Step 9. This is the path that will differ for Visual Studio 2013 over 2012. So each reference to “Microsoft Visual Studio 11.0” in the path replace with “Microsoft Visual Studio 12.0’
Step 11. Use the “Microsoft Visual Studio 12.0” path as opposed to “Microsoft Visual Studio 11”
Once this is complete then the framework will work in Visual Studio 2013 in Windows 8.
- Open Visual Studio (I was performing this in Visual Studio Community 2013 ).
- Click File | New Project
- Under Templates, look for Visual C# and you will find XNA Game Studio 4.0, click that item.
- Click Windows Game (4.0)
- Click OK
- Wait until the project loads and Press F5 (Click Debug | Start Debugging)
You will find that wonderfully familiar but also quite strange blank screen of a blank XNA project looking at you.
Why would I use XNA in Visual Studio 2013?
It is an interesting question. Microsoft has moved away from this framework in favour for a closer to metal approach with DirectX in Store/Phone or Universal Apps.
My opinion is, utilising the newer methods to create games is more difficult from an absolute beginner’s perspective. Game Development is tricky for seasoned developers if you think you know the way it works, but when starting new the XNA Framework offered a very simple perspective to getting simple things working on screen.
There has been many games released that were made using the XNA Framework (See 6 Partial list of games that use XNA for more information). But it is a shame in my opinion that Microsoft discontinued this as it was a great addition. I know why, unified platform was the direction they were heading, which is why when Windows Phone was released, Windows 8 and then an update to the Xbox 360 OS saw a common look and with Windows 10 they have brought all their platforms together creating an App for Windows 10, Windows Phone and Xbox One should now provide a single set of source. XNA thought simple merely muddied the waters as a game for Xbox and Windows had a the same content pipeline but created 2 different projects.
Why bother when the paradigm is changing with VS2015?
Visual Studio 2015 will provide support for DirectX 12 coming with Windows 10. It will also provide additional frameworks for game development in Cocos2d, Unity and Unreal Engine 4. Each of these frameworks are available and provide the ability. The benefits of these frameworks is cross-platform compatibility, XNA is not that.
This starts to become a personal problem, do I learn with Unity or Cocos2d, hell why not go for learning with CryEngine. You can and the tools are available there. Many might think that it is better to use the tools you might be using later. I can’t argue with that logic as it is sound. As long as you don’t get bogged down in the tedium of ensuring the Graphics devices are setup right, the content pipeline is able to properly and quickly convert your content into assets available for your code to use then great. XNA does this, setting up the graphics device is as simple as 2 lines of code.
GraphicsDeviceManager graphics; graphics = new GraphicsDeviceManager(this);
Drawing something to the display is almost as simple with a few more lines of code.
SpriteBatch spriteBatch; spriteBatch = new SpriteBatch(GraphicsDevice); spriteBatch.Begin(); spriteBatch.Draw(Game1.SpriteSinglePixel, new Rectangle(0, 0, Game1.SCREEN_WDITH, Game1.SCREEN_HEIGHT), Color.DarkGreen); spriteBatch.End();
And a blank provides you most of the code, lines 3 to 5 above are the only ones you need to add yourself to draw something to the screen. This isn’t a tutorial on coding XNA merely an example of the simplicity of it. I have yet to delve into Cocos or Unity to determine the simplicity or difficulty of it but I have had experience in XNA and have developed 3 games using it. And being a 20 year veteran of commercial application development and I have been trying to get into the Game Development side of it. I found personally XNA was simple enough to get me up and running quickly but also powerful enough to enable more complex things and larger games.
My games were nothing to write home about but I got them up and running in a short period of time.
Why, because I can. It has been a scourge of my industry for years the pace of technology and the people who use it, lag behind and you are lost. I spent years developing Visual Basic 6 applications and when time to come to find new work I found I was on the outer, .NET had taken over and it took me a few year of different jobs to build up my experience enough to be able to secure a .NET development role. So thinking alone these lines I should learnt to adapt quicker and move forward into using the new technology. But when I do not have the fundamentals of game development down, understanding the graphics process the content pipelines the waiting for action as opposed to reacting to action, each of these are vastly different in the commercial world and thus I need to get my head around them, but in order to get my head around the concepts I need to remove elements that can trip me up, like the technology, like languages like platforms.
Understanding things without those distractions will make my process a less painful one. And since I struggle to find time to be able to sit down and do any form of coding or learning in this area (let alone write a blog post, hence my LONG time absence) I need to be able to hit the ground running and get as much done as possible.
Want to go further
Once you have gotten into XNA you will find there is more to it than what Microsoft stopped with. Check out MonoGame which provide that extension to more modern platforms and also that Cross-Platform extensibility of the newer frameworks.
A game for my boys to play.