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)

2
votes
1answer
254 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
311 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
158 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
162 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
168 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
287 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
63 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
272 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
680 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
188 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
121 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
583 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
263 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
122 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
115 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
218 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
233 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
201 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
110 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
2k 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
896 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
366 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
539 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
111 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 ...
9
votes
1answer
633 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
650 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
213 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
139 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
150 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
148 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
461 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?
1
vote
1answer
523 views

Make bones in blender work corectly in XNA

So, I am trying to connect bones with vertex groups in blender, but I keep failing. if I move a bone in XNA, it doesnt also move those vertecis that are connected to this bone(vertex groups). What I ...
-1
votes
2answers
167 views

Tile collision, can't get correct behaviour [closed]

I define a tile with a rectangle. This is displayed below. public class Tile : Sprite { Rectangle rectangle; public Rectangle GetRectangle { get { return ...
8
votes
3answers
604 views

Vector3 vs. Vector2 - performance, usage?

I'm currently playing around with XNA, and creating a simple 2D platformer. I was thinking of adding multiple layers to make it a little bit of challenge. In stead of having a Vector2 for my ...
-2
votes
2answers
128 views

Drawing background is very costly/slow [closed]

I'm creating a "simple" Tetris style game for a beginner project. My problem is when I added the background (tiled look consisting of a bunch of squares), the game got very slow. It has to have ...
0
votes
2answers
171 views

How do I achieve one touch one shot for WP7 game?

I want to be able to have a sprite shoot in a game for WP7. What I have at the moment is that as long as the shoot button is held down the sprite constantly shoots. How do I sort it that only one ...
2
votes
1answer
189 views

How to implement in-game purchase?

I am currently developing an indie game using XNA/C#. I would like to give players the opportunity to try a free (but somewhat limited) demo version of the game. Nevertheless, the player should be ...
1
vote
1answer
96 views

Drawing sprites messes up my model in XNA4

I have a model which draws correctly in XNA4. However if I try to add a background image (or any sprite), the rendering of my model is messed up. There are two problems with the rendering model is ...
2
votes
1answer
262 views

How do I detect when the Xbox home button is pressed XNA?

How do I detect when the big Xbox button in the middle of the gamepad is pressed in XNA?
2
votes
2answers
705 views

Background blur in 2D game?

In an XNA 2D game, I am thinking about blurring the background slightly to increase the feeling of depth? I am already using parallax scrolling which works pretty well in terms of enhancing depth ...
2
votes
3answers
256 views

Complex Scaling

I've been trying to figure this thing out for weeks now, but with no luck.So, I am creating this program in WindowsForms and Xna, that allows users to create a 3D room. By draging and customizing ...
0
votes
1answer
118 views

Making A Sprite Rotate To A Specific Angle XNA 4.0

I have a game that the character spins when you press either of the triggers on the xbox remote. Here's the code. if (gamepadState.IsButtonDown(Buttons.RightTrigger)) RotationAngle += ...
1
vote
2answers
380 views

Protecting XNA Assets

With so many XNA asset viewers out there, how do I distribute my XNA game for PC without having my assets open for persons to steal or manipulate? I know i can create custom asset importer/processor, ...
1
vote
1answer
704 views

XNA - moving the 3rd person camera

I'm having following problem: Can't set my camera to follow object from behind and rotate when I use left/right arrow. I've tried different tutorial and examples but it still doesn't work for me. ...
0
votes
1answer
142 views

3D models and hit detection

I'm currently trying to create a game that involves the inside of a cube, which i will make in Maya. My question is what is the best way to create a model with hit detection in mind? For example my ...
2
votes
1answer
127 views

What size window should i use for making an Xbox 360 game in XNA

I have a basic understanding of XNA 4.0 and i want to create an xbox game. What size window should i use? should i use the 16:9 aspect ratio then put it in full screen?
-5
votes
2answers
811 views

Repeatedly Shooting Bullets

I'm making an XNA shooter game. How do I have my sprite repeatedly shoot bullets instead of waiting for one bullet to go off the screen. Do I do this with and array?
0
votes
2answers
766 views

HLSL shader optimization [closed]

The following HLSL shader (without preprocessing) results in 65 arithmetic operations (see below). Can the same effect achieved with <=64 operations? // Center of "light" float x; float y; // ...
2
votes
2answers
1k views

Flip sprite vertically AND horizontally?

In Microsoft.Xna.Framework.Graphics.SpriteEffects there is the possibility to flip a texture horizontally or vertically before rendering. But can one do both at the same time? When I use: ...