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
0answers
13 views

XNA 4.0 Content Pipeline Error

Error 1 Error loading pipeline assembly "C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll". Test This ...
1
vote
2answers
25 views

Get highest (Y-axis) vertices from primitive d20 dice in xna

I have created a d20 dice (icosahedron) in xna and used BEPU physics to roll it. But now I'm trying to get the value from the dice after its rolled. I was thinking about looking for the 3 vertices ...
-1
votes
0answers
75 views

How to fasten the avatar's feet on the ground

I'm developing a Kinect Project using C# and XNA 4.0.Now facing a problem that I couldn't solve. When the player bends to near side , the avatar's feet are leaving the ground and it is moving like ...
0
votes
0answers
43 views

How to block Kinect rotation

I'm developing a Kinect Project using C# and XNA 4.0. Now facing a problem that I couldn't solve. When the player turn around himself, the avatar doesn't turn, but its arms and legs are trying to ...
-4
votes
0answers
30 views

Add button to xna Gamewindow and implement click event for the button [closed]

I'm developing a windows phone xna game.I want to add button to GameWindow as a Pause Button.And I want to implement click event for that.how to do this?.
4
votes
2answers
182 views

The XNA redistributable isn't in the prerequisites list; how do I include it when publishing?

So I created a small project in XNA 4.0, and wanted to try and publish it, and so I did. Yet when attempting to install it on a different computer it didn't seem to work. I've read and studied about ...
0
votes
0answers
28 views

graphics.IsFullScreen resetting to false after game constructor and graphics.ApplyChanges()

This is a MonoGame 3.2 Windows (DirectX) Project. I've tried setting graphics.IsFullScreen to true in the game's constructor and in the game's initialize function, both times running ...
0
votes
1answer
79 views

Find world matrix

I'm making my first 3D-game with XNA (MonoGame) and have come to a point where I wish to add a crosshair for the player. To do this I need the on-screen coordinates of the location where my fighter ...
1
vote
1answer
26 views

XNA Texture2D storage question

Are Texture2D objects stored on the graphics card or on system memory? I am thinking that the backbuffer is located on the graphics card (by default) and that the textures are on the system memory. I ...
0
votes
1answer
31 views

XNA - Autodeploy .exe of game upon succesfull commit to GIT

I know of ClickOnce which creates an .exe file so a user can play my XNA game. However, I have to manually go through a wizard in order to create this file. I would like for the new .exe to be ...
1
vote
2answers
75 views

Loading and storing content efficiently

So for example I have a class called TypingKeyboard. It allows you to display a string while it's being typed by the computer with sounds. I need one in the menu, for the title. And one for the ...
1
vote
1answer
64 views

How can I determine whether a unit is in range or not?

I'm programming a small game that's going to be somewhat like a tower defence. I was playing around with how I determin whether a unit is in range or not. public void Update(GameTime theGameTime) ...
0
votes
1answer
29 views

Should I Open/Close SpriteBatch with different settings?

I'm still new in game developpement, and I'm trying to complete my 1st game. Its a simple 2d game, but i'm trying to add lots of differents techniques in it. It's all good when you take a single ...
1
vote
0answers
57 views

Any easier way to add networking to an XNA game? [closed]

I know that the MSDN has an article on this but I'm not developing for Xbox so I'm not sure if I should use NetworkSession or LocalGamer etc etc because I think they are Xbox only. But I haven't tried ...
1
vote
3answers
112 views

Removing something on Collision?

I have my collision detection code working so how would I tell my HealthPickup to disappear when my Player collides with it? I haven't played around with it yet but I think I may have to somehow ...
1
vote
2answers
124 views

Detecting Hitbox Collisions (Rectangle)

So I have some Hitboxes set up on 2 classes, HealthPickup and Player. public static Rectangle Hitbox; public override void Initialize() { Hitbox = new Rectangle(Pos.X, Pos.Y, 32, 32); } That's ...
1
vote
2answers
97 views

How to Calculate Velocity in a 2D space game

I am currently using screenpos.X = (float)(screenpos.X + velocity * Math.Sin(r)); screenpos.Y = (float)(screenpos.Y - velocity * Math.Cos(r)); For my Movement with r being the Rotation in Radians. ...
0
votes
1answer
62 views

XNA 4: RenderTarget2D textures getting transparent on fullscreen

I'm generating a Texture2D object using RenderTarget2D as in the following code public static Texture2D GetTextTexture(string text, Vector2 position, SpriteFont font, Color foreColor, Color ...
0
votes
1answer
55 views

XNA tempory pause

I need to do a temporary pause. If I do a collision with an enemy I want to pause the game for 1.5 seconds. Take a look here to my code: bool tPause; float timer; public ovveride Update(GameTime ...
1
vote
3answers
105 views

Rotation matrix for a 3D vector

I have a direction vector on which I have to apply some rotation to align it to positive z-axis. To use Matrix.CreateRotationX(angle) of XNA, I need the angle for which I'd have to compute cos or tan ...
0
votes
0answers
29 views

Sprite sheets, Clamp or Wrap?

I'm using a combination of sprite sheets for well, sprites and individual textures for infinite tiling. For the tiling textures I'm obviously using Wrap to draw the entire surface in one call but up ...
0
votes
2answers
170 views

How can I make an object's hitbox rotate with its texture?

In XNA, when you have a rectangular sprite that doesnt rotate, it's easy to get its four corners to make a hitbox. However, when you do a rotation, the points get moved and I assume there is some kind ...
0
votes
1answer
52 views

Applying textures to 3D models

I want to apply textures to a 3D Model in XNA 4. Whatever I saw on the internet was to apply the textures in the modeling tool and then load the model (*.fbx) into XNA. Is it possible to load the ...
0
votes
0answers
41 views

XNA Windows Resolution / Mouse Position Bug

In XNA, when in windowed mode and resolution (set via PreferredBackBufferWidth/Height) is close to the resolution of the display, the view is distorted (zoomed in a bit)and the mouse coordinates are ...
1
vote
1answer
49 views

RenderState in XNA 4

I was going through this tutorial for having transparency which can be used to solve my problem here. The code is written in XNA 3 but I'm using XNA 4. What is the alternative for the following code ...
0
votes
0answers
28 views

Transparency in XNA-4 primitives

I'm using XNA 4 with Visual Studio 2010. I'm trying to create a simple 3D world with walls and doors in which the user to free to roam around. A wall is just a rectangle which is currently being ...
3
votes
1answer
365 views

XNA, how to draw two cubes standing in line parallelly?

I just got a problem with drawing two 3D cubes standing in line. In my code, I made a cube class, and in the game1 class, I built two cubes, A on the right side, B on the left side. I also setup an ...
2
votes
1answer
71 views

XNA 4.0 HLSL - strange depth map

I want to draw my pre-rendered depth map to the scene. I get my depth value in the following way: basically (Pixel Shader) // Depth is stored as distance from camera / far plane distance, 1-d for ...
2
votes
1answer
97 views

SpriteBatch, trying to reduce draw calls

This my main draw call: Matrix Camera_transformation = player_camera_.GetTransformation(); // Background - AlphaBlend spritebatch.Begin(SpriteSortMode.Deferred, ...
0
votes
1answer
39 views

When to get input state: multiple times or one time in a static class?

Let's say I have these classes: Player Here I want to make the player jump: current_state_ = Keyboard.GetState(); if ((current_state_.IsKeyDown(Keys.Space) || ...
0
votes
0answers
20 views

XNA alpha channel mask

I'm trying to highlight a portion of the screen, such that the entire screen is covered with a semi-transparent black mask but part of that mask is "cut out", kind of like it's being lit up while ...
0
votes
0answers
41 views

XNA 4.0 displaying .fbx texture problem

Here is my image. I have Steve from MineCraft I exported it to .FBX format. After Googling for a while, I changed sampling mode to PointClamp and turned off anti-aliasing, but somehow the texture ...
0
votes
2answers
73 views

Player's camera, how to obtain smooth movement

In a 2D platformer, I have a player that can move both horizontally and vertically. I also have a camera that moves in relation to player. In every update I do this: public void RepositionCamera() ...
9
votes
4answers
637 views

Make the player run onto stairs smoothly

I have a 2D Platform game, where the player Always runs to the right, but the terrain isn't Always horizontal. Example: I implemented a bounding-box collision system that just checks for ...
0
votes
0answers
24 views

Loading dynamically created files with XNA

I'm trying to implement a structured save/load functionality so if the user saves, it will take up one of 10 slots, and if the user loads, they would select one of these slots. To do this, I need ...
3
votes
1answer
109 views

Explanation of matrix transformations

I've been looking for something that can help me understand matrix transformations. I've been to multiple different sites, including Wikipedia and quite a lot of related questions on SE and other ...
0
votes
1answer
37 views

XNA 4.0 - Strange Behavior when using RenderTarget2D

My Problem is similar to XNA 4.0 - Why does using a RenderTarget2d cause transparency on models?. I want to render my scene to a Texture2D and then draw the texture. If I set no RenderTarget at all ...
1
vote
1answer
79 views

How can I deploy a Xbox 360 game onto a disc?

I'm making some games for Windows now since about 3 years using the Microsoft XNA Framework and C#. Now I finally came to buy myself a Xbox 360 and now I want to deploy some games I converted to Xbox ...
1
vote
1answer
148 views

Can I render some vertices as an object instead?

I am generating vertices at runtime that represent terrain. I've always drawn the vertices as triangles with GraphicsDevice.DrawUserPrimitives<VertexPositionColor>, but I'm wondering: Can ...
0
votes
1answer
37 views

Store custom data against XboxLIVE Gamer in XNA?

If I am using Xbox LIVE Gamer Services for a networked XNA game, is there anyway to store custom data against the Gamer or GamerProfile so should they sign-in again even on a different machine I can ...
1
vote
0answers
40 views

Grid patter appear over bloom when resolution is lower than 1366x768

The bloom post process in our engine is done via consecutive downscaling of the treshhold texture down to 1/64x1/64 of the main size. Every texture we use is R16G16B16A16 FP16. Afterwards, we ...
0
votes
0answers
146 views

Implementing Exponential Shadow Mapping

I've been following the tutorials (link1) and (link2) to implement Shadow Mapping. However, I'm getting shadowing artifacts which are quite ugly. I've done some research, and found that ESM ...
-2
votes
1answer
90 views

explosion spritesheet is not working [closed]

I want to do a simple explosion on a collision.Here is my code... public explosion(Texture2D newTexture, Vector2 newPosition) { texture = newTexture; position = newPosition; ...
0
votes
0answers
36 views

Sprite won't travel properly to a point

I am creating a game in which I would like the player to be able to click a location and have the character travel to it. This is the code I am trying to use for this: if (Mouse.GetState().LeftButton ...
1
vote
1answer
74 views

XNA Move List of Rectangles

I have a game in which sprites will be removed and added under different circumstances, and so I created Rects of type List<Rectangle> to hold the bounding rectangle for each sprite. ...
2
votes
0answers
29 views

Xna 4 Model Rotation with inertia not working as expected with variable updates

I am trying to rotate a model with inertia damping with the keyboard. The code works great with a fixed time step but it doesn't behave the same with a variable update frequency. Update method: ...
1
vote
0answers
32 views

Multisampling Gamma Correction Problem

I have multisampled rendertarget where I use red channel as stencil data, but the problem is I get incorrect results around borders if "Antialiasing - Gamma Correction" is set to on in Nvidia Control ...
1
vote
1answer
41 views

Proper Directional light on multiple models

I've been trying to implement a Directional light into an XNA game I'm working on, but for what ever reason, I cannot seem to get the directional light to be a true directional light. Instead, I am ...
2
votes
2answers
137 views

XNA: Non-overlapping shadows

I want to create an effect similar to the following in XNA / MonoGame: There's a background and a semi-transparent shadow consisting of several objects (two circles in this example). However, the ...
1
vote
0answers
56 views

Monogame apply tint to only some parts of sprite [duplicate]

Each player is a different colour (Red, Blue, Green, Yellow) and I want a small part of each piece of armour to be tinted to the player colour. Is this possible without using a second armour sprite ...