XNA Game Studio 4.0 is a programming environment that allows you to use Visual Studio to create games for Windows Phone, the Xbox 360 console, and Windows-based computers.

learn more… | top users | synonyms (1)

5
votes
1answer
695 views

Should the networking of my game be a component or a service?

I am working on a windows game and I am trying to understand the XNA GameComponents and GameServices classes and use. From what I understand about a component is that it has an Update method that ...
0
votes
2answers
274 views

XNA 4.0 Plane size

Possibly a dumb question, but do planes stretch on to infinity? I can't define a spanning area for it, and would have to do some sort of check for collisions like if(x intersects BoundingBox and ...
0
votes
1answer
277 views

Is a HashTable the best way to store replay data in C#?

I'm looking to make a deterministic replay in my 2D game. I want to follow a similar approach to braid in storing the relevant information every frame (at 60 frames per second). I wanted to know what ...
3
votes
1answer
175 views

'perfect' platformer base Xna

When a player touches a ground peice in a game, he seems to sink through the ground then slowly rise back up, and when he has risen back up, he is very jittery. if (touchingTheGround()) { ...
0
votes
1answer
102 views

A view and projection matrix oddity?

I have a bit of a dilemma ... So i setup my scene how I want it with some bits in it and now I want to move all my camera related code in to a camera class however doing so is proving to be a pain in ...
-1
votes
1answer
1k views

Extension method must be defined in a non-generic static class when adding static bool function [closed]

I try to use first answer of Checking for alternate keys with XNA IsKeyDown but the compiler shows me Extension method must be defined in a non-generic static class. How can I fix this issue?
-2
votes
1answer
2k views

Moving A Sprite In The Direction Its Facing XNA [duplicate]

There are many questions on this site that explain this except they seem to all be in Java. I want to move a sprite in the direction it's facing, in XNA. I know you must use Radians and lots of ...
0
votes
1answer
173 views

XNA 4 Content Pipeline dependency

I tried to create something to parse XML with, which needs the inclusion of the Microsoft.Xna.Framework.Content.Pipeline; reference. This was fine and all, but as soon as I tried to debug, I got the ...
0
votes
1answer
128 views

Receiving server data inside game loop

I'm planning on how my multiplayer game client game loop should work. While I'm convinced that server should be moved from game loop into it's own thread, I'm not sure what should I do about receiving ...
4
votes
1answer
213 views

Creating rectangles from the inner part of a texture2D

Ok, this may be hard to understand, but I'll do my best. You will see that the first image is a normal mario, and the other is the result I am looking for. I'm trying to find a way to extract ...
0
votes
1answer
320 views

Incorrect colour blending when using a pixel shader with XNA

I'm using XNA 4.0 to create a 2D game and while implementing a layer tinting pixel shader I noticed that when the texture's alpha value is anything between 1 or 0 the end result is different than ...
0
votes
1answer
383 views

Client Server Multiplayer Project

I have reviewed the relevant WinForms/XNA samples here and here. However, my requirements are slightly different. Given the following: I am developing a multiplayer (Client - Server) game There ...
3
votes
1answer
462 views

Change opacity of a texture in XNA 4.0

I have created a terrain using VertexPositionNormalTexture in XNA 4.0, but now I would like to allow the user changing the opacity of the terrain (from 0%, totally opaque, to 100%, totally ...
0
votes
1answer
482 views

How to load a custom SpriteFont?

Is there any possible option where you can open a custom SpriteFont? Because I need to add to my game a font that is not in Windows already. I saw this page Custom Sprite Fonts and it's like I want ...
2
votes
1answer
141 views

How to get an affect for balloon bursting in XNA?

I am a noob in XNA. I want to create an effect which shows a balloon bursting? Any pointers would be highly appreciated.
0
votes
2answers
109 views

Returning The Position Of A Sprite Drawn & Updated By A List [closed]

My problem is this, when iceBoy hits any of the newGrounds in the ground.groundAmmount list, it will return the specific position of this newGround so that i can set iceBoy's position based on the ...
9
votes
3answers
637 views

Outline sprites

I'm currently working on a 2D game, and my current task is to outline selected object. I basically use a blur shader to do it fully runtime. I first draw my sprite using a vertical gaussian blur ...
1
vote
1answer
271 views

Xna custom mouse not allowing me to move its sprite past certain bounds

I have written a Custom mouse, with a Custom sprite, using MouseState, and getting the X and Y variables. However i also have a camera that i wrote, and this allows me to leave the initial box. One ...
3
votes
1answer
273 views

Sketchup model renders wrong in XNA

My XNA model renders wrong. It should render like that: But it renders like that: The background doesn't matter. It's just the model that renders wrong. Here is the drawing code: protected ...
2
votes
2answers
356 views

Applying Angular Acceleration in a Basic Physics Model

I'm attempting to use a basic physics system to create an arcade flight model. So far I have managed to get the aircraft moving forward, apply gravity, etc. However, after trying to implement torque I ...
0
votes
1answer
165 views

How to force playing attack animation until the end?

I rework the code to make it more easier to manage. How can I force the player cannot change the sprite animation by pressing any keys until the attack animation completely ends? class Player { ...
0
votes
2answers
166 views

Why does my sprite animation sometimes runs faster? [closed]

I don't know why each time I call the Update_Animation function, my sprite animation runs faster. Is it caused by gameTime? How to fix it? Here's the relevant code: class Character { // ...
0
votes
1answer
172 views

XNA Skinned Model - Keyframe.Bone out of range exception

I'm getting an IndexOutOfRangeException on this line of AnimationPlayer.cs: boneTransforms[keyframe.Bone] = keyframe.Transform; I don't get what it's really referring to. The error happens when ...
0
votes
2answers
304 views

Making The Player Stop Bouncing And Stop Sinking In The Ground In A Platformer XNA

Heres a problem i've been having. I have a platformer, and whenever my player hits the ground he keeps bounding. Here's the falling code iceBoy.moveY++; iceBoy.position.Y += moveY; Now heres the ...
2
votes
1answer
64 views

Saving model image

How can I get a top-down,side view of the model imported into XNA and then save that view as an image, that can be used later in the program? Thank you for your time
3
votes
2answers
296 views

How to finish a sprite animation before going back to default animation?

I want to run a animation until it has gone through all the frames, even when the activation key is no longer held. After the animation is completely finished, it goes back to walking state. I also ...
1
vote
2answers
734 views

XNA .fbx model imported sideways

Using Blender 2.6. My model has its location and rotation zeroed out, scale set at 1.0, and generally conforms to every guideline detailed on this site and misc google results. When exporting it, I ...
3
votes
1answer
205 views

CPU Usage on the UI thread Warning - XNA WP7.1

When I run the Store Test Kit's profiler against my game, I get a warning that says something along the likes of "Very high CPU usage on the UI thread for operations other than frame drawing." ...
2
votes
1answer
122 views

XNA project won't target .NET 4.0

I am trying to reference the System.Threading.Task assembly. If I am not mistaken, it should be part of mscorlib. But no matter what I do, my project always defaults to the .net 2.0 runtime. Even if I ...
0
votes
1answer
628 views

Creating A Bounding Box around each item in a list XNA 4.0

I have asked a similar question before except i am more experienced and have more understanding of XNA. I have bullets that shoot whenever you press RightTrigger. I am having trouble though creating ...
5
votes
2answers
300 views

How can I normalize a vector if I am handling movment of each axis seperatley?

I am writing a 2D tile based game engine in XNA, and I've recently fine-tuned my collision detection using the answers provided here and more specifically here. The tile based collision detection now ...
2
votes
1answer
127 views

Extending ModelProcessor

How can one extend a model processor inside Windows Forms. In a normal XNA game you would simply create a new class like so(I think...): [ContentProcessor] public class ExtendedModelProcessor : ...
1
vote
2answers
117 views

Textures loading too large on smaller monitors

I have an XNA game, and when i run the game the textures load all good on my computer and on my tv and they're all bring drawn in the right position. But on my laptop, which screen is smaller then ...
1
vote
4answers
230 views

Selecting and moving vertices

How can I identify the correct vertecis and move them in XNA using VertexBuffer? Let's say I have a simple cuboid in my project and want to move one face of it. How would I loop thru vertices, get ...
-1
votes
2answers
240 views

3D game demo in XNA [closed]

Does anyone know of a decent 3D game tutorial with source code? I'm really new with 3D development for XNA and have found that the best way to figure out how to code for something is to look at ...
1
vote
1answer
211 views

Complex Models using bounding boxes in xna 4

I'm new to XNA, and have just started looking into collision detection. I've managed to get a bounding sphere around my first person camera object and i want to check the collision between that and ...
1
vote
1answer
112 views

XML serialization error on XBOX 360

When try to save game on an xbox with xml serialization i get a code 4 error. I made sure t oadd all the xml referances and there is no errors until i run the game. Any suggestions?
1
vote
3answers
3k views

MonoGame performance better then XNA?

I am currently thinking about porting a XNA game to other platforms using MonoGame. Do I understand this correctly that I can expect the game to render faster even under Windows 7 due to the use of ...
0
votes
1answer
1k views

Exported FBX Blender Model not showing up in XNA

I really do apologise if this question has been asked before, but I recently created a model in Blender 2.63, exported it to an FBX file, and tried to display it in XNA (using 4.0 Refresh), but all ...
2
votes
1answer
398 views

How can i scale up a bounding box in Xna?

In Xna a spritebatch can be passed a value for scale. I have A bounding box Rectangle that i have a border drawn around my sprite using the bounding box rect. Now my question Scale can make the ...
2
votes
1answer
564 views

Portable sound and music for XNA / MonoGame?

What is the best (recommended) way to integrate audio (both sound effect and music) in a game project (using C#/XNA) targeting multiple desktop platforms (W7, W8 Metro, Linux, OSX, ...) via MonoGame. ...
1
vote
1answer
115 views

XNA 4.0 storage framework not being recognized

This may be a silly question but, im unable to do any save game data because for some reason, this following namespace is unrecognizable: using Microsoft.Xna.Framework.Storage; All the normal XNA ...
10
votes
2answers
713 views

Portable buffered keyboard input for XNA / MonoGame?

As a preliminary solution, I am currently using the Nuclex framework in an C#/XNA game project for buffered keyboard input. Sadly, nuclex relies on SlimDX.Directinput.dll and therefore to my knowledge ...
11
votes
6answers
692 views

Run XNA game without graphics

Wondering if there is anyway to run an XNA game with out displaying anything. I have a working game that runs in a client server setup where one player is the host and other people can connect to ...
0
votes
2answers
219 views

3d to 2d Collision

I have a 3d model which rotates around my screen, it's always on the Z axis = 0 where everything of my 2d images are. My 2d images fly out of the center and get bigger to give the view as getting ...
1
vote
0answers
144 views

Message box not appearing on Xbox [closed]

I want to make a message box appear in my XNA xbox game, and here is the code for the message box. Guide.BeginShowMessageBox("Stop", "Are you sure you want to quit?", new ...
3
votes
2answers
154 views

How can I draw a texture line by line

I wish to draw a texture to the screen line by line (horizontal lines). Can I do this in xna? At first I wish to just start at the top of the texture, draw one single horizontal line of pixels and x ...
2
votes
2answers
154 views

Create a variety a sprites from a single image in XNA?

I want to be able to take a single image and cut them up into a lot of images to make the sprites. How would I do that in XNA since I only know how to load the texture then use it without changing it? ...
1
vote
1answer
489 views

Collision detection against specific sprite shape using XNA with Farseer Physics?

I am making a 2D XNA Game, using Farseer Physics for collisions. I need collisions to be resolved against the actual shape of the sprite image, ignoring transparent pixels, rather than against the ...
-2
votes
1answer
119 views

Help finding a good XNA physics library? [closed]

I'm looking for a good physics library for XNA. Can anyone help me find something good, simple and easy to learn for XNA?