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)

0
votes
1answer
107 views

Animated Models in XNA

I've been using XNA for 2D games for awhile, and I am just learning 3D now. I have a question, which seems like it should be fairly basic. As I understand it, I make a model in Maya (or whatever) and ...
5
votes
1answer
269 views

Performance of pixel shaders vs. SpriteBatch: XNA

Precondition: I read this question/answer about using shaders, or spritebatch, to render and mark a sprite. I need to do something like that. I also have a 2D lighting PoC which I need to write. The ...
-5
votes
1answer
49 views

What are the statements in XNA?

A hypothetical game called “AlienShooter” needs to be able to work on Windows and on the Xbox. In the Windows version, the keyboard will handle firing at alien spaceships, and this functionality is ...
-1
votes
2answers
97 views

Setting a leader from a sprite array [closed]

I'm looking to set a leader from an array of sprites, I keep on getting a NullReferenceException was unhandled error from within my main game class when calling the UpdateMouse Method. What have I ...
2
votes
2answers
124 views

Displaying total playing seconds at end of game

Creating a simple survival game. When the player has been caught I want to display the amount of seconds that they survived for. How do I go about this?
-1
votes
3answers
250 views

How to implement smooth flocking

I'm working on a simple survival game, avoid the big guy and chase the the small guys to stay alive for as long as possible. I have taken the chase and evade example from MSDN create and drawn 20 ...
-2
votes
1answer
150 views

XNA 2D Top Down game - FOREACH didn't work for checking Enemy and Switch-Tile [closed]

Here is the gameplay. There is three condition. The player step on a Switch-Tile and it became false. 1) When the Enemy step on it (trapped) AND the player step on it too, the Enemy will be ...
1
vote
2answers
119 views

Set vertex position

Can anyone tell me how to set the positions of model vertices? I want to be able to change the position of some of the vertices of a Model. Is there any way to make that happen? And make the changed ...
2
votes
1answer
198 views

Artificial intelligence for targeting 3D flying objects

I'm working on a 3D game in Xna in which there is my jet which I am controlling. I want to add other jets as enemies. For that I need their AI so that I could have them able to target my jet. I've ...
0
votes
2answers
160 views

How to create Button/Switch-Like Tile where you can step on it and change its value?

If the player steps on a Button-Tile when its true, it becomes false. If the player steps on a Button-Tile when it is false, it becomes true. The problem is, when the player stands on (intersects) ...
1
vote
2answers
257 views

How do I stop XNA/Visual Studio from rebuilding my content project every time I build?

My group and I are working on a game in XNA 4.0 with Visual Studio 2010/2012. The main solution has 6 projects: 2 XNA game projects (1 executable/ 1 class library), 1 WPF executable for the level ...
0
votes
1answer
48 views

XNA- Texturing problem, exporting model

How,can I disable coloring when texture is applied, because right now the texture is being colored over. foreach (BasicEffect effect in mesh.Effects) { effect.TextureEnabled = textureApplied; ...
2
votes
1answer
164 views

How do I modify a Boids algorithm to be player controlled?

Found source code on Boids in C#. http://3carrotsonastick.wordpress.com/2012/11/01/boids-in-c-xna/ How do I go about making the raven class in the above player controlled? If I could control it ...
0
votes
2answers
538 views

XNA Health Bar continually decreasing

As per the Health bar tutorial on ... http://www.xnadevelopment.com/tutorials/notsohealthy/NotSoHealthy.shtml I have set up the above, how do I make it decrease by 1 health per second? I want to ...
0
votes
1answer
66 views

Why RenderTarget2D overwrites other objects when trying to put some text in a model?

I am trying to draw an object composited by two cubes (A & B) (one on top of the other, but for now I have them a little bit more open). I am able to do it and this is the result. (Cube A is the ...
1
vote
2answers
77 views

XNA- Scale only parent

I was wondering, is it possible to Scale(Vector3) a ModelBone without scaling its children. Lets say I got a Bone A at position 1,0,3. And one of its children Bone B is at position 1,0,5 (he is ...
-1
votes
1answer
175 views

Where would I find C# flocking tutorials? [closed]

Been looking for a while now and finding it difficult to find a good tutorial... Where would I find a good tutorial on how to implement flocking in a C# XNA game? Something easy to understand .. for ...
0
votes
1answer
101 views

XNA- Transforming children

So, I have a Model stored in MyModel, that is made from three meshes. If you loop thrue MyModel.Meshes the first two are children of the third one. And was just wondering, if anyone could tell me ...
1
vote
1answer
174 views

XNA- Rotating around another model

Lets say I have a model with multiple meshes. Mesh A is at position PositionA = new Vector3(5,0,10). And mesh B is at position PositionB = new Vector3(7,0,9). How can I rotate mesh B around meshes A ...
2
votes
1answer
194 views

C# 2D Camera Max Zoom

I have a simple ship sprite moving around the screen along with a 2D Camera. I have zooming in and out working, however when I zoom out it goes past the world bounds and has the cornflower blue ...
1
vote
2answers
247 views

XNA 4.0, Combining model draw calls

I have the following problem: The levels in my game are made up of a Large Quantity of small Models and because of that I am experiencing frame rate problems. I already did some research and came to ...
1
vote
1answer
111 views

this.BoundingBox.Intersects(Wall[0].BoundingBox) not working properly

I seem to be having this problem a lot, I'm still learning XNA / C# and well, trying to make a classic paddle and ball game. The problem I run into (and after debugging have no answer) is that ...
0
votes
1answer
138 views

XNA 4.0 - container with content, that can slide (C#)

I got an idea, but I got no idea on how to make it. Okay, so here is the deal. I want a container which can contain certain objects (These objects will draw the sprites/graphics). But because of ...
3
votes
1answer
297 views

Stencil mask with AlphaTestEffect

I am trying to pull off the following effect in XNA 4.0: http://eng.utah.edu/~brendanw/question.jpg The purple area has 50% opacity. I have gotten pretty close with the following code: public ...
1
vote
3answers
261 views

How do I enlarge a SpriteFont without it becoming blurry?

How do I make spritefonts not blurry when I make them bigger? I have searched Google and haven't found any useful answer.
0
votes
2answers
674 views

Load SpriteFont in XNA

I'm planning on my game using multiple backgrounds so I'm trying to use spritefonts to draw the text. Every time I load my spritefont I get a error. Line1 = content.Load<SpriteFont>("Courier ...
3
votes
4answers
780 views

More Efficient Data Structure for Large Layered Tile Map

It seems like the popular method is to break the map up into regions and load them as needed, my problem is that in my game there are many AI entities other than the player out performing actions in ...
0
votes
2answers
210 views

XNA 4.0: Problem with loading XML content files

I'm new to XNA so hopefully my question isn't too silly. I'm trying to load content data from XML. My XML file is placed in my Content project (the new XNA 4 thing), called "Event1.xml": <?xml ...
3
votes
1answer
248 views

XNA Deferred Shading, Replace BasicEffect

I have implemented deferred shading in my XNA 4.0 project, meaning that I need all objects to start out with the same shader "RenderGBuffer.fx". How can I use a custom Content Processor to: Not load ...
1
vote
1answer
219 views

Custom Content Pipeline with Automatic Serialization Load Error

I'm running into this error: Error loading "desert". Cannot find type TiledLib.MapContent, TiledLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. at ...
2
votes
1answer
298 views

XNA GUI: Creating a 'scroll pane' widget

I'm trying to create a simple GUI system and am currently stuck on how to implement a textarea with a scrollbar. In other words, the text is too large to fit into the view area. I want to learn how to ...
2
votes
1answer
1k views

XNA + Windows Forms: How make them work together without making the trick of the custom GraphicsDeviceControl?

What I've found is a solution where you have to code a custom GraphicsDeviceControl to put inside the form (the well known tutorial from the APPHub), but that's not what I'm searching for. I would ...
0
votes
1answer
89 views

How to Draw texture between 2 Vector3

My scenario: RTS combat style, 1 unit fires beam on another unit My problem is i want to draw a flat texture between 2 Vector3 points. I have looked at various Billboarding styles but that doesn't ...
2
votes
2answers
962 views

Migration from XNA to SharpDX

My fear is that XNA has reached the end of the road. To keep up with the latest technology a shift to another game framework might be needed. We have many games in a large codebase, all based on XNA. ...
1
vote
2answers
211 views

XNA Game Timer Help

How do I set a game timer in XNA? I need it to keep the game in sync no matter the lag or frame rate to prevent one moment to be normal but the next everything is sped up.
2
votes
1answer
427 views

How to convert pitch and yaw to x, y, z rotations?

I'm a beginner using XNA to try and make a 3D Asteroids game. Update: I'm having a slightly hard time describing this so I made a little animation to show what I'm talking about: ...
0
votes
1answer
139 views

Drag Gestures - fractional delta values

I have an issue with objects moving roughly twice as far as expected when dragging them. I am comparing my application to the standard TouchGestureSample sample from MSDN. For some reason in my ...
8
votes
1answer
294 views

How do I stop stretching during window re-size in XNA?

In my windowed mode XNA game when the user resizes the window the game stops updating the window and the last frame drawn is stretched and distorted until the user releases the mouse and the resize ...
1
vote
1answer
132 views

Need help revolving a 2D array

Pretty much all I'm trying to do is revolve my 2D Array by its container. I'm using this array for a background and I seem to be having problems with it revolving. public class TileTransformer : ...
-1
votes
1answer
255 views

Why distant objects are being drawn in front of close objects?

I am rendering two cubes in the space using XNA 4.0 and the layering of objects only works from certain angles. Here is what I see from the front angle (everything ok) Here is what I see from ...
0
votes
0answers
126 views

Kinect losing tracked players with Beta2 SDK

I'm creating a game using the Beta2 SDK for Kinect. The issue i am having is that in the middle of gameplay if another person enters the Kinects FOV it stops tracking the player and will not track ...
3
votes
2answers
530 views

How can I implement smooth rotation from one direction to another?

I'm having a problem with animating rotations with 1Matrix.CreateRotationY() with my basic 3D game. Based on where you click the mouse, I want the 3D object to rotate to that direction and then move. ...
1
vote
4answers
335 views

Which is the way to pass parameters in a drawableGameComponent in XNA 4.0?

I have a small demo and I want to create a class that draws messages in screen like fps rate. I am reading a XNA book and they comment about GameComponents. I have created a class that inherits ...
5
votes
3answers
308 views

'Spring' physics

I'm trying to put together a struct or a method of some sort that will allow me to check the relative position between two objects, and if they're too far apart, apply a force that will draw them ...
0
votes
0answers
107 views

Kinect Click counter function [closed]

So i have the following kinect click function which will check if the hand is within the bounds then it will click with a counter . . however there is a slight problem . .the first few button clicks ...
3
votes
3answers
358 views

Moving a body in a specific direction using XNA with Farseer Physics

I have a custom polygon attached to a body, which looks like this: What I am trying to accomplish is getting the body to move according to wherever the tip of the body is. So far this is what I've ...
2
votes
2answers
664 views

Using 2D sprites and 3D models together

I have gone through a few posts that talks about changing the GraphicsDevice.BlendState and GraphicsDevice.DepthStencilState (SpriteBatch & Render states). . however even after changing the states ...
4
votes
1answer
226 views

How do I calculate the boundary of the game window after transforming the view?

My Camera class handles zoom, rotation, and of course panning. It's invoked through SpriteBatch.Begin, like so many other XNA 2D camera classes. It calculates the view Matrix like so: public Matrix ...
3
votes
1answer
189 views

How to determine the end of list has been reached?

I'm trying to animate my object according to a set of recorded values from kinect skeleton stream by saving the (x,y,z) stream from the skeletal data into a list and then set my objects x and y ...
-4
votes
1answer
90 views

How to move from home page screen to the next menu screen on clicking a particular image in XNA4.0? [closed]

I m new to XNA game programming(also C#). I want to create a main page with some buttons and when clicking on a particular button, it should go to another screen where there are some more buttons to ...

1 2 3 4 5 11