Click here to Skip to main content
15,887,214 members
Everything / XNA

XNA

XNA

Great Reads

by Adam David Hill
All the juicy tricks and scandalous shortcuts which helped us ship our competition game on time
by Tyler Forsythe
IceCream1945 is a demonstration of XNA and the IceCream 2D library in a 2D top-down scrolling shooter similar to 1942 for the NES.
by Adam David Hill
Sensor-controlled XNA tunnel game with VR head-tracking.
by Simon Jackson
Some of the other frameworks which use XNA as a baseline.

Latest Articles

by Patchrick
Learn the basics of game development in C# and MonoGame
by Bruno Sonnino
MonoGame is an open source implementation of the XNA application programming interface (API).
by Geoff Arnold
fter participating in an earlier Intel contest, developer Dave Gannon took on these challenges, coming back with a vengeance with Wormhole Pinball, the winning app in the games category in the Intel App Innovation Contest 2013 in partnership with the Intel® Developer Zone.
by valentasm
Silverlight and XNA animation class with automatic animation and flexible sprites loading.

All Articles

Sort by Title

XNA 

6 Apr 2011 by Olivier Levrey
I think you will have more answers if you ask your question here (in the XNA section): http://forums.create.msdn.com/forums/[^]
6 Apr 2011 by Tomoash
Hi, I try to do some driving simulator with intro menu and driving with colision... but the video is allways in loop and i have to stop it with key... i don´t know how to exit game when i hit exit ;-) and finally i don´t know how to do a collision :-( itś difficult for me do this game to this...
22 Mar 2011 by Ognjen2
I'm trying to build a 3D game from a 2D game. Can you give me some hand about it? Do you know where can I find free .fbx and .x models?
22 Mar 2011 by Eduard Keilholz
I found this[^] great beginners guide to 3D development. About finding 3D models, check google, I found this[^] library in no-time!
12 Dec 2011 by MetaMapper (Andy Powell)
Learn 3D programming with Silverlight-5 and XNA
25 Mar 2013 by tharindutpd
Hi,For my university project i'm going to develop a system to translate English text into 3D animation to display sign language . so i was created some 3D character animation using Blender and export them into FBX file format. So now i want to know how to load this character animation using...
2 Apr 2011 by vankaandreev
Learn how to use 3D graphics and effects for Windows Phone 7.
13 Sep 2011 by steersteer
Thank you very much for your response. I am thinking of developing a small game. will learn XNA soon.
26 Jun 2011 by DaveAuld
XNA is a effectively a Game engine XNA Wiki[^]WPF is Windows Presentation Foundation WPF Wiki[^]Check out the articles on CodeProject, for example, here is a WPF 3D Primer[^], there are plenty other ones.So, for 3D, WPF certainly is an option :)
12 Dec 2011 by ge-force
It depends on what you want to do in your game.WPF is better for small games, because you get all the controls that you can put down on your Window without having to custom-make controls.XNA, however, cna do some amazing stuff.Here are a few games by XNA:Robot Game (3rd person 3D...
24 Apr 2012 by shelby67
I can't get my 3D model to display, I think it might have to do with the draw order inside of my Draw method. The part I'm working on is the aircraft selection menu I'm making for a flight sim.Here's my code:using System;using System.Collections.Generic;using System.Linq;using...
26 Sep 2013 by alireza ghasemi
I'm working on a simulator that models very complex interactions between many objects, and I mean millions.I've used XNA because of the useful things that it lets me do easily, especially with the rendering.My problem is that I'm running into OutOfMemoryExceptions after only a few...
26 Sep 2013 by Sergey Alexandrovich Kryukov
Compile the project to the "Any CPU" platform.—SA
19 Aug 2013 by Deviant Sapphire
Hello Codeproject,I'm created a Minecraft 2D Clone.I draw every block via the screen size(So I can find the middle of the screen).But when I change the screen to 'FullScreen' it moves the middle point to the left of the screen, is there any way to fix this?Here is my code:/* Screen...
19 Aug 2013 by Deviant Sapphire
After a few hours of Googling I came across the code I should have used, and that is this:/* Set the screen's size(Width and height) to the chunk width and height. */GraphicsManager.PreferredBackBufferWidth =...
15 Apr 2014 by Simon Jackson
A new breed of samples for MonoGame
26 Apr 2013 by shane79
I am writing a program in Windows phone emulator Visual Studio 2010. The program is a scrolling tile engine which has a set of waypoints for an attacker to follow on a path. I have this part working and now I am trying to get a turret to rotate in the direction that the attacker is taking. I...
2 Jul 2014 by Keith O. Williams
I have a ping pong game that I want to connect to a classic ping pong game, however I don't know who to connect the two together. How do I add menu items on the form for the bold sections of my code?Here is the code (I hope I done it right): Public Sub New() Title =...
1 Jul 2013 by Dan Colasanti
Advertising Network Options for WP7 XNA Games – Revisited
10 Jul 2011 by Joel Ivory Johnson
A proof of concept for an animated sprite component that I am developing to run in XNA projects on Windows Phone, PC, and Xbox. The component allows animation information to be a part of the project's content and is a step in the direction of allowing an artist to be completely over creating animati
20 Aug 2012 by nineggs
Hi,I am new in XNA and I am having some issues with my project. The aim is to create a virtual arm prothesis in augmented reality and to animate it thanks to electrode place on a patient.I found some tutorial to animate 3D skinned model with bones in virtual reality, but nothing in...
21 Aug 2012 by nineggs
In fact the problem is that I can not import the model as it is showed in this article: "Animating single bones in a Blender 3D model with XNA", for augmented reality since I use, like in the tutorial 8 of GoblinXNA, an other kind of model:"using Model = GoblinXNA.Graphics.Model;". Do I have...
24 Jul 2011 by Alan Boldock
Many available demonstrations and tutorials demonstrate how to play an animation generated in a 3D application. This tutorial demonstrates how to manipulate a 3D model using only the code to find and manipulate Bones within a simple 3D model generated in Blender.
7 May 2013 by zoyobar
I will explore and learn XNA for Windows Phone with you.
15 Jul 2011 by DominicZA
Im busy working on a top down shooter in XNA and would like to know which is the best pathing algorithm? I have implemented the A* algorithm but this takes a while to calculate the path. Which algorithm do major game developers use in their games?
15 Jul 2011 by Gordon Beeming
you could try using Dijkstra's algorithm some links to help http://g4ac.co.za/dijkstra[^]http://g4ac.co.za/wVmcC[^]
16 Jul 2011 by Philippe Mori
Check that also:http://en.wikipedia.org/wiki/A*_search_algorithm[^]
25 Mar 2013 by Daniel M. Kane
A RenderTarget2D-derived class to blend textures at runtime that internally deals with some common headaches.
12 Apr 2011 by Vinit Yadav
In this article we are going to develop a game using Farseer Physics Engine and XNA for Windows Phone 7. This article provides you base for your games to make game development easy and fast.
7 Jan 2014 by Masoud Darvishian
In this simple tutorial, we want to create a scrolling sprite-based star field background using Xamarin Studio and MonoGame.
20 Aug 2014 by valentasm
Silverlight and XNA animation class with automatic animation and flexible sprites loading.
15 Jun 2013 by Ghost_x
Hello, I'm trying to draw a terrain using the points given by this function:public static Level GenerateDummyLevel(int width, int height) { Level level = new Level(); bool up = false; for (int i = 0; i
19 Aug 2012 by C.CoderCreator
This is my code public Vector2 theclickedpoint; public Boolean clicked = false; protected override void Update(GameTime gameTime) { // Allows the game to exit if (Keyboard.GetState().IsKeyDown(Keys.Escape)) Exit(); ...
21 Aug 2012 by WebMaster
Unfortunately what you are asking for isn't the easiest thing in game development, so I can't provide an excellent example.Assuming your sprite is at a starting location, as soon as a new target is established (your touch point), you need to run a calculation to determine the path.You...
28 Aug 2012 by C.CoderCreator
this is the post i found on the Internethttp://www.gamedev.net/topic/535726-xna-pixel-based-terrain-deformation/[^]it has the code but i don't know how to load it or use it, but i want to be able to make kind of 2d distructable envierment, like worms open warfare, i was wondering if...
28 Aug 2012 by Sandeep Mewara
- Video tutorial- code- sconce code for the whole game It does not work like this here. You are talking of something very specific. Here is what is expected of enquirers:1. TRY first what you want to do! You may find that it's not that hard.2. Formulate what was done by you that...
20 Apr 2011 by mauricemcse
I write to inquire about an XNA "corner" on this site. My queries could not locate one. I seek guidance on the development of the graphics environment for games developed in XNA/C#. Much thanks in advance for an informed reply.
20 Apr 2011 by AspDotNetDev
There is not a section of this site dedicated to XNA, though there are articles on XNA and you can ask any XNA questions where you asked this question (in Questions & Answers). You can also give the XNA community forums a try.
14 Sep 2014 by swapnil999
Quick question:What is the use and meaning of Color[,] and Color[]Can you explain with examples?
14 Sep 2014 by Richard MacCutchan
You could easily find the answer by reading some C# documentation, such as http://msdn.microsoft.com/en-us/library/aa691346(v=vs.71).aspx[^].
3 Jan 2013 by WajihaAhmed
I read this blog:http://blogs.msdn.com/b/astebner/archive/2012/09/29/10354437.aspx?CommentPosted=true#commentmessage[^]which says that XNA can be used to create apps for windows phone store, but in another msdn article, it says that You can’t create new XNA Framework apps that target...
7 Feb 2013 by Jeff Blankenburg
Yes, you can use XNA in Windows Phone 8. Open Visual Studio, File > New Project, and choose Windows Phone as your template category. You'll see this:[Screenshot]However, the MSDN article IS correct. If you want a full XNA solution, you're going to need to target the Windows Phone 7.1...
7 Jan 2013 by Adam David Hill
All the juicy tricks and scandalous shortcuts which helped us ship our competition game on time
3 Dec 2012 by Adam David Hill
Sensor-controlled XNA tunnel game with VR head-tracking.
25 Oct 2012 by haitrieu749
I want to check the collision of one model with another model.I use collision check function as follows://Built Bouding Sphere private void builtBoudingSphere() { BoundingSphere sphere = new BoundingSphere(Vector3.Zero, 0); foreach (ModelMesh mesh in...
9 Nov 2012 by haitrieu749
Plan to split into smaller pieces to review collision.It can be a solution acceptable. Use BoudingSphere to check that pieces.Example: the airplane, split: head airplane, tail airplane, wing airplane. And check each part for collision.
20 Apr 2009 by Inaki Ayucar
Collision detection in XNA
16 Jun 2013 by harvs899
Ok I need to check if a mouse click has clicked on a rectangle, obviously this is trivial when the rectangle hasn't been rotated, but when it has it gets harder. After reading quite a few posts I believe you have to reverse the rotation of the point and rectangle (I have moved rectangle to...
16 Jun 2013 by Member 9856173
A rectangle has four Points. You have to get the position of those four points after rotation by multiplying the position of point with rotation matrix. Then create a 2D plane from every two points which make a wall of the rectangle. Now you can check whether the mouse position is in front of...
3 Mar 2013 by aloneintherain
HiI want a contact detection algorithm to detect collision between 2 ball (2D). I used this algorithm but it doesn't work well, Please Help me.//in Ball Class:public bool Collides(Balls otherSprite){ // Check if two Ball collide if (this.rectangle.X +...
3 Mar 2013 by Richard MacCutchan
Try using the Rectangle.Intersect Method[^].
3 Mar 2013 by CPallini
Well, if you want to detect collision between two balls then the condition should be (subject to Sergey's approval :-D). (XC0-XC1)*(XC0-XC1)+(YC0-YC1)*(YC0-YC1)
5 Mar 2013 by Yossi Yaari
I think the best solution combines both comments above, and should look something like this:if( ! Ball1.IntersectsWith(Ball2)){ return false;}double Ball1CenterX = (Ball1.Right - Ball1.Width)/2;double Ball2CenterX = (Ball2.Right - Ball2.Width)/2;double Ball1CenterY =...
9 Apr 2012 by ITSparrow
Hi,I would like to ask your help in the following problem.I'm creating a desktop (Winform) game application in XNA. I have a collection of points what I use to draw a polygon.I would like to use this polygon to draw a building on the game level.My question is how should I draw this...
13 Apr 2012 by SASS_Shooter
Have you Googled for any XNA 3d building tutorials?
20 Apr 2012 by nitzan1
Hi,I want to learn how to make a game I started to look what language to learn and how to do it.I want to create a 3D game. I know that to create a 3D game like GTA IV is impossible for 1 person, so I'm not talking about a game like GTA IV, but still something good that in the future I will...
20 Apr 2012 by Aescleal
If you want skills that'll translate into the games industry on desktop computers NOW then learn C++ and about DirectX on windows. Every games shop I've worked in has been exclusively C or C++, apart from mobile phone games which were J2ME.One problem with C++ is that consoles (apart from...
20 Apr 2012 by Espen Harlinn
Have a look at this page:List of game engines[^]Best regardsEspen Harlinn
20 Apr 2012 by Clifford Nelson
Here is a site for programming games in C# and XNA: http://www.freewebs.com/campelmxna/tutorials.htm[^]. It is not very hard. A group did a simple game program at my school using C# in only a week or so.
15 Nov 2014 by paulrm
The matrix code in my directX model from which I am creating the plane below looks like this;FrameTransformMatrix { 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 2750.0, 0.000163, 0.000143, 1.0;;}In C# I can create a plane from existing points in the...
16 Nov 2014 by Andreas Gieriet
Given the plane vector [n] at a given point [p], and you have an object model at the absolute origin, and you want to render the object at point [p] aligned with the plane, then you must find the following transformation:T1 = rotate the absolute x-z plane around the absolute y-axis by the...
30 Oct 2012 by Inaki Ayucar
How to develop a MatrixStack in pure managed C# code (ready for XNA)
16 Oct 2014 by Bruno Sonnino
MonoGame is an open source implementation of the XNA application programming interface (API).
25 Mar 2011 by Lasse TM
I need a function that return if a certain point is inside a directx 3d model(.x)...I have tried but i can´t get it to work so i need some help.Something like this:public bool IsInsideModel(Vector3 point, Model model){ //This would of course be nice but i don't think such...
21 Mar 2011 by CDP1802
The good news: it can be done. The bad news: A precise test is computationally expensive and therefore probably too slow to be of any use in real time rendering.First off, it works only on convex objects. Concave objects would have to be broken down into two or more convex objects and then...
31 May 2011 by fithri
Hi, i have some problem..I want to show images and capture the cursor position according to coordinates / pixel image coordinates not screen,,approximately how??please help me...
28 Jan 2012 by ge-force
Hi,You would first get the touch location, which is very simple (and you probably already know how to do :-)).Next, create a source rectangle (a rectangle that specifies part of the image), and set it to the touch position, with about the size of a finger (maybe 64x64).Finally, you...
7 Feb 2013 by Simon Jackson
Does lightning really strike twice?
16 Oct 2014 by Geoff Arnold
fter participating in an earlier Intel contest, developer Dave Gannon took on these challenges, coming back with a vengeance with Wormhole Pinball, the winning app in the games category in the Intel App Innovation Contest 2013 in partnership with the Intel® Developer Zone.
10 Nov 2013 by alireza ghasemi
HiI have more than 20000 circles that moving in screen. I use XNA and c# to develop my project.I have to check collision between them. so it take too much time.I want a codes that written in c# to solve this program. in other hand i try to find neighbor list algorithm code in c#.can...
10 Nov 2013 by Mehdi Gholam
Read this : http://stackoverflow.com/questions/2544431/collision-detection-of-huge-number-of-circles[^]
13 Jul 2014 by Francisco T. Chavez
I've been building a small racing game in C#, and I've hit a bit of a block when it comes to the impulse resolution of the car to car collisions. At the moment, the cars are able to hit and push each-other, but there's no resulting rotation from these collisions. The problem I'm having is...
16 Nov 2013 by Francisco T. Chavez
I ended up using the point of minimum extent along the normal axis, from CarB. It's the possible solution I mentioned in the question. Things are a little bouncy, but I think that has more to do with the constants I'm using. Besides, most people that have tried the game out tend to get a bit of...
12 Jan 2014 by C For Code!!!
HI guys,I know its not a good thing ask here but after searching a lot on Net I had to come here to ask.Apology in advance if you think its not a question to ask here.I want to learn game programming in c++.Please suggest me some go through series of turorials/books/Videos by series...
13 Jan 2014 by Maximilien
Programming a game is easy.There are tons of toolkits available: http://en.wikipedia.org/wiki/List_of_game_engines[^].The main difficulty is creating and designing the game "experience" and this is done as far away from a computer as possible.Gameplay storyboarding, graphic design,...
21 Mar 2011 by CDP1802
And another good link:http://www.riemers.net/[^]
21 Mar 2011 by XNAndroid
HiI'm beginner in game programming and I need some good resources to start(some books or video tutorials and examples). I need the fastest way to learn it(XNA and DirectX games or even something else). So if you can give me something to start with fast I'll be grateful. Yeah and I would like...
21 Mar 2011 by fjdiewornncalwe
For XNA stuff I would go here. You can download sample games to learn from and has a pretty good user community as well.
2 Feb 2012 by ge-force
You can also go to the App Hub: http://www.create.msdn.com/
15 Jul 2012 by WillzWazHere
Updating Question...Updating Question...Updating Question...Updating Question...Updating Question...Updating Question...Updating Question...Updating Question...Updating Question...Updating Question...Updating Question...
31 Mar 2013 by Yvar Birx
Hello codeproject happy easter,I am currently generating chunks with random blocks, however,when I do this, the whole chunk is either grass, dirt, or stone, or air,I am not sure why and that's why I came here. The new random always stays the samein the void. I don't know why but it's...
31 Mar 2013 by Shahin Khorshidnia
HiTry this:var randomNumber = new Random();/* Loop through the chunk to generate. */ for (int i = 0; i 0) { var r...
31 Mar 2013 by Maciej Los
Try to generate random numbers outside the loop./* Loop through the chunk to generate. */ for (int i = 0; i 0) { int r =...
29 Apr 2013 by bedarob
Hi!I'm using GoblinXNA for my university project and I have a little problem with it. When I set the pivot point in the 3DS Max and export it to FBX, the XNA uses the MAX's origin to the pivot point of the object, but i want the the pivot point in the GoblinXNA to be the pivot point of the...
14 Feb 2015 by littleGreenDude
I'm using VS 2012 update 4 and MonoGame 3.3.My game compiles, builds and runs on the emulators in debug mode. When I switch the compiler configuration to Release for Any CPU, I get error messages 'The type or namespace name 'Xna' does not exist in the namespace 'Microsoft' (are you missing...
16 Feb 2015 by littleGreenDude
Unfortunately the WP8 version of MonoGame doesn't support "Any CPU", so you have to switch back and forth between x86 (for running in theemulator) and ARM (for running on a real device, and for publishing to the store). Also found this...
15 Oct 2012 by haitrieu749
I'm beginner in HLSL(High Level Shader Language XNA 4.0). Write code HLSL is very hard beause it's not have function Visual Intelligence and formula's optical is very hard . Write code HLSL in Visual Studio like write in notepad. Can you tell me program write code HLSL best and explain...
15 Oct 2012 by CDP1802
Sorry, but it's not quite clear what you are looking for. My best guess is that you want a visual editor for shaders that gives you a sample of what the result looks like.Wow. I just searched for HLSL editors and only got results for text editors with syntax highlighting or intellisense....
26 Nov 2011 by ge-force
I have been converting the Robot Game Starter Kit to 4.0 and Reach on PC. But for some reason, I can't get the booster flame to show correctly. All of the other effects (lens flare, gun flames, explosions), work great, but only black lines come out of the booster engine when turned on.Here...
26 Nov 2011 by ge-force
Actually I figured this out. The textures were being rendered with the wrong sprite batch arguments, and so it didn't work.This was also an effect of switching to the Reach profile, which does not support everything HighDef does :(.But, I know what's wrong now.P.S. And thanks for...
29 Nov 2012 by Tomas Slavicek
New version of the popular game, with multitouch support
4 Mar 2013 by aloneintherain
Hello Dears, I'm an engineer and I work in CFD simulation.I have some equation. I want to calculate this equations in every micro seconds, This means that XNA every micro seconds must be calculate new position of things for next step & visualization. There are timespan property in XNA but...
22 Apr 2013 by HarkBack
Hi! I found a lot of similar themes. But have not found a solution to the problem for Linux.public Game1 (){ graphics = new GraphicsDeviceManager (this); graphics.PreferredBackBufferHeight = 600; graphics.PreferredBackBufferWidth = 800; Content.RootDirectory = "Content";}Size...
8 Jul 2014 by Dimitris K.
This is a long standing bug that involves (as far as I can tell) OpenTk and MonoGame. Probably the best solution, for the time being, is to set the Window.AllowUserResizing property like so:public Game1(){ graphics = new GraphicsDeviceManager(this); Content.RootDirectory =...
3 Apr 2013 by Yvar Birx
Hello Codeproject,I am currently developing a game, this game isbased on Minecraft, I am having a problem withgenerating perlin noise. Basically, what I wantto do is create a perlin noise that can be generatedby the few factors(Perhaps a class even)public double X...
3 Apr 2013 by Kenneth Haugland
Im assuming that this is what you want:http://devmag.org.za/2009/04/25/perlin-noise/[^]It was just a quick search away :-)
3 Apr 2013 by Sergey Alexandrovich Kryukov
You can also find some implementations here: http://en.wikipedia.org/wiki/Perlin_noise[^].Even the original code by Ken Perlin can be easily translated to C#.—SA
13 Jun 2012 by cheshm69
hi every body!i have four camera in my game project. they positioned in the center of sphere area and they look at their specific area.(each of them look at 1/4 sphere)when i want do something in my game(like: moving ,firing and etc) i want see it's effect in all of camera(example: if i...
12 Dec 2012 by Member 9122676
how to call a method when the animation gets to a certain keyframe in xna.
12 Oct 2011 by Tokisan
Hi everyone,I am a newbie in xna game .My trouble is having a group of sprites and i want to change its state by second, as after 10 seconds one of them will change from a bush to a tree in 5 seconds then change to bush. In next 10 seconds of previous sprite will change.i merely want...