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
35
votes
2 answers

How to install the XNA Game Studio 4.0 in Windows 8?

This question is related, but NOT a duplicate: How to install XNA game studio on Visual Studio 2012? I read the above mentioned post, and have got xna projects opening, but I now have a problem. Some of the references to the XNA framework aren't…
annonymously
  • 4,588
  • 6
  • 31
  • 47
23
votes
3 answers

Graphics Card and XNA 4.0

I create a new project in xna 4.0 for windows. I put it on both Reach and HiDef profile settings in properties. When debugging I get the following error: No suitable graphics card found. Could not find a Direct3D device that supports the XNA…
Shawn Mclean
  • 53,945
  • 92
  • 265
  • 401
19
votes
3 answers

'Nearest Neighbor' zoom

When I draw a stretched Texture2D, the pixels receive a Blur-like effect. I want to use 'pixelated' graphics in my game and would like to know how to disable this in favor of the simplest nearest neighbor zoom. I've created this picture for…
Acidic
  • 5,714
  • 10
  • 43
  • 78
16
votes
3 answers

XNA game performance

I am writing a game using C# 2010 and XNA 4.0. I want it to be a good game and not some "just another crap" and so one of my goals is good framerate. For this I would like to ask you for some advices, be it XNA related or C# related - what can I do…
Zéiksz
  • 660
  • 1
  • 9
  • 25
16
votes
4 answers

Game Architecture

I have a question about a XNA game I'm making, but it is also a generic question for future games. I'm making a Pong game and I don't know exactly what to update where, so I'll explain better what I mean. I have a class Game, Paddle and Ball and,…
xlar8or
  • 581
  • 8
  • 18
12
votes
2 answers

Making sure my XNA game has focus before handling mouse and keyboard events

I'm developing a game that is mixed with winforms (for the map editor). The problem I am facing is that even if the main game window isn't in focus, it still receives mouse change events (such as clicking and moving the mouse). Is there a way to…
Freesnöw
  • 25,654
  • 28
  • 83
  • 131
12
votes
2 answers

Need help on monogame screen resolution and intersection

Currently in my game i want trying to move my object towards both x axis and y axis.As I also wanted to put it into center ,I have put a camera.Here is my Camera code- public class Camera { public Matrix transform; public Viewport view; …
uncle_scrooge
  • 380
  • 1
  • 3
  • 24
11
votes
1 answer

XNA draw / paint onto a Texture2D at runtime

Morning all (if its morning where you are) I have been looking around and have not seen a satisfactory method for doing this so thought I would ask around... Ideal world I would like to be able to generate a transparent Texture2D object. Drawing…
Nick
  • 838
  • 2
  • 11
  • 22
10
votes
1 answer

Scaling entire screen in XNA

Using XNA, I'm trying to make an adventure game engine that lets you make games that look like they fell out of the early 90s, like Day of the Tentacle and Sam & Max Hit the Road. Thus, I want the game to actually run at 320x240 (I know, it should…
Adam Rezich
  • 2,972
  • 5
  • 28
  • 39
9
votes
2 answers

How do I load a texture in XNA at runtime?

I'm working on an application that uses the XNA framework to do it's 3D rendering. I now want to load a texture from file. I've found two methods so far: Texture2D.FromStream(GraphicsDevice, Stream) The problem with this approach is that it only…
Andreas Brinck
  • 47,252
  • 14
  • 79
  • 112
8
votes
3 answers

How to determine if a key is a letter or number?

KeyboardState.GetPressedKeys() returns a Key array of currently pressed keys. Normally to find out if a key is a letter or number I would use Char.IsLetterOrDigit(char) but the given type is of the Keys enumeration and as a result has no KeyChar…
Ryan Peschel
  • 9,095
  • 18
  • 57
  • 101
8
votes
3 answers

watch console output panel in visual studio while running a XNA game

I'm a visual studio newbie, currently developing a game using VS 2010 express, C# and XNA 4.0 . I'm trying to debug a little game I'm developing, using a Console.WriteLine call when a certain event occur. Unfortunately when I execute the program…
Heisenbug
  • 37,414
  • 27
  • 126
  • 181
8
votes
3 answers

How can I create a strongly typed structure for accessing files in an XNA Content Project?

Preamble: I'm working with an XNA Content project to hold all of the various textures (and possibly other resources) that I'm using as part of developing a game. The default method of loading images from the Content project into an XNA texture…
Mir
  • 2,101
  • 1
  • 26
  • 32
8
votes
1 answer

XNA - Signing in with Local Profile

I am trying to learn XNA (4.0) multiplayer networking for the PC only environment. For development, I read that using local profiles (with SystemLink) for PC-only environment does not require me to worry about Xbox Live Licenses.…
Stomp
  • 860
  • 1
  • 5
  • 19
8
votes
2 answers

How to make an object "scalable" while rendered in a form

I am rendering my game in a Winform in the same way as done in this sample: WinForms Series 1: Graphics Device In my game I have some object, for example a rectangle that I can already put and move, in my game world, once created. My project here…
Francesco Bonizzi
  • 4,407
  • 6
  • 41
  • 75
1
2 3
80 81