XNA is a game framework by Microsoft that allows deployment for Xbox Live Indie Games as well as Windows Phone 7.

learn more… | top users | synonyms

0
votes
1answer
121 views

How can I support more than one resolution/language on WP7/8?

I want that my Windows Phone game runs on the following three resolutions: 480x800, 768x1280 and 720x1280. And maybe later on 1920x1080. But in the XAP file information, it's just written ...
1
vote
1answer
44 views

XNA flip SpriteBatch on click

Is there any way to make a SpriteBatch flip when its clicked, something like Android Animation? I know that spriteBatch.Draw() have SpriteEffects, but it literally flip it and I want to flip it like ...
1
vote
1answer
186 views

Drawing sprites to a permanent Texture2d using Monogame / XNA

I'm working with Monogame to do a 2d sprite engine. I've gotten it work pretty well where I can move lots of sprites around the screen with the effects and positions that I want. Last night I tried ...
0
votes
1answer
54 views

Layer depth problem in XNA puzzle game

I am working on puzzle game where tiles are needed to be dragged to their correct place, but at the time of dragging one of the textures goes behind the other texture. How can I bring the texture to ...
0
votes
0answers
39 views

XNA speed up content compile with multiple content projects: what to do when two assets reference the same sader file?

Right now our content is being compiled over the course of 10 minutes. Given that we literary have no content yet, it is a huge timebomb waiting to explode once we start ading it. As we build the game ...
0
votes
1answer
106 views

HLSL postprocessing for day to night (DTN)

I am trying to implement a "day-to-night"-filter (as commonly used in cinema) for a 2D game (XNA) by using a full screen HLSL pixel shader. The aim is to transform any bright and colorful image into a ...
1
vote
0answers
186 views

Monogame is not using GPU?

I have the following code in Draw loop: for (int i = 0; i < 512; i++) { for (int j = 0; j < 512; j++) { spriteBatch.Draw(Textures.Grass, ...
0
votes
0answers
76 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 ...
1
vote
1answer
54 views

XNA soundEffect is null in when loaded in main class and called in another class

I have loaded a sound effect file into the main class in xna, but when I try to run it in another class I am given this error {"Object reference not set to an instance of an object."} I am new ...
3
votes
3answers
192 views

Does passing uniform constants from technique into shader cause branches?

I am trying to find a way to organize my evergrowing number of shader techniques/functions (I am coding in sm_3.0). One way is to do this: float4 PS_Crossroads(PS_INPUT input, uniform bool ...
0
votes
1answer
69 views

Map editor undo function - Not actually setting values to tiles

I'm currently attempting to implement an undo/redo function for my map editor for a tile-based 2D platformer game made with XNA. I've found a lot of resources online about this and decided to try to ...
0
votes
0answers
77 views

Overlay partially transparent texture onto another, but not the background

I'm using XNA and C#. I have two shapes (texture2ds), and I want to overlay shape 2 (50% transparent square) over shape 1 (opaque circle), but I want to get Option B, not Option A. I basically want ...
2
votes
1answer
307 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
70 views

How to do a multishot in xna?

I am trying to simulate a gun in which shoots multiple bullets at the same time(similar to a spread out shot). I am thinking I have to create another bullet array then do the same as I have below but ...
0
votes
0answers
67 views

Loading assets in Monogame [duplicate]

I'm creating a MonoGame application on Visual Studio 2012, yet when trying to load a texture I get the following problem: Could not load Menu/btnPlay asset! I have set content directory: ...
0
votes
1answer
47 views

OcclusionQuery: how to ignore some objects?

I'm trying to make a LensFlare effect when the player watch the sun in my XNA 4.0 Game. To do this, I use OcclusionQuery, here's my code: http://pastebin.com/meAkdwmD I also have some models, a ...
3
votes
5answers
258 views

Increasing efficiency of N-Body gravity simulation

I'm making a space exploration type game, it will have many planets and other objects that will all have realistic gravity. I currently have a system in place that works, but if the number of planets ...
22
votes
7answers
1k views

Multithreading 2D gravity calculations

I'm building a space exploration game and I've currently started working on gravity ( In C# with XNA). The gravity still needs tweaking, but before I can do that, I need to address some performance ...
1
vote
1answer
130 views

Unknown error XNA cannot detect importer for “program.cs”

I am not too sure what I have done to cause this, but even after undoing all my edits, this error still appears Error 1 Cannot autodetect which importer to use for "Program.cs". There are no ...
2
votes
1answer
82 views

XNA calculate normals for linesegment

I am quite new to 3D graphical programming and thus far only understand that normal somehow define the direction in which a vertex faces and therefore the direction in which light is reflected. I have ...
1
vote
0answers
101 views

write to depth buffer while using multiple render targets

Presently my engine is set up to use deferred shading. My pixel shader output struct is as follows: struct GBuffer { float4 Depth : DEPTH0; //depth render target float4 Normal : COLOR0; ...
1
vote
2answers
142 views

Input of mouseclick not always registered in XNA Update method

I have a problem that not all inputs of my mouse events seem to be registered. The update logic is checking a 2 dimensional array of 10x10 . It's logic for a jewel matching game. So when i switch my ...
3
votes
2answers
94 views

Multiple ( V- / I- ) Buffers, is it sane?

Currently I am developing an RTS game using XNA ( / ANX.Framework ). There is one thing bothers me. I am not sure in what way or how to organise Buffers. Should I use a new Vertexbuffer for any object ...
1
vote
2answers
346 views

How AlphaBlend Blendstate works in XNA 4 when accumulighting light into a RenderTarget?

I am using a Deferred Rendering engine from Catalin Zima's tutorial: His lighting shader returns the color of the light in the rgb channels and the specular component in the alpha channel. Here is ...
2
votes
0answers
90 views

Game performs poorly when sideloaded [closed]

My game runs smooth when I deploy it to my windows phone directly from Visual Studio 2012 in debugging mode. But when I sideload/deploy the same .xap file with the Application Deployment Tool, the ...
3
votes
1answer
189 views

Laser Beam End Points Problems

I am building a game in XNA that features colored laser beams in 3D space. The beams are defined as: Segment start position Segment end position Line width For rendering, I am using 3 quads: ...
1
vote
1answer
251 views

Grid-Based 2D Lighting Problems

I am aware this question has been asked before, but unfortunately I am new to the language, so the complicated explanations I've found do not help me in the least. I need a lighting engine for my ...
1
vote
1answer
98 views

ContentManager in XNA cant find any XML

Im making a game in XNA 4 and this is the first time I'm using the Content loader to initialize a simple class with a XML file, but no matter how many guide I follow, or how simple or complicated is ...
1
vote
2answers
171 views

Physics for moving blocks

I'm working on a 2D game for windows phone where the player moves blocks around to bounce a laser beams. I need to create some simple physics for moving the blocks. For the moment I have a simple ...
2
votes
1answer
106 views

What's the difference between Textures and VertexTextures in XNA?

The GraphicsDevice class of XNA has the properties Textures and VertexTextures. What is the exact difference? I don't really understand what MSDN tells me about this. I usually use Effect parameters ...
3
votes
1answer
203 views

How to give a ball a following texture trailing effect

How do I draw copies of the leading texture so that there is a line of the leading ball following behind it? (that don't collide) So far I have tried to create the effect by placing another graphic 2 ...
6
votes
2answers
234 views

Improving the efficiency of my bloom/glow shader

I'm making a neon style game where everything is glowing but the glow I have is kinda small and I want to know if there's an efficient way to increase the size of it other than increasing the pixel ...
0
votes
1answer
65 views

Figuring out what object is closer to a certain point?

I'm trying to create fog of war, I have the visual effect created but I'm not sure how to deal with the hiding of other players if they're within the fog of war. So right now the thing I'm trying to ...
0
votes
0answers
64 views

movement of sprites with kinect and xna

im working on a proyect with kinect sdk and xna 4.0. i need take the position of the hands and draw a sprite over it. im doing it directly and, because of that, i get a "trembling hands" effect. so, i ...
0
votes
0answers
155 views

Best way to go about sorting 2D sprites in a “RPG Maker” styled RPG

I am trying to come up with the best way to create overlapping sprites without having any issues. I was thinking of having a SortedDictionary and setting the Entity's key to it's Y position relative ...
8
votes
1answer
263 views

Fast lighting with multiple lights

How can I implement fast lighting with multiple lights? I don't want to restrain the player, he can place an unlimited number and possibly overlapping (point) lights into the level. The problem is ...
1
vote
1answer
103 views

Automatically zoom out the camera to show all players

I am building a game in XNA that takes place in a rectangular arena. The game is multiplayer and each player may go where they like within the arena. The camera is a perspective camera that looks ...
0
votes
1answer
132 views

Obtain rectangle indicating 2D world space camera can see

I have a 2D tile based game in XNA, with a moveable camera that can scroll around and zoom. I'm trying to obtain a rectangle which indicates the area, in world space, that my camera is looking at, so ...
0
votes
1answer
130 views

Why i can not load a simple pixel shader effect (. fx) file in xna?

I just want to load a simple *.fx file into my project to make a (pixel shader) effect. But whenever I try to compile my project, I get the following error in visual studio Error List: Errors ...
1
vote
1answer
105 views

How to load a simple minimap, and hide the background?

I developed a small and simple 3D games minecraft style. I would add a "MiniMap". Until here everything is fine. I had the idea to load the entire map in the background, and then I added the edge of ...
1
vote
1answer
195 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 ...
1
vote
0answers
127 views

Diamond Isometric Tile Picking C# Xna [duplicate]

I recently converted the display style of a isometric map from staggered to diamond and I can't figure out the tile picking process. I'm well aware of the other existing threads regarding this subject ...
0
votes
0answers
69 views

Windows Phone 8 trial mode implementation?

I created a Windows Phone 8 game with XNA and I want to implement a trial mode. How can I integrate a trial mode? What is the best way to implement a trial mode in an XNA game? I found this tutorial ...
0
votes
1answer
140 views

Stacking items, c# XNA: When item reaches maximum stack, new items added are also maximum stack

haven't used this site before so I'm sorry if I format my post badly. I am trying to build a stackable inventory for my game in c# XNA and the problem I've encountered is when an item in my inventory ...
0
votes
2answers
113 views

XNA C# Making the game scaleable for different resolutions [closed]

I am currently developing a game in C# and XNA, and I want it to look right at all resolutions. How would I get started with doing that?
12
votes
3answers
846 views

Camera for 2.5D Game

I'm hoping someone can explain this to me like I'm 5, because I've been struggling with this for hours and simply cannot understand what I'm doing wrong. I've written a Camera class for my 2.5D game. ...
1
vote
1answer
83 views

XNA - Distribution and Patching

I have a couple of questions. Some of this I've done some research on, and some of it may be lacking, but any help is appreciated. 1) When distributing an XNA game for PC that uses custom fonts ...
0
votes
1answer
102 views

Changing enum in a different class for screen

I'm trying to make a start menu for my game and my code uses Enum's to moniter the screen state. Now i want to change the screenstate declared in the main class, in my Background class Screen screen ...
6
votes
1answer
227 views

What is the most efficient way to blur in a shader?

I'm currently working on screen space reflections. I have perfectly reflective mirror-like surfaces working, and I now need to use a blur to make the reflection on surfaces with a low specular gloss ...
2
votes
2answers
127 views

Filling in a shape from vertices

What I'm trying to do is set a bunch of points to create a shape and then fill everything in within those points. It needs to be done in 3D becasue this is being used as a way to generate a texture ...