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
104 views

How can I save an XNA texture as a PNG file?

I have a Color[,] variable and I already know how to convert it to a Texture2D. How do I then save it as .png image?
1
vote
1answer
80 views

Rotation Continuity help

First the issue im having: Basically its the fact that the angles of a circle aren't continuous, they rise from 0 to 2pi then immediately fall back to 0. I want to make a game where the player ...
1
vote
0answers
52 views

How to create offsetting lines that draw across the screen in Monogame?

I'm trying to create an effect on the screen like the gif below. Basically lines that are offset by 1 pixel draw across the screen from either side which then eventually creates a solid color. I'm ...
3
votes
3answers
526 views

How to create a delay/timer and fire an action once it expires in C# Monogame? [duplicate]

First off I'm somewhat new to C# but I'm working on a game in C# Monogame and I'm trying to get timers working. There was a similar question answered around here a while back but I found that the ...
3
votes
1answer
134 views

Effective AI for 3D Motion

I am developing a game in XNA and am trying to create an effective AI for the enemy and friendly spaceships but am having a hard time keeping the game effective without disadvantaging one side or the ...
2
votes
1answer
142 views

Replace black color by transparent color XNA

I'm actually trying to replace black color of my texture by a transparent one. How can I do to remove the black pixels, should I use a AlphaTestEffect, or can I use the BasicEffect? Thank you.
2
votes
2answers
134 views

Draw 3D ellipse in monogame/xna

I am programming a 3d solar system (simulator). To describe the path of a planet I wanted to add 3D rectangles.. and draw them. But this ; no surprise; decreased the frame rate extremly. Also it does ...
2
votes
0answers
62 views

Mouse Interaction in 3D space (ray)

I use this code public static Ray CalculateRay(Vector2 mouseLocation, Matrix view, Matrix projection, Viewport viewport) { Vector3 nearPoint = viewport.Unproject(new Vector3(...
1
vote
0answers
65 views

Textured trapezoid in Monogame DirectX

I'm working on a 2D game, so most of the graphics are sprites. However, some elements are drawn using trianglestrips in Orthographic projection. The thing is that I can't do a 3D projection because ...
3
votes
1answer
134 views

How to load multiple 3D models dynamically xna

I want to load multiple 3D models .fbx at the same time in my map display. I can load First Model but when I use ContentBuilder to Load another Model, I Got Error in effect.EnableDefaultLighting (); ...
0
votes
2answers
96 views

WP 8.1 XNA custom game loop (render when dirty?)

I need to know whether it's possible to create a XNA game for Windows Phone 8.1 (which I've already) using monogame with a custom game loop. OpenGL ES has this possibility (GL_RENDERMODE_WHENDIRTY or ...
1
vote
0answers
74 views

XNA Collision In An Entity Part System

I've hit a loss in creating a "game engine" in XNA, I'm extremely confused over how to approach collision in an Entity-Part System ( following this as a reference ). I can make all the entities with a ...
4
votes
1answer
172 views

Generating 'Specially' shaped rooms for a Dungeon

I've made a fairly simple dungeon generator but now I want to expand on it so that I can procedurally generate a dungeon with irregular shaped rooms. I don't just want any old crazy shapes popping up ...
2
votes
1answer
224 views

Why are dungeons so often created subtractively rather than additively?

I'm having difficult deciding on how to procedurally generate a dungeon floor. The way I've been doing it so far is like so: Populate list of Rooms with random height and width. Place first room in ...
2
votes
1answer
35 views

Windows Phone 8.1 Monogame Content.Load<Effect> exception

need some help, just trying to load compiled .fx (.xnb) file by monogame (version 3.4.0.456) in Windows Phone 8.1 enviroment by this code MainEffect = Game.Content.Load<Effect>("chessboard"); ...
1
vote
2answers
64 views

xna split tileset into individual tiles

I am trying to break a tileset image from my content folder into individual tiles during program. What I would like to have happen is that i can fill a list (of thing) with each possible tile so I can ...
1
vote
0answers
66 views

Open Borders in Fluid / Smoke Simulation

I am trying to adopt a fluid / smoke simulation based of the source files of this video to my needs but came across a few problems when trying to make it open at the borders (flows into the void). ...
1
vote
1answer
41 views

Extrapolating performance on cheaper devices

I am in the final stages of developing a game with XNA and MonoGame and am planning to release it on Windows Phone and Android. I personally have a Blu Win HD LTE and my father and sister have a Nexus ...
1
vote
1answer
77 views

XNA Get model height in location

I am trying to make simple RTS game, and here is the problem I encountered. I need to get model height in any position. Model will not be rotated or scaled. For example, I have a terrain model like ...
1
vote
0answers
56 views

Is this a good way to “get rid of the sprite shakes” for my sprites that “target” other sprites? (XNA)

I'm relatively new to XNA, but very proficient with C#. I want to know if this is the best way to solve the sprite shaking problem. I had a sprite class that can target a place/other sprite on the map ...
5
votes
2answers
246 views

How can I efficiently render to multiple screens?

I know XNA is long dead, but I need it to update an old project. (I would have ported to MonoGame, but can't get multi-monitor support in it.) My game does the following: Wait for some objects ...
1
vote
1answer
72 views

Find x and y position with angles in 3D world

I'm actually creating a Tracking Camera (or 3rd person camera), and to do so, I used two angles (X and Y) for the rotation of the camera and an other floating value for the distance between the target ...
1
vote
1answer
714 views

Monogame shader not working

I'm trying to use this this tutorial in monogame, but the effect does not work, only renders a black screen. Everyhing by itself renders just fine, I looked at the render targets if they get drawn to, ...
0
votes
2answers
81 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
58 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
64 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
436 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 ...
3
votes
2answers
1k 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
169 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 camera'...
0
votes
2answers
47 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
54 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
82 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
145 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
59 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
1answer
305 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
103 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
92 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
1answer
104 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
150 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
169 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
132 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 ...
2
votes
1answer
134 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 bump/...
0
votes
1answer
183 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
79 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
173 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
33 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
381 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
146 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
94 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
335 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 ...