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

No output to screen using Multiple Render Targets and multisampling

I'm having a little trouble with XNA, but I doubt it's specific to the framework. I draw a few 3d models to 1 rendertarget with multisampling turned on, and it works fine. If I draw the same scene to ...
1
vote
1answer
56 views

Per pixel collision for scaled textures in Monogame Windows Phone 8

I have some serious trouble with pixel-collision in my game. I am using the Matrix Scale parameter in Spritebatch.Begin method, to scale the content for each device's resolution correctly. ...
0
votes
1answer
59 views

Collision Detection in Wander behaviour

briefly, this is the overall look and feel of my game: I have a player and I have an enemy in my map. i tried to learn collision from SaladRaider Youtube channel. collision using chasing method works ...
1
vote
2answers
342 views

Textures rendering upside down and small with Pixel Shader in Mono Game but not XNA

I'm new to HLSL, attempting to use MonoGame to do some simple post processing effects. Here is my HLSL file, taken from one of rbwhitaker's xna tutorials (I would post the link, but can't post more ...
2
votes
2answers
712 views

MonoGame 3.4 Content Pipeline Extension missing reference

I'm pretty new to MonoGame and XNA in general. So was wondering how I could import custom content and make it work on any platform. So I came across Content Pipeline Extensions wanted to do it like ...
0
votes
3answers
162 views

Game Slowed by Particles in XNA

I am developing an XNA game and am trying to improve the performance of the game by hiding objects that are not visible to the user. My first thought was to use a BoundingFrustum based on the ...
0
votes
2answers
41 views

Transparency temporarily lost from a rendertarget when drawn to for one frame

I have a transparent RenderTarget2D that I draw every frame. Before the first frame is drawn to the screen, an image is drawn to the render target. The image also contains some transparent pixels. ...
0
votes
0answers
51 views

Awesomium XNA vb.net

I'm building a game in XNA, using vb.net as my programming language. I'm trying to implement awesomium (http://www.awesomium.com) to create an html graphical user interface. But I am at a complete ...
-1
votes
1answer
63 views

C# XNA - Can't Deserialize Element

So This is my XML file: <?xml version="1.0" encoding="utf-8" ?> <XnaContent xmlns:ns="Microsoft.Xna.Framework"> <!-- TODO: replace this Asset with your own XML asset data. --> ...
1
vote
2answers
128 views

XNA 4.0 - Bounding Boxes

So i'm kind of new to programming and im trying to check collision using bounding boxes. i'm currently stuck as to how to call my bounding box within my bounding box function as shown below public ...
1
vote
2answers
57 views

How to preserve generated textures in XNA?

My game generates small "minimaps" for each room you go to, which are rendered onto render targets then stored in textures and displayed on the world map. When the game is saved, each new minimap is ...
0
votes
0answers
190 views

Error on MonoGame Content Pipeline: Texture Importer Error

I just encountered this kind of error when using the MonoGame Content Pipeline and it's my first time to use it to convert png to xnb files (I use a stand alone app for converting files to xnb in the ...
0
votes
1answer
87 views

Different game resolutions on emulator and on a real device (which has the same resolution) on Windows Phone 8

I have a big problem with game resolution, when I'm running my game on emulator (which theoretically has the same resolution as my real windows phone device: 800 x 480). I'm making the game with ...
0
votes
1answer
65 views

How to transform a matrix's local space position into another's local space

When looking at an example to learn how to do per pixel collision, I came across this: // Calculate a matrix which transforms from A's local space into // world space and then into B's local space ...
1
vote
0answers
82 views

XNA4\ Monogame 3d Collision detection Help please

i have been trying to get 3d collision working for a while and i think(hope) you people can help me so for my project i have created a 'sprite3d' kinda class which is called ModelEntity and there ...
1
vote
1answer
147 views

Monogame / XNA - Is there a limit when drawing at far position (> 1 billion ? = strange behavior)

So I'm making an "unlimited" 2D Tile-Engine with procedural generation (simple noise based) in Monogame, and I'm loading/unloading Chunck by Chunck as you go along. It's working pretty well now. ...
0
votes
2answers
132 views

XNA - Efficient way to get pixel color from rendertarget2D

I'm stuck with a framerate perf down with getData from a rendertarget, what's your idea, what are the other options I can use ? I explain my problem : I'm making a board game, the objects or monsters ...
4
votes
1answer
101 views

Monogame Startup Memory Spike

I am currently porting a game from WP7 using XNA to WP8.1 using MonoGame. I have been putting considerable effort into optimizing my game to be under the 185MB memory limit for low-memory phones. I ...
1
vote
0answers
233 views

How should we begin to create our 2D Tower Defense? [closed]

Me and my friend are going to make a 2D Tower Defence game as our last assignment in highschool that has to be finished april/june next year. We both know a handy bit of Java and C# but our game is ...
2
votes
1answer
125 views

Reflections on moving water

I've been working on a simple game with semi-realistic water. I followed some tutorials to get: a flat water surface reflection and refraction (blended using fresnel term) ripples using a ...
0
votes
1answer
150 views

XNA 2D rotation Matrix offset/origin

I'm currently struggling with finding the offset for my original camera translation after I have applied a rotation for it. transform = Matrix.CreateScale(new Vector3(1, 0.75f, 1)) ...
0
votes
1answer
74 views

MonoGame - Left/Right Sided Collision Not Working

I'm working on a platformer as part of my course, the problem I have come across is Left/Right sided collision is not working very well. I already have bottom & top collision working. Here is an ...
0
votes
1answer
142 views

Monogame/XNA Making animations play once per click

I'm currently making a #gbjam entry and everything has been going smoothly up to this point. My issue being that I've implemented a shooting mechanic and along with it an animation to play as a shot ...
1
vote
1answer
29 views

Strange anomalies when using WinForms with XNA

I haven't seen any questions related to my issue, and this leads me to believe I'm missing something minor, however; The Problem I'm creating a game that is effectively launched from a windows form. ...
0
votes
1answer
259 views

Applying texture to a 3D object

I am trying to draw a 3D cube on the screen, using MonoGame. The cube was created in Blender and exported as an fbx file. The following is what the cube looks like in VS when opened in the editor: ...
0
votes
1answer
126 views

Background Scrolling like Zelda - A Link To The Past with XNA [duplicate]

i am trying to create a background that scrolls like the one in zelda - a link to the past. in other words: i have a bigger "screen" than the camera covers, so i need to scroll over it, when moving. ...
0
votes
1answer
74 views

Sound Effects on Monogame delay

I have recently added some Sound Effects to my game, but the problem that I am dealing with now, is that they have for a half of second delay, or more sometimes. Also, if I press repeatedly on that ...
1
vote
4answers
284 views

MonoGame/XNA 3D fbx model produces strange rendering output

The Problem: I have been making a model of a Steampunk-themed street light in Blender for use in my MonoGame/XNA Game. To test it I exported it to the *.fbx file format using the fbx export plugin ...
7
votes
2answers
248 views

Spaceship Shield Flare

I'm trying to implement a system whereby a "shield flare" will be shown whenever a projectile impacts the shield. The shield itself is one like in Star Wars, where it's more like a skin around the ...
0
votes
1answer
61 views

XNA Line to Rectangle Collision return first pixel

I have the following code: public static bool LineIntersectsRect(Point p1, Point p2, Rectangle r) { return LineIntersectsLine(p1, p2, new Point(r.X, r.Y), new Point(r.X + r.Width, ...
3
votes
2answers
295 views

How can I implement screen transitions like in the 2D Zelda games?

I want to implement a screen transition in the style of the 2D Legend of Zelda games (like this). That is, I'd the screen to remain static until the player moves to an exit, at which point the next ...
0
votes
0answers
37 views

Position is not what it should be when attaching fixture

In XNA / Farseer I have something like this: Body body = BodyFactory.CreateRectangle(world, 1f, 2f, 1f); FixtureFactory.AttachCircle(0.5f, 1f, body, new Vector2(0f, 1f)); I have been told that ...
2
votes
1answer
113 views

Drawing Farseer Fixtures

Is there any way how to draw a Polygon / Fixture from Farseer Physics with XNA? As I deform these polygons at runtime I can't take any texture from my Content folder, the texture must be generated at ...
3
votes
2answers
328 views

2D Collision Detection XNA C#

I've read all around the net, watched videos, tried things and in the end I can't make a decent platform collision detection. I've followed this tutorial. It didn't work out at 100%. My object stops ...
2
votes
1answer
124 views

Real-time movement client to server to client(s)

So the way that I tried to create a MMO like server communication was by sending strings to every-player containing information and making the client split the string. Example "John" , 42, 64 : ...
2
votes
1answer
151 views

How animated block in voxel engine?

In my voxel engine (XNA 4.0) I'm use a vertex buffer for the entire chunk and update it after the set block, changing block metadata or light level. This is not too frequent operation compared with ...
1
vote
5answers
190 views

Advice on how to store level design info? [closed]

I'm building a 2D tile-based puzzle game in C#, using Monogame. The game board is an 8x6 grid of tiles, each of which can contain a number of objects. Conveniently, the number of possibilities for ...
0
votes
1answer
87 views

Pass-through pixel shader not displaying properly

I'm new to shaders, HLSL and XNA in general. I'm trying to write a pass-through pixel shader but I'm experiencing some odd behaviour. I created a simple texture, shown below: Here's what I see when ...
0
votes
1answer
68 views

Sprites not showing (C# - XNA 4.0)

I'm following a tutorial from XNA GPA, but in my project, none of the sprites are loading. I've followed all of the instructions exactly, and the code works as expected when I copy it from my project ...
1
vote
1answer
73 views

Problem disposing content from a screen's content manager

I have a problem with my game. I am using multiple classes for different screens, for exemple: Main Menu is one screen, When playing is another, and so on... I decided to use multiple ...
1
vote
1answer
241 views

What's wrong with my HLSL depth shader?

I'm trying to render depth texture in XNA 4.0. I'm read few different tutorials several times and realy cannot understand what I'm doing wrong. Depth shader: float4x4 WVPMatrix; struct ...
0
votes
0answers
54 views

XNA 2D Tile Baseed Map Collision Messing Up On Inside Corners

I'm creating a 2D Over the head game and the collision system works fine for straight walls and outside corners although not for inside corners. The walls are done by each solid tile having a ...
0
votes
1answer
58 views

Mapping “Color” parameter from SpriteBatch.DrawString() function to a custom shader

I've recently found a nice way to render text in XNA with custom font AND custom shader. Here is the game code**: using System; using System.Collections.Generic; using System.Linq; using ...
2
votes
1answer
54 views

Reading messages from a certain client in Lidgren

I'm setting up a game with Lidgren, and I was wondering if there was a way to read a message from a certain client instead of just from the server as a whole, such as- //Why doesn't this exist? ...
2
votes
2answers
120 views

Draw transparency

I want to draw a terrain in a Texture2D at runtime in order to make collisions work with Farseer Physics later on. What I need is to make some parts of my original texture, which is just a colored ...
2
votes
1answer
51 views

Math behind XNA's spriteBatch.draw() color parameter?

I'm trying to make a shader that changes the color of a sprite the way the XNA spriteBatch.draw() color parameter changes color. I don't know exactly what it is called (the closest word I can think of ...
3
votes
1answer
69 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. ...
2
votes
3answers
222 views

XNA realistic water: How to clip along a mesh instead of a plane

I hope you can help me with the following problem: I'm developing a 3d game (in XNA) with an ocean. I want it to look semi-realistic. So far, I'm rendering 4 things: The ocean floor (terrain) on ...
0
votes
1answer
34 views

Rectangle Collision Not Correct

As you can see on the top corner it says COL: False/True. This is if the player bounds and the tiles which are solids. The rectangles for the tiles and players are checked if they intercept ...
6
votes
3answers
273 views

Change in direction should slow down object and accelerate in new heading (2D grid-based)

I'm trying to implement some sort of faux space physics in my 2D game. I have a top down view of my space ship. You can change direction and set a speed up to a maximum which then accelerates the ship ...