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
2answers
474 views

XNA 3.1 to 4.0 Vertex Shader Not Drawing

I have recently been converting our XNA 3.1 game to XNA 4.0 and am stuck on the shaders. I have the game running, but nothing is drawing to the screen, except things not using a shader. This is only ...
5
votes
1answer
653 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 ...
3
votes
1answer
287 views

How do I generate a mipmap for a texture loaded from a stream?

I am loading a Texture2d from a stream: public static Texture2D GetTexture(GraphicsDevice dev, System.Drawing.Bitmap bmp) { Texture2D texture; using (MemoryStream s = new MemoryStream()) ...
3
votes
1answer
590 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
1answer
244 views

World to Pixel Transformation

My objects have a location in world coordinates (basically 1.0f is a meter). If I simply draw my objects using their world coordinates, each meter will correspond to a pixel. Obviously that's not what ...
1
vote
1answer
267 views

Scaling Skeletal values to be able to reach objects on the screen

I have created a game using Kinect + XNA and the game runs on full screen mode.. However when i try to touch or reach a certain area on the screen using hand.. I cant reach it.. I will already be ...
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 ...
-1
votes
1answer
199 views

Issues with touch buttons in XNA (Release state to be precise)

I am trying to make touch buttons in WP8 with all the states (Pressed, Released, Moved), but the TouchLocationState.Released is not working. Here's my code: Class variables: bool touching = false; ...
-1
votes
1answer
219 views

forward motion car physics - gradual slow

Im having trouble creating realistic car movements in xna 4. Right now i have a car going forward and hitting a terminal velocity which is fine but when i release the up key i need to the car to slow ...
-5
votes
1answer
537 views

How do I make the Cylinder in the model?

I have a class which will draw cylinders with deformer's index in the FBX file. The deformer which was in the 3ds max's biped. ex: If I have 22 bones in the deformer's structure, I will draw 22 ...
2
votes
0answers
30 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: ...
2
votes
0answers
245 views

Monogame working with Krypton

I am trying to make a simple 2D game engine using Monogame and the Krypton 2.0 lighting engine. So far I have succeeded in rendering a light but I am unable to generate any shadows from any hull's. ...
2
votes
0answers
307 views

XNA 4.0 Pixel Shader 3.0 Exact Texture Lookup/Sample Issue

I am stuck on trying to solve this problem. I originally had some shaders written that worked for XNA 3.1, but after converting to XNA 4.0 they would no longer compile due to instruction counts, flow ...
2
votes
0answers
419 views

Rotating camera changes directional light depth map, and changes PCSS penumbras

I am implementing PCSS and I am using a directional light. The directional light volume is clamped to the camera frustum (as is typical with directional lights). So when the camera rotates, the ...
1
vote
0answers
91 views

Collision detection implementation suggestions

I'm working on a simple 2D game involving a rotating octagonal ring where a sphere sprite moves up/down avoiding objects as the ring rotates faster and faster. I'm having a difficult time with the ...
1
vote
0answers
43 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 ...
1
vote
0answers
33 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
0answers
23 views

Transparent RednerTarget2D afrer blending

How to get transparent bacground in RenderTarget2D after alpha blending? I use Color.Transparent to clear the render target, but I get black color after blending where alpha is 255 even that there is ...
1
vote
0answers
125 views

Collision shape and Model problem

I used BEPUphysics for my XNA 4.0 game , the problem is that I load my model.fbx from into the game then add it to the space of physics engine , but when I change the scaling matrix of my Model then ...
1
vote
0answers
424 views

XNA - How to move skinned model and merge animations

After you helped me to resolve my loadContent problem I've wrote some code and made 3D model with animation. Because XNA 4.0 doesn't support .fbx with multiple animations I've generated 3 models with ...
1
vote
0answers
146 views

Maya Animated Character export for XNA 4.0 problem

To begin with, I'm trying to export an animated character in .fbx format from Maya 2013 to XNA 4.0 In Maya, The Model has a basic rig and the animations are in clips made in the Trax editor. so the ...
1
vote
0answers
201 views

Sprite sorting issues

I apologize for the vague title, I'm not sure how else to phrase this problem. I am using tIDE to assist me in my game's world development. To give a dynamic effect to map layers within tIDE, it has ...
1
vote
0answers
199 views

Batching Homogeneous Render Objects in XNA, 2D Component-Entity Engine?

I've been working on my component-entity engine for about 3 months now, and have managed to get nearly every constituent system working with little effort or compromise. My system has the following ...
1
vote
0answers
658 views

Picking 3D object with Mouse when using Camera Zooming in XNA 4.0

I've tried to figure out how to do picking with the mouse, and things work great when zoomed in all the way with the camera (Third Person Camera). And it works perfectly when using First Person ...
0
votes
0answers
35 views

SetRenderTarget(null) clearing previous draw calls

I'm not sure if everything's working as it should be or whether I'm just not doing something properly, but I couldn't find anything that discussed this so I thought I'd ask here. I'm using Monogame ...
0
votes
0answers
24 views

How do I open/edit a *.xnb file in XNA Game Studio 4.0?

I've downloaded a *.xnb font sprite, but I don't know how to open/edit it. I installed XNA Frameword 4.0 in VS 2010. Thanks for your help!
0
votes
0answers
55 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 ...
0
votes
0answers
47 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
0answers
32 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
0answers
45 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 ...
0
votes
0answers
29 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 ...
0
votes
0answers
25 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
46 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
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 ...
0
votes
0answers
181 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 ...
0
votes
0answers
37 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 ...
0
votes
0answers
60 views

How can I position different size creatures in a group automaticly

I'm doing a game (in xna) on my free time, as I'm not in the game market, I'm pretty sure I'm missing something that would help me get this right. Think of Ogre Battle. A group of unit moves, and ...
0
votes
0answers
71 views

Interactions between camera and procedural terrain

QUESTION REWORKED I need to update every frame camera position along a surface with hills and drops. In this picture you can see a particle of the surface terrain (just one triangle) and a sphere ...
0
votes
0answers
99 views

Smooth circular collisions with edges/collision boxes [C# + XNA]

So, me and a friend are working on our top-down perspective 2D game, and have come to work on perfecting our collisions. In its current state our player sprite is colliding with walls, but is ...
0
votes
0answers
83 views

Collision - Per Pixel and Rectangle Based, Combined

UPDATE:i found the error in my calculation the problem was that i needed to consider if the image is rendered flip or not to fix it just need to rub from the opposite side of the sprite I am currently ...
0
votes
0answers
30 views

Farseer Physics, mass affecting velocity

I have just started with Farseer Physics, so I am kind of a newbie in this theme, so not a surprise that I have encountered something that is not involved by the engine, or I just don't know about it. ...
0
votes
0answers
28 views

Skip the first RenderTarget when writing to MRT with Opaque blending

I am writing to three rendertargets and whant to know how to tell a GPU not to write to the first RT. When you write a shader you can simply output less data than you have RTs (like output a single ...
0
votes
0answers
85 views

Avoiding lag when rendering Texture2D for first time

I have found a similar question here, but it is about playing sounds. I am using 2048 x 2048 textures for sprite sheets and every time I call spriteBatch.Draw using a sheet for the first time in game ...
0
votes
0answers
516 views

XNA 4.0 - stretch full screen window?

I have an issue with resolution in XNA 4.0. I'm running fullscreen. The game runs standard at 1920x1080, and can be scaled down to 1280x720. The resolutions are both 16:9 (1920/1,5 = 1280, 1080/1,5 ...
0
votes
0answers
64 views

Certain grid lines not rendering as expected

I am drawing a simple quad (a triangle strip with 4 vertices) as the floor and then drawing an 8x8 grid over top (a collection of vertex pairs for a line list). The vertical grid lines work fine ...
0
votes
0answers
78 views

What is an efficient/safe way to broker head to head communication for a mobile game

I have a mobile game written in XNA/MonoGame with a wcf server and I am currently designing the head to head competition mode. Previously I have created a game that used UDP to set up communication ...