Microsoft XNA is a set of tools with a managed runtime environment provided by Microsoft that facilitates video game development and management. XNA attempts to free game developers from writing "repetitive boilerplate code" and to bring different aspects of game production into a single system.

The XNA toolset was announced March 24, 2004, at the Game Developers Conference in San Jose, California. A first Community Technology Preview of XNA Build was released on March 14, 2006. XNA Game Studio 2.0 was released in December 2007, followed by XNA Game Studio 3.0 on October 30, 2008. XNA Game Studio 4.0 was released on September 16, 2010 along with the Windows Phone 7 Development Tools.

XNA currently encompasses Microsoft's entire Game Development Sections, including the standard Xbox Development Kit and XNA Game Studio.

The name "XNA" originated out of the project's development name, Xbox New Architecture. Instead of being released under the Xbox name, the Xbox 360 was released (2005), and XNA came to stand for "XNA's Not Acronymed".

Latest Media

We're sorry, but no images, videos or audio files have been added to this gallery.

If you would like to share media with the community, sign up and you can.

Blog RSS Feed Report abuse Latest News: Finalizing multiplayer

About Terra Militia with 0 comments by Trigger01 on Aug 22nd, 2014

When I first set out with the Lidgren Network Framework and wrote the first lines of code for the multiplayer aspect of the game, I knew that I was delving into something more strange and complex than I ever had done before, even with the help of great technology. 

To waaaaar!

Studying 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond over and over it became clear that it would not be an easy task, but a rather daunting one. Even though technology has greatly improved since the time of Age of Empires, it was still a great struggle to single-handedly implement reliable multiplayer to a singleplayer RTS. 

What must be understood is that the logic behind multiplayer differs greatly in a RTS compared to first-person shooters, platformers, and other games where players control one or very few entities. 

Instead of sending data about every object in the world, which is not feasible for games with hundreds, or even thousands of interactive objects, only player input is sent. Each client will then have to rely on every other to make their calculations in the exact same order and way in order to perceive the same simulation. Now, this is not easily guaranteed. 

It was clear that something was wrong when on one screen player one was destroying the base of player two, and on the other player two was fighting off the assault. 


In debugging multiplayer and finding its issues I made a checksum that was calculated every 100 frames based on information of all active buildings and units in the game and then displayed on the screen. Using my stationary computer and laptop I could now play multiplayer matches and notice when the game desynced. 

However, as you might know in a RTS many actions are calculated per second and it was not yet clear what caused the desync, only approximately when. From this stage it was obvious to start logging exactly what was happening. I easily integrated this with the replay-saving system already in place. 

A log file could look something like this: 
1300 6A-37-5E-20-D5-11-51-6C-2C-A5-BF-01-92-35-68-6A 
1321 (Train)(B 1)(U 1) 
1348 (Order)(X 6459)(Y 5103)(X2 6458)(Y2 5112)(U 8)(B )(ATTACK False) 
1392 Unit spawned at 6432 5032 
1400 1B-7F-8F-8A-A4-6E-5D-F8-8B-8E-23-26-28-CB-72-46 
1432 (Order)(X 6990)(Y 4953)(X2 6990)(Y2 4953)(U 8)(B )(ATTACK False) 
1500 44-6A-CA-3E-E2-DC-5E-18-0A-B7-76-A7-25-09-27-D1 
1597 (PlaceBuilding)(X 107)(Y 77)(P 1)(U 8)(B 1) 
1600 BE-A4-7F-22-4C-6C-9C-33-88-ED-D7-37-F2-32-F6-FD 
1643 (Cancel)(B 1)(I 0) 
1700 1D-AB-E9-99-F0-9E-07-3B-63-1C-B0-C3-DA-7C-68-E1 
1726 (Train)(B 1)(U 1) 
1734 (Train)(B 1)(U 1) 
1788 Unit spawned at 6432 5032 
1800 0B-92-C9-3C-BE-AC-5D-A3-F0-24-E3-35-99-E3-A3-37 

Saving a replay file on both machines and comparing them made it easier to discover when and why a desync had occurred. If the checksum at step 1600 was different, but the one on 1500 the same, it'd be a good start to investigate what really happens when a building is placed and how it could of altered the game differently on different clients. 

Step by step

It was already obvious that it was not possible to play a whole match without players desyncing. Instead, now with debugging in place I continued by trying single actions one by one until it desynced. The first thing to be found was that some time after ordering units to chop some wood the game desynced. After a quick look at the code that revolved around this and nothing was found, it was tried on other resources than trees with surprisingly no desync issues. 

The only noticeable difference between trees and other resources were that trees shaken in random strength and direction upon being gathered from, meaning that the position was slightly changed. Under approximately 20 frames the position was moved back to its original spawning position. 

If a neighboring tree was destroyed while this was happening, the game would eventually desync. Because when a neighboring tree dies, a new interaction spotis created for the trees around it, and the position of the new spot is slightly altered to be in the direction of its owner position, in this case the surviving tree. 

Now, that the owners position has randomly altered, the interaction spot would be different on different machines, because the random seed was not synced for this purely cosmetic operation. When a unit then went to gather the tree from this newly spawned interaction spot, it would go a different length on different machines and would eventually screw up the whole game. 

Butterfly effect

If the gatherer would turn in its resources in just one frame later or sooner, perhaps a warrior would not be able to be recruited because of insufficient resources. Later on, this warrior will not be able to kill an enemy catapult that instead manages to get off that last shot to destroy a tower, and the simulation continues to drift apart until no resemblance between the two exists. 

When found, the issue was solved easily by giving resources a center position and a position at which it was rendered. The shake effect would now only alter the rendered position, and all was in peace. 

Barely the only issue

The issue with trees was just one out of many, and an example of what had to be handled in converting a singleplayer compatible mode to multiplayer. Among these there were also problems with optimization techniques not staying in sync and different regional settings on different machines giving different results resulting in desyncs. Had I written about everything, this had been a very long post. Expect more on this subject at a later point!


2012 2012 Indie

Updated 1 year ago Released Aug 16, 2012 Single Player Adventure

The Mayan calendar predicts the end of the world to fall December 21, 2012. To find the true answers to this prophecy Frank Mors finds himself in the...

39 Days to Mars

39 Days to Mars 39 Days to Mars Indie

Updated 6 days ago Coming 2015 Single & Co-op Adventure

39 Days to Mars is a co-operative steampunk survival-adventure game. You play as Sir Albert Wickes and The Right Honourable Clarence Baxter, two 19th...

A Virus Named TOM

A Virus Named TOM A Virus Named TOM Indie

Updated 2 years ago Released Aug 1, 2012 Single & Multiplayer Arcade

The game is an action-puzzler. The puzzle comes from rearrange circuits to spread the virus. The action comes from dodging anti-virus drones while doing...

Abuga: Warp Zone

Abuga: Warp Zone Abuga: Warp Zone Indie

Updated 1 year ago Released Oct 31, 2012 Single Player Platformer

Play as Abuga through nearly 50 challenging but exciting levels. Warping through..well warps..make your way from start to finish. Be careful though, not...


AcriD AcriD Indie

Updated 1 year ago TBD Multiplayer Tactical Shooter

AcriD is a fast paced multiplayer top down shooter game. Games can gather from 2 to 10 players forming two teams. Blitz through the map while controlling...

Post comment Comments  (10 - 20 of 23)
Jdawgg25 Jun 12 2013, 2:40am says:

Microsoft abandoned XNA but for the most part XNA is free to download, free to install on to Visual Studio and free to use. To port your game to Xbox 360 and test your programs on it, you have to download the XNA dev kit on 360 and it usually runs $100 per year to have this feature. It’s essentially a membership. You see this is great, because it allows anyone to test their games or programs on 360 for $100. That may sound like a lot but that is essentially your license with Microsoft to run the programs you create on 360. You see, years ago Homebrew games were illegal games ported to console platforms and the reason they were considered illegal is because many people porting their games they created to consoles like Xbox and PS2 did not have a license. XNA already existed. It was a dev kit for “Professional Developers”. So Microsoft create a free version of XNA for anyone to use in year 2004, before Xbox 360 launched. This diminished Home-brew games somewhat and allowed anyone to safely create games for 360 if they paid $100 per year. Check out MonoGames to port your XNA projects to other platforms. I recently found out about it.

+2 votes     reply to comment
Jdawgg25 Jun 12 2013, 2:38am says:

Just to be very clear, XNA is not a game engine. I don’t have any problems with people calling it a game engine but that doesn't fully make sense. XNA is not a game engine, it’s a framework. What I mean by that is, XNA essentially is a set of Helper Classes to help game developers save time programming their games. Those classes are saved into .dll files which are a set of library files. This is where I think Microsoft slipped up some on the “tools” part but I am starting to understand why I am confused when people are saying XNA is dead and turn to Unity. XNA does not come with features like tilemaps, particles, scripts, physics, level editors, etc. but if you are a XNA Community Member, you can go to their forums and download sample projects created by Microsoft to help you primarily learn about these things and save time creating your own. So you have to either create your own or use an existing engine built upon the XNA Framework. Unity is entirely a separate game engine of its own with its own physics engine, its own graphics engine, and its own support for multiple platforms, its own level editor… I think you get the picture.

+2 votes     reply to comment
zerglingno7 Apr 2 2013, 1:38pm says:

simple for game deverloper

+2 votes     reply to comment
Jdawgg25 Feb 3 2013, 3:26pm says:

XNA is a great resource and I am grateful to have it. I am programming and designing a game engine built upon the XNA framework. See more at this link:

The page will be updated gradually over time with more pictures, videos, and features. I hope you like it so far. Check it out and post comments letting me know what you think. With that said, just to be clear, I am not a professional game programmer with tons of experience. I am teaching myself and updating my engine as I go along. Thanks and I would greatly appreciate your support.


+2 votes     reply to comment
atsebak Aug 29 2012, 9:28pm says:

xna is great framework for 2d games too bad its not supported for visual studio 2012

+4 votes     reply to comment
Arethrid Jan 26 2013, 7:25pm replied:

Actually it is possible to make XNA work for VS2012 with some adjustments. Search for "Coding Made Easy" on youtube, he made a tutorial on how to do it.

+3 votes     reply to comment
#Tilbie May 6 2012, 11:36am says:

There is an error in the description: XNA stands not for "Xbox New Architecture", it stands for "XNA's Not Acronymed".
Also I have to agree that XNA is not an engine.

+8 votes     reply to comment
ds9490 Feb 9 2012, 7:25pm says:

XNA is not an engine it's a development libary it's just Direct X with some code already provided.

+12 votes     reply to comment
pulka103 Dec 29 2011, 3:14pm says:

Magicka is create on XNA and .NET 3(.5)

+2 votes     reply to comment
IceIYIaN Dec 7 2011, 11:43pm says:

Visual Studio 2010, C# / XNA Game Studio 4.0

+3 votes     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Windows, Mobile, X360
Send Message
Public Domain
Release Date
Released Dec 31, 2006
Engine Watch
Track this engine
Community Rating



49 votes submitted.

You Say


Ratings closed.

Highest Rated (2 agree) 9/10

It's not an engine, its a framework basically a template to directX. I really like it because it allows you to develop for 3 Microsoft platforms and can port them easily.

Jul 14 2012, 12:13pm by atsebak

Embed Buttons

Promote XNA on your homepage or blog by selecting a button and using the HTML code provided (more).

25 of 646
Last Update
2 days ago
100 members