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

1
vote
0answers
175 views

XNA 4.0 isometric 2.5 D with elevation tutorial? [closed]

Does anybody know of a tutorial (book, series of articles?) that would cover creating a very large 2.5 isometric game with elevation; preferably in XNA 4.0? I'm looking to create something along the ...
0
votes
1answer
475 views

How does Raycasting work in XNA Farseer and player collision?

Wanting to know how to figure out if player's bottom is colliding with object so that I could allow the player to jump. I was trying to use OnCollision but was referred to ray-casting, I looked ...
0
votes
0answers
80 views

Monogame/XNA Invert Screen Y Axis

I am trying to invert the direction of the Y axis in Monogame from positive downwards, or screen space, to positive upwards, so that my world transformation matrix makes more sense. It seems ...
0
votes
1answer
167 views

How to correctly handle multiple Songs in XNA?

I'm working on a (Windows-only) game in XNA, and I have multiple music tracks. I don't want to load them all into memory, but play them on demand. To properly dispose them, I have a separate ...
0
votes
0answers
49 views

XNA 2D Tile Map zooming to arbitrary point [duplicate]

I'm working on a game in XNA with a 2D tilemap as the playfield. I'm using a spritebatch with a transformation matrix to provide movement and scaling of the playfield. I'm trying to add a zoom ...
0
votes
0answers
69 views

Drawing objects that visible on the screen

So I generated a terrain using list's of tiles, and I display it only if its visible on the user screen (if he move's to the right, the tiles that aren't visible wont be drawn, for performance ...
2
votes
1answer
188 views

Is there a penalty to using render targets versus textures?

I figured that the best way to ship 2D art for multiple resolutions is to instruct my artist to create the fullscreen background images sized for the highest resolution and then scale them down during ...
-1
votes
1answer
75 views

Creating an array to manage terrain

I want to create random terrain for my game in XNA but i have a problem: Lets say my game window size is 500X500, so potentially I want an 500 by 500 array right? But here is the problem, my terrain ...
1
vote
1answer
44 views

Proper Directional light on multiple models

I've been trying to implement a Directional light into an XNA game I'm working on, but for what ever reason, I cannot seem to get the directional light to be a true directional light. Instead, I am ...
0
votes
0answers
128 views

Farseer Player Movement and Collision

I have added a video link for any one who whats to see what the problems are by watching the game. I am trying to create a player movement system and there are small problems that I am running into. ...
2
votes
2answers
162 views

XNA: Non-overlapping shadows

I want to create an effect similar to the following in XNA / MonoGame: There's a background and a semi-transparent shadow consisting of several objects (two circles in this example). However, the ...
2
votes
1answer
420 views

What is the license you need to publish to Xbox 360 from Unity3D?

I have a license for deploying and releasing games using XNA. What is the license I need to deploy and publish games using Unity3D, and how do I get it? I have found very little and unclear ...
0
votes
1answer
173 views

XNA and HLSL shaders - Instancing using World Matrix array

I have posted this question on StackOverflow and was directed here, so I'll just copy the question: I am attempting to improvise some sort of hardware instancing in my game. I wish to draw multiple ...
0
votes
1answer
68 views

Optimising a bool spread on a 2D Grid/List

I'm trying to work out a more efficient way of spreading a bool flag across a 2D tilemap, as the way I currently have it setup works, but has to run far too many times to work properly. This isn't a ...
0
votes
0answers
192 views

Non-rectangular hitbox methods in XNA

I'm creating a 2D top-down RPG, and many of my buildings/scenery have non-rectangular corners to the textures. Does anyone know a good way to create circular/triangular/polygonal hitboxes, or is too ...
0
votes
1answer
775 views

How do I get the mouse position relative to the window, not the whole screen?

I am developing an XNA game. I run it in window mode. I need to handle mouse events, but when I use the Mouse class from Xna.Framework.Input.Mouse, I get the the mouse position on the whole screen. ...
1
vote
1answer
76 views

XNA Textures dissappear when game window is resized

[SOLVED] - See linked post in the P.S. I have a set of Texture2Ds generated in the Load method with this function: Texture Generation: private Texture2D[,] createTextureSet(TileInfo[,] map) { ...
2
votes
1answer
289 views

How do I create a player movement system in Farseer?

My group of students is helping produce a a 2D platformer. We tried making a pixel-based collision system which fell through. Now I am trying this physics engine on for size and see new ways to create ...
1
vote
0answers
61 views

Monogame apply tint to only some parts of sprite [duplicate]

Each player is a different colour (Red, Blue, Green, Yellow) and I want a small part of each piece of armour to be tinted to the player colour. Is this possible without using a second armour sprite ...
1
vote
1answer
53 views

How do I render into a sub-region of a texture atlas with XNA / HLSL?

Is it possible to render into a texture atlas? I've been wondering how to reduce the number of textures required for shadow-mapping, and came across a blog post here about rendering up to sixteen ...
0
votes
1answer
79 views

QuadTree treeNode design question

I'm a programming newbie. I have a Quadtree. I created a TreeNode class that the Quadtree will use as nodes. I have spriteNode that inherits from TreeNode. However, I also have several sprite ...
1
vote
1answer
52 views

Why does my camera break mouse position targeting? [duplicate]

I made a short video of this. Basically, when the screen scrolls with the camera, the character begins firing at the incorrect mouse position. You can see where I am clicking the whole time. As we ...
1
vote
1answer
197 views

How do I ensure that my 2D side-scroller camera stays within the world bounds?

I have tried implementing a basic 2D sidescroller camera in XNA, but I don't want it to be able to scroll past the edges of my tile map! I tried to fix it, but when I get the left side working, the ...
0
votes
1answer
64 views

Issue with calling Spritebatch in XNA 4.0 Game [closed]

So, I am creating a game in XNA 4.0, using the program Microsoft Visual C# Studio Express 2010. The issue I am having: I have the entire game done, and there is no reason why it should not be ...
2
votes
1answer
94 views

Monogame/Android: Using content from PCL

I'm quite new to Monogame and PCL, but I hope someone can help me with my question. I have a Monogame/Android project with references a PCL which targets .NET 4.5, iOS and Android. The PCL has ...
-1
votes
2answers
72 views

Why does my character scroll off the screen instead of staying within the bounds of the screen? [closed]

In my XNA game, I have my "big boss" loaded and in the game screen. I put the code to update its position in the Update method of the main class. The objective is to get the "big boss" to move from ...
0
votes
0answers
61 views

“Blinking” graphical bug when rotating shadow matrix

So, we have implemented Krypton shadows into our code for our 2D game, and it's working beautifully. Only issue is that we're running into a bizarre graphical bug when rotating the shadows with the ...
-2
votes
1answer
111 views

Random movement of enemy [closed]

I am making a game in XNA, and I am trying to make an enemy move randomly.The game is a platform game, so the enemy only moves left and right.I want it to move right or left a little, then stop.I ...
1
vote
3answers
957 views

How can I port an XNA game to iOS and Android?

I made a little Windows Phone game with XNA and Farseer Physics engine and I want to port that game to iOS and Android. Is Monogame the only software that I can use or are there alternatives? I don't ...
0
votes
1answer
285 views

How can I find the perpendicular to a 2D vector?

I'm making a top down game where the player moves forwards towards the position of the mouse cursor. As part of the player's movement code, I need to determine a vector that is perpendicular to the ...
-1
votes
1answer
55 views

XNA spritebatch drawing order

Im new in this and im making XNA game. I have problem with spritebatch drawing order. To be explained : i click button to open inventory and i need all drawing to be behind my inventory layout. But ...
0
votes
0answers
119 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 ...
1
vote
0answers
37 views

Squashing screen resolution in XNA [duplicate]

I've made a game in 1920x1080 res in XNA, and I can't seem to find a way for the graphics device to squash the screen images to other resolutions like 1600x900 when played on different computers. How ...
0
votes
1answer
309 views

Monogame: Why is my sprite looking the same on every resolution?

I want that my sprite(Mario) don't look the same on every Windows Phone resolution. If I use this code, the sprite is on every resolution on the right position but it also has the same size on every ...
0
votes
1answer
46 views

XNA SoundEffect with offset

I've been trying to make a soundmanager recently which has several functions which fits my needs. But one thing I can't solve, is the offsetting the soundeffects. Is it possible to play a soundeffect ...
-1
votes
1answer
144 views

Why are the coordinates interchanged in Monogame?

If I use XNA Gamestudio, I can draw a sprite on a specific position like this: spriteBatch.Draw(Texture2D, new Vector2(PositionX, PositionY), Color.White); But in Monogame, I must change the ...
0
votes
1answer
294 views

How can I support different resolutions with Monogame? [duplicate]

I want to support the following 4 resolutions in my Windows Phone 8 game: 480 × 800, 768 × 1280, 720 × 1280, 1080 x 1920. How can I do that with Monogame? If I draw a sprite with Monogame, the sprite ...
6
votes
0answers
254 views

Rotation pitch/yaw reverse problems when picking a tile (2.5D) [closed]

Set-up: 3D world, isometric sprite rendering (4 fixed angles). This transform matrix is used as camera: _transform = Matrix.CreateRotationZ(Roll) * ...
0
votes
1answer
38 views

implementing different users in XNA - XML

So I am making a simple 2D game in XNA, and I want to implement different users (players), so each person playing can have their own high score, can only play levels they've already played, can only ...
0
votes
0answers
260 views

C# XNA game window's ClientBounds not equal to Viewport/BackBuffer at native resolution

I'm having a rather strange issue involving my game window and its resolution. I have a function in my Engine that sets the resolution (with the appropriate checks to make sure the resolution is ...
3
votes
2answers
200 views

Colour intersection of two alpha-blended sprites

In XNA, is it possible to merge two alpha blended sprites so they look like one contiguous shape, eliminating the merge of colour at the overlap? At the moment when I try, the intersection is quite ...
1
vote
2answers
167 views

How do I hide the console window for my released MonoGame game?

I am just finishing up my first game for the One Game A Month challenge which I wrote with the current MonoGame framework in Xamarin for Windows. I built the program in release mode, but running the ...
0
votes
3answers
214 views

How can I properly rotate a 2D vector in the “flipped” XNA client space?

In my 2d XNA game, because SpriteBatch treats world space as client space and has positive Y axis down and negative up, I've built my game's world space with that coordinate system too. However, I've ...
3
votes
3answers
887 views

Event/Trigger System Architecture

The Plan I am up to write write an own Trigger/Event System, an event engine or how you call it. I would like to achive something similar to Blizzard's most level editors, like Starcraft 1-2, ...
0
votes
1answer
126 views

How long will it take to jump from point A to point B?

I need to know how long it takes to jump from one point to another. Because if the jump time takes for example 2.0f(float jumptime = 2.0f), a jump animation is played during a time interval of exactly ...
1
vote
2answers
202 views

XNA blurring moving images

Why does XNA blurs the images which moves less than 1px in between two draws? It is quite annoying, because everything looks really blurry. Is there a way to disable it? I have tried to set the ...
1
vote
1answer
212 views

Tile Based Sprite Collision With Lots of Sprites [duplicate]

I am running into lag when loading many sprites onto the screen. If I have less than 12 on the screen it runs smoothly until I add a couple more and then it bogs down. I currently have this as my ...
0
votes
0answers
33 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
1answer
206 views

Creating a gradient for a texture - Why is the color becoming dark on one side?

Updated While debugging I looked at the lerp and it was calculating into a negative number at the start. So I added in checks for to low or high a value, and that seems to have fixed it. I'll answer ...
0
votes
1answer
203 views

How do you calculate a gradient value within multiple colors (gradient stops)

In WPF/Silverlight XAML you can have a brush with multiple gradient stops at different points along the color line. I was able to replicate this behavior with two colors, a single color lerp, from ...