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

Adding 'xna content project' reference to monogame project(visual studio 2013 pro)?

I want to add reference to an xna content project. Which should be like the content project reference we have in an xna windows game. I am on visual studio 2013. I got the xna extensions to work by ...
4
votes
4answers
532 views

How can I draw a shadow under my character?

I created a 2D tile-based jump and run game for Windows Phone and I want to draw a shadow under the character. How can I do that? The shadow must also be drawn on the tiles if the character jumps. The ...
1
vote
1answer
130 views

Why does my collision detection code cause my framerate to drop?

I have this code: foreach (CollisionTiles tile in map.CollisionTiles) { player.CollisionBox(tile); foreach (Enemy enemy in enemys) enemy.CollisionBox(tile); } This is the CollisionBox() ...
2
votes
2answers
106 views

Sweep collision between two moving spheres?

Say I have a scenario like this: Here I got two spheres (sphere A and B) that moves from on spot to another during a frame. How can I predict where these two collide if they collide at all? In ...
2
votes
1answer
158 views

C# - XNA - Making a Modular Screen / State Manager

I'm not entirely sure how to ask this question since its somewhat broad, but also a bit specific to my code. I'm making a game in C# XNA and attempting to have the parts of it be fairly modular so ...
3
votes
1answer
155 views

How can I use a Texture2D larger than 2048 x 2048?

I'm having issues working with a large image. I've read other threads on using images larger than a Texture2D supports, but found nothing that addresses my problem specifically with implementation ...
1
vote
1answer
77 views

Is Spine's XNA runtime missing an importer? [closed]

I'm writing an XNA 4.0 game and use Spine for animation. Until now, I've been making spritesheets with Spine and using them with a custom animation class. I recently discovered there is an official ...
0
votes
1answer
108 views

Looking for XNA patterns [closed]

Hello mature game developers. Im just started with XNA, but i got solid expirence with C#. I wonder is there any common code patterns for XNA games? Like should i make classes wich handle draw and ...
0
votes
2answers
113 views

how to make a spritefont with multiple colors and black?

I want to make a multicolored font like: My problem is that black is someway "set" as the transparency background for the font, so if i use black or any dark color xna takes it as background too. ...
0
votes
1answer
104 views

Rectangle touch sides of another rectangle

I am making a platformer game and im trying to make the player collide with all the blocks, here's a picture: The blocks is stored in List and im trying to get the side's of the block usin static ...
1
vote
1answer
379 views

Why is my Texture becoming slower when it approaches it's destination?

I have a texture drawn on screen. Whenever I click on the viewport it remembers its destination and starts moving towards it, until it is there. This is the code I am using therefore: //Check if ...
4
votes
1answer
120 views

Cubic bezier for easing?

I would like to find out what Y is if X is a certain number from a cubic bezier curve to make a custom easing function, like it's done on this site: http://cubic-bezier.com/ Does anyone know a formula ...
0
votes
0answers
75 views

Precalculating timespan of bullet collision on cubic bezier curve circles?

I'm fairly new to game logics, C#/XNA (The language/library of choice) and bezier curves in general, and is stuck in my current project. I'm going to try to explain as thoroughly as I can what the ...
1
vote
0answers
57 views

Texture visualization problem on camera movement (xna)

I'm trying to move a camera over a model that is used as the floor of the game. When I move the camera, the texture of the model is not showing correctly (video of the problem: ...
1
vote
1answer
78 views

XNA - Prevent Holding of Mouse Button as Part of an Input Handler Game Component

I'm using C# XNA 4.0 Refresh. I'm working to create an InputHandler Game Component for my XNA game to handle all of the keyboard and mouse input. I used SixOfElevens RPG Game Tutorial (Here - ...
2
votes
1answer
120 views

C# XNA - How to create a menu with bools and textures?

I thought I could use bools to be able to select options in my menu. But the options should be textures. To show that an optino is selected I have 2 textures like this: [----Menu Screen----] [ > ...
1
vote
0answers
111 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
218 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
48 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
87 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
48 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
58 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 ...
0
votes
0answers
73 views

Sorting 3D particles by depth

This is a general particles question, but I use XNA/MonoGame so I looked at: http://xbox.create.msdn.com/en-US/education/catalog/sample/particle_3d for Particles 3D. I found the example not to ...
2
votes
1answer
155 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
73 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
40 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
94 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
124 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
304 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
111 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
66 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
128 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
378 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
62 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) { ...
1
vote
1answer
213 views

Player Movement Systems

I am working on a project were in class my group of students help produce a video game. We are creating a 2D platformer and was trying to make a pixel based system collision witch fell through. Now I ...
1
vote
0answers
55 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
45 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
73 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
46 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
156 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
60 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
75 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
69 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
57 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
104 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
386 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
123 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
47 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
90 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
36 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 ...