Questions tagged [xna]

XNA is a game framework by Microsoft that allows deployment for Windows, Windows Phone & Xbox 360.

190 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
0answers
1k views

How do I reconstruct depth in deferred rendering using an orthographic projection?

I've been trying to get my world space position of my pixel but I'm missing something. I'm using a orthographic view for a 2.5d game. My depth is linear and this is my code. ...
7
votes
1answer
641 views

Understanding how texCUBE works and writing cubemaps properly into a cube rendertarget

My goal is to create accurate reflections, sampled from a dynamic cubemap, for specific 3d objects (mostly lights) in XNA 4.0. To sample the cubemap I compute the 3d reflection vector in a classic ...
6
votes
1answer
230 views

Lidgren not starting server properly

I have a server set up for my game with Lidgren, and it works well when I have it set up on one machine, but if I try to run the server on another machine, I am unable to connect from other machines. ...
5
votes
1answer
147 views

transfer 3d model processing from Xna to Android?

I developed an XNA scenario in a desktop application and I need to make the same scenario in an Android app so I need to process data on the desktop computer and just display it in Android app using ...
5
votes
2answers
418 views

Collision detection problem in XNA4/Monogame

I have been trying to get 3D collision detection working for a while and I think (hope) you people can help me. For my project I have created a 'sprite3d' kinda class which is called ...
4
votes
0answers
121 views

XNA Shader working different on different PC's

I am working on a game in C#/XNA which uses custom shaders for drawing. When the code is compiled on my machine it works perfectly on all computers I tested, but when my team member tries to compile ...
3
votes
0answers
117 views

Trying to get Vertexshader to work Monogame 2D

If I don't use the vertex shader, it gives me white textures which is what the default color is. Once I add the vertex shader, the screen is black. I figure it is something wrong with the Matrices I ...
3
votes
0answers
196 views

Viewport not matching Window size when fullscreen

I am using: GraphicsDevice.Viewport.Bounds to determine the size of the canvas / stage for my window. This works well if I am in Windowed mode, but if I launched ...
3
votes
0answers
112 views

Monogame resizing GraphicsDeviceControl in WindowsForms?

I'm currently working on a custom Map editor using Windows Forms. I have a class inheriting from GraphicsDeviceControl (called MapDisplay) that I'm using so that I may use spritebatch to draw the ...
3
votes
0answers
211 views

How to serialize an XNA Rectangle

I'm serializing a data structure to XML using the IntermediateSerializer class. This data structure has an XNA Rectangle in it. ...
3
votes
1answer
227 views

C# XNA colliders, physics, inclined plane/terrain/colliders

Currently I'm working on a project to learn game programming. But I'm not sure if I have the right approach on several things, and that's what I'm here for. What I'm trying to create is a small world ...
3
votes
1answer
942 views

3d Wall sliding collision

I'm working on collision for walls in my game and the way I currently have it I get stuck walking into a wall. I'm trying to make my character slide on the walls but still collide. My character moves ...
3
votes
0answers
3k views

XNA Screen Manager problem with transitions

I'm having issues using the game statemanagement example in the game I am developing. I have no issues with my first three screens transitioning between one another. I have a main menu screen, a ...
3
votes
1answer
1k views

XNA Webcam video

How can I embed a video in a XNA application? I'm developing a card game with XNA C# and I need to send webcam video between four machines. Could anyone give me some tips about that?
2
votes
0answers
141 views

Mouse Interaction in 3D space (ray)

I use this code ...
2
votes
0answers
114 views

How would I warp a mesh with code?

I recently asked a question about putting a camera at the head of a 3D human model here and it worked out rather well and whatnot, but there is still a problem that bothers me: How would I contort/...
2
votes
0answers
264 views

Improving effect performance in XNA

I'm making a 2D, top-down platformer, in which four or five layers are rendered each time the game draws. Everything is fairly performant except for the bottom layer, which is the game map. This is ...
2
votes
0answers
363 views

Incorrect frustum culling with center/half-size AABB

I'm trying to implement an axis-aligned bounding box with center/half-size instead of min/max. And I have some problems when it comes to create a method to detect if the aabb is visible or not. I try ...
2
votes
0answers
720 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
1answer
147 views

Should I store ads in the background or recreate them every time I need them?

I am developing an XNA game for Windows Phone 7 and 8. The game is level-based. After finishing each level a screen comes up with a bit of stats summary. I wish to embed an ad in this screen, on which ...
2
votes
0answers
278 views

scale rotating boundingbox

I want to use basic rectangular collision detection. I have a rotating sprite and a method that calculates the bounding box every time in the Update() method. I simply check for intersection between ...
2
votes
0answers
294 views

Deferred Rendering: Orthographic directional light that has position

Basically I need to code a light for deferred rendering that is a cross between a spotlight and a directional (positionless) light. It's to be used for sunlight, but because my terrain has overhangs ...
2
votes
0answers
147 views

Light on every model and not in the whole scene

I am using a custom shader and try to pass the effect on my Models like that: ...
2
votes
0answers
263 views

Get Specific depth values in Kinect (XNA)

I'm currently trying to make a hand / finger tracking with a kinect in XNA. For this, I need to be able to specify the depth range I want my program to render. I've looked about, and I cannot see how ...
2
votes
0answers
504 views

Creating a steady rhythm for music-based game in XNA

I'm looking to develop a game for Windows Phone which involves the user building notes into a sequencer while playing a puzzle game. While my implementation is very close to being on-beat there is an ...
2
votes
0answers
771 views

How can I apply an overlay effect to a sprite in XNA?

Suppose I have a character sprite and I want to apply some animating effect that overlays its color, how would I do it? What I desire is something along this line: (From final fantasy tactics) It is ...
2
votes
1answer
1k views

Drawing Shape in DebugView

As the title says, I need to draw a shape/polygon in Farseer using debugview. I have this piece of code which converts a Texture to polygon: ...
2
votes
0answers
403 views

How can I export a model using the CAT bone system into XNA?

Has anyone successfully used the CAT bone system in 3ds Max and exported the file into XNA? If so, what was your method of doing so? There are a number of methods of doing this, apparently, but the ...
2
votes
1answer
361 views

How to fix my camera collision, C# XNA

I am having some weird issues with my camera. I am trying to make it so it is a first person camera, that when the user presses the W or Up key, it moves towards where the camera is looking. My issue ...
2
votes
1answer
464 views

Supported Orientation, Monogame, Windows Phone 8

I am developing a game in which I need to rotate the screen on Landscape mode or Portrait, and lock it that way. In Monogame, targeting Windows Phone 8.1 adding this code: ...
2
votes
1answer
326 views

How can I deal with actor translations and other “noise” in third-party motion capture data?

I'm working on a game, and I've run into a problem with motion capture data. My team is using 3DS Max 2011 and trying to put free motion capture files on our models. The problem we're having is it ...
2
votes
1answer
1k views

Xbox Controller Not Connecting in Monogame Project

I have recently been playing around with the support of the wired XBox 360 controller in Windows development. I am developing in C# in Visual Studio 2012. I have created 2 projects. The first (...
2
votes
1answer
474 views

Why am I seeing unbounded memory usage in my WP8 game?

I recently upgraded to VS2012 and tried my game out on the new WP8 emulators. I was dismayed to find out the emulator now crashes and throws an out of memory exception during my sprite loading ...
2
votes
1answer
1k views

Has anyone got the Krypton Lighting Engine working in MonoGame for Windows 8?

I've converted the core of the Krypton Lighting Engine so that it's compatible with Windows 8. The trouble I'm having when actually using it is that it can't load the ...
1
vote
0answers
72 views

Implementing a scrollable Panel in XNA/MonoGame

I am trying to create a scrolling Panel for my game. The code I've shown below works but there is a problem. I read Andrew's answer here and decided to implement the scrolling effect by using a ...
1
vote
1answer
98 views

How to add a animation to myPlayer

I'm currently making a shoot em up in monogame. I want to add just one animation to my object. No commands or transitions between animations for different actions: just an object swapping between ...
1
vote
1answer
99 views

Collision detection problem in monogame C#

...
1
vote
0answers
28 views

MonoGame game does not work on other pc, when installed by WiX

I made a simple tetris game. I wanted to give it to my friend, so that he could test it. I made very fast WiX project and setted up every file from bin/Debug. On my ...
1
vote
0answers
27 views

XNA - How to scale sizes and speeds for a minimap?

I'm recreating the arcade game StarGate, and I need to create a minimap. But I'm having problems scaling the minimap textures to fit in the radar box, and ontop of that, making sure the speed of the ...
1
vote
2answers
109 views

How should I be loading a player's content and its bullets content later in the game

I'm trying out Monogame because my course has a simple game programming class in it which is just going over basics. The final project will be using Monogame so I've been getting ahead and making my ...
1
vote
0answers
70 views

Monogame Per Pixel Collision scale texture

I have a problem: I am learning the Per Pixel Collision, because I am very new to Monogame. Everything works thine, but my texture (image) is too big, so I scaled it down to 0.5f. Now it doesn't work ...
1
vote
0answers
83 views

XNA / Monogame Camera flickering on collision

I have my camera follow my player and it works perfectly, I had some issues with collision and managed to get it working, but now my camera follows my player when it gets pushed back so the camera ...
1
vote
0answers
33 views

Models overlapping in XNA 3.0

I have to use XNA 3.0 for a class at school, and every solution to this problem I've found only works in XNA 4. I am rendering several 3D models, and the one that's drawn last is always on top. How do ...
1
vote
0answers
658 views

Monogame Orthographic Isometric camera

Some time ago decided to make an "2,5d" isometric strategy game. I decided ill go with a 3d engine with a locked orthographic camera for the benefit of easier collision detection, easier depth sorting ...
1
vote
0answers
83 views

Pixel-perfect collision appear to have random behaviour

So I was sitting with my programming teacher with this issue for about two hours and we couldn't figure out anything specific that could possibly be the issue. Therefore I'm taking some measures and I'...
1
vote
0answers
90 views

sprite jitter when max acceleration reached at camera

Camera seems making sprite jitter when max acceleration is reached : Thats my camera code : ...
1
vote
0answers
81 views

My Character objects are complex, how should I organize their structure?

I'm using Monogame to make a fighter. I have created an abstract Character class that has basic character functionality such as HP, meter, update boilerplate and such, and will be overridden as each ...
1
vote
0answers
31 views

Defining collision rules in Farseer XNA

I'm trying to integrate Farseer into my XNA game. Since I'm using an EntityComponentSystem approach, I've added the Body inside a component and added it to the players' components. One thing I'm ...
1
vote
0answers
75 views

Generate and then rasterize vector shape in Monogame/XNA

I apologize if this is too broad, but I can't seem to find information on this anywhere (perhaps I am searching for the wrong thing?) Anyways, I'm making a simple game where the player visits ...
1
vote
0answers
132 views

XNA 4.0 Camera and object handling on screen

For developing a side-scrolling platform 2D game I want to implement a moving camera class, the reason of using the class instead of moving the whole map is that I'll have to use too many objects at ...