Questions tagged [xna-4.0]

Version 4.0 (Final) of Microsoft's XNA Framework. If you use this tag, please also include the main tag XNA.

is the final version of Microsoft's XNA Framework.

XNA is a cross-platform framework originally from Microsoft that facilitates game development with .NET. Supports: Windows, Xbox 360, Windows Phone (natively), Silverlight (via SilverSprite or ExEn), iPhone/iPad, Android, Mac OS X, Linux and other (via MonoGame).

This was the definitive version that came out at 2010-09-16. Despite that it's no longer developed, It's still used for plenty of projects as of 2017.

If you use this tag, please also include the main tag .

1205 questions
8
votes
5 answers

Install XNA 4.0 Visual Studio 2010 Windows 8

I installed windows 8 a month ago and now want to add xna game studio 4.0 to my visual studio 2010 ultimate. I downloaded the xna installer from http://www.microsoft.com/en-us/download/details.aspx?id=23714 and ran the setup. First it said something…
TheEdgeOfRage
  • 193
  • 1
  • 4
  • 11
8
votes
2 answers

Compiling XNA to 64-bit

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…
annonymously
  • 4,588
  • 6
  • 31
  • 47
7
votes
5 answers

Is there a way to use something like Console.write to debug in XNA code?

I am wondering how to include debug code inside the XNA? Like console.writeline
user705414
  • 17,800
  • 36
  • 105
  • 151
7
votes
2 answers

Rotation of an object around a central vector2 point

I should preface this with I am not anywhere near a math person. The code I've found in another question seems to be working somewhat... except that it causes the object I place to rotate in a large circle mostly off screen. Here's the code: public…
Justin Popa
  • 95
  • 1
  • 7
7
votes
3 answers

Unable to select Target framework for XNA 4.0 games

I have an XNA 4.0 project that I would like to be compiled with the .Net 4.0 Full profile, but it is set to Client profile by default. The Target framework combobox in the Application tab is grayed out. I have uninstalled and reinstalled .Net 3.5,…
Wouter
  • 1,986
  • 24
  • 57
7
votes
6 answers

How do I find where memory is being used up in C#?

I have a C# XNA on WP7 project running and I'm finding that it's eating up memory between screen changes and not returning it, eventually leading to an outofmemoryexception. I've looked and looked but I can't for the life of me find where this…
meds
  • 17,850
  • 30
  • 131
  • 265
7
votes
1 answer

Procedurally generating a Texture2D in Xna/MonoGame

How could I procedurally generate a Texture2D using code? (ex: I want alternating pixels to be black and white on a 32x32 image)
user4901669
7
votes
1 answer

Rotating a sprite around its center

I am trying to figure out how to use the origin in Draw method to rotate a sprite around its center. I was hoping somebody could explain the correct usage of origin parameter in Draw method. If I use the following Draw method (without any rotation…
Achint Mehta
  • 319
  • 5
  • 11
7
votes
1 answer

XNA - Mouse.Left Button gets executed more than once in Update

I am making a Tic-Tac-Toe game. I need to check if a player is clicking on a square they have already clicked. Problem is error is shown in the first click itself. My update code is: MouseState mouse = Mouse.GetState(); int x, y; int go…
Sudo Reboot
  • 220
  • 2
  • 10
7
votes
2 answers

Sprite becomes blurred

I am starting learning C# and XNA, and I want to display an animated sprite (moved by my keyboard). I've got this sprite file: To display only the part I need, I use this code: Rectangle cuttedSprite = new Rectangle( this.W *…
PoulsQ
  • 1,877
  • 1
  • 15
  • 18
7
votes
2 answers

How is L-systems for road networks modified?

Greetings each and all! I'm currently looking into procedural generation of a road network and stumbled upon the L-system algorithm. From what I understand from various scientific papers on the subject, and further papers on the papers on the…
Karl Nilsson
  • 173
  • 1
  • 9
6
votes
1 answer

Loading Textures from a reference to built content in an XML file

Goal I'm trying to load a custom class that contains a Texture2D from an xml file using the default importer (XML Content), with no processor. Approach Lots of research online and a lot of dealing with other errors lead me to this XML:
George Duckett
  • 29,922
  • 7
  • 92
  • 154
6
votes
2 answers

XNA Windows Setup project not including my content project

I'm using XNA 4.0, and I've built a game which will be released for Steam, Impulse and others as well. Now, the thing is that they don't accept ClickOnce deployments since they can't (or can they?) be installed silently. So I went back to the…
Mathias Lykkegaard Lorenzen
  • 13,158
  • 19
  • 85
  • 163
6
votes
2 answers

MediaPlayer.Play method throwing DRM exception?!

I'm trying to add background music to my XNA 4-based Windows game. When I do Song bgm = Content.Load("bgm"); MediaPlayer.Play(bgm); in the MyGame.LoadContent method, I get an InvalidOperationException with the message "Song playback failed.…
Adam Siler
  • 1,908
  • 4
  • 21
  • 26
6
votes
2 answers

How many (low poly) models can XNA handle?

I'm aware that the following is a vague question, but I'm hitting performance problems that I did not anticipate in XNA. I have a low poly model (It has 18 faces and 14 vertices) that I'm trying to draw to the screen a (high!) number of times. I get…
Necrototem
  • 534
  • 6
  • 12
1
2
3
80 81