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

7
votes
2answers
1k views

How can I factor momentum into my space sim?

I am trying my hand at creating a simple 2d physics engine right now, and I'm running into some problems figuring out how to incorporate momentum into movement of a spaceship. If I am moving in a ...
7
votes
2answers
343 views

Does the older Xbox 360 Elite support XNA 4?

Can I develop an XNA 4.0 game for the older Xbox 360 Elite? Or would I need a newer Slim model?
7
votes
4answers
475 views

I made a game in XNA - how can I share it with my friends?

I've just finished programming a charming (albeit bare-bones) XNA version of arcade classic Tempest. Hooray! Given that this was a homework assignment, I'd like to be able to share it with my ...
7
votes
1answer
5k views

Get position of point on circumference of circle, given an angle?

I would like to know how to get a specific point on the circumference of a circle, given an angle. The diameter of the circle is 1, and the center point of the circle is { X: 0.5, Y: 0.5 }.
7
votes
1answer
1k views

XNA - just a few more characters accepted in a SpriteFont

I have a SpriteFont in XNA, which has the standard 126 characters that are usable. However i would like to use the "ಠ" symbol in the game. So is there anyway of adding just a few more symbols that ...
7
votes
4answers
8k views

2D Platform Game Jumping

I'm currently writing a game in XNA for fun which uses C#. I have got my sprites loaded and when the character moves right he looks like he is running right and when he moves left he looks like he is ...
7
votes
1answer
449 views

Global keyboard states

I have following idea about processing keyboard input. We capture input in "main" Game class like this: protected override void Update(GameTime gameTime) { this.CurrentKeyboardState = ...
7
votes
1answer
3k views

Microsoft XNA Platformer Example, is the Collsion Detection implemented accurately?

The example provided by Microsoft seems as if the collision detection (from what I can see) will have a small error. When the user collides with an Unpassable tile, the depth of the intersection is ...
7
votes
2answers
1k views

Rounded corners in XNA?

Is there any way that I can make rounded corners on a rectangle rendered in XNA through primitives (line-strips)? I want to make my UI a bit more fancy than it is already, and I would like the code to ...
7
votes
4answers
396 views

How can I test different TV display types for my XBLIG game?

The XBLIG submission check-list says to ensure that all important stuff critical to game-play be visible in the 'TitleSafeArea'. I've received a bug report during play-test of my game (Crazy Balloon ...
7
votes
2answers
2k views

Learning XNA 3.1 Vs XNA 4.0

I am starting out learning XNA and its going smoothly. However I wonder if I am shooting myself in the foot by learning 3.1 not 4.0? I am also aware Microsoft obviously has a conflict on interest in ...
7
votes
3answers
487 views

Reusable top-down collision class

I've recently picked up monogame and am working on a simple top down game to get me started and learn the basics. I've got the movement and the rotation to follow the mouse sorted out but I'm stuck ...
7
votes
2answers
558 views

Rotate a vector

I want my first-person camera to smoothly change its viewing direction from direction d1 to direction d2. The latter direction is indicated by a target position t2. So far I have implemented a ...
7
votes
5answers
648 views

Sprites rendering blurry with velocity

After adding velocity to my game, I feel like my textures are twitching. I thought it was just my eyes, until I finally captured it in a screenshot: The one on the left is what renders in my game; ...
7
votes
1answer
813 views

Problem with Update(GameTime) Methods and Pause implementation

I have the pause function implemented and it works correctly in that it dims the player screen and stops updating the gameplay. The problem is that GameTime continues to increase while it is paused, ...
7
votes
1answer
944 views

XNA Sprite Flash Effect

I'm looking for a way to render every non-transparent pixel in a sprite solid white (to 'flash' the sprite white when the player takes damage etc). This is on Windows Phone 7. I was using a very ...
7
votes
3answers
681 views

Polygon editor to draw collision data over image

I need an editor to plot a polygon over the texture for of a ship in my game. It would look like this.. Where the red is the collision outline and the image is the texture. I want to store the ...
7
votes
5answers
3k views

Moving my sprite in XNA using classes

Hey, im a newbie at this programming lark and its really frustrating me. I'm trying to move a snake in all directions while using classes. Ive created a vector2 for speed and ive attempted creating a ...
7
votes
3answers
2k views

Programatically loading fonts, textures, and media in XNA

So far, in my rhythm game, I've been using XNA's Content Pipeline for loading static resources in my app (videos, sound effects, etc). However, down the road I'd want to allow users to create their ...
7
votes
2answers
3k views

2D Game C# click-to-move samples?

Currently I am learning how to use XNA by making a 2D Game. So far I am doing okay, but I want to implement a click-to-move instead of using the keys to walk around but I haven't found any samples ...
7
votes
2answers
254 views

How do I implement variation in font letters, like handwriting?

I can use a sprite sheet to automatically use a custom font. What I'd like to do though is to have several versions of each letter, such that the letters can be varied and more natural looking (a la ...
7
votes
7answers
9k views

How to generate Spritefonts for monogame

I just want to render some text to the screen using: monogame 3.0 MS Visual Studio 2010 C# Express In XNA, you were able to add fonts to the content pipeline quite easily. But this doesn't seem to ...
7
votes
1answer
3k views

Elapsed game time differs from total game time in XNA

I was trying three different ways of using ElapsedGameTime and TotalGameTime, because I want an exact match, so everything is updated/drawn accordingly. As I was experimenting, I learned that the ...
7
votes
1answer
942 views

How do I communicate with an IronPython component in a C#/XNA game?

My XNA game is component-oriented, and has various components for position, physics representation, rendering, etc, all of which extend a base Component class. The player and enemies also have ...
7
votes
2answers
1k views

Managing game state / 'what to update' within an XNA game 'screen'

I'm trying to figure out how best to manage state within my game screens - please bare with me though! At the moment I'm using a heavily modified version of the fantastic game state management example ...
7
votes
2answers
602 views

Is there a limit to Gametime.TotalMilliseconds?

Gametime should always be increasing, and totalmilliseconds is going to be the largest value. So if the game is hypothetically run for 1 day, this value should 86 400 000. This probably isn't a ...
7
votes
1answer
412 views

How can I selectively update XNA GameComponents?

I have a small 2D game I'm working on in XNA. So far, I have a player-controlled ship that operates on vector thrust and is terribly fun to spin around in circles. I've implemented this as a ...
7
votes
2answers
419 views

How do I make Windows store recognize multiple resolutions?

I'm currently developing a XNA Game for Windows phone 8, it works with every emulator resolution (WXGA, WVGA, 720p). However, when I upload the XAP to the Windows phone store it tells me that only ...
7
votes
1answer
642 views

How can I achieve a 3D-like effect with spritebatch's rotation and scale parameters

I'm working on a 2d game with a top-down perspective similar to Secret of Mana and the 2D Final Fantasy games, with one big difference being that it's an action rpg using a 3-dimensional physics ...
7
votes
2answers
2k views

How to decompose sprite sheet

I have a lot of spritesheets that are poorly formatted that I want to decompose, or split out into many small images, one for each sprite. If I can do that, I can use my custom texture packer tool to ...
7
votes
1answer
240 views

XNA 4 game for both profiles

I am writing game in XNA 4 and this version have two profiles hi-def and reach. My problem is that I need to have my game code for each of these profiles and is very uncomfortable to have two projects ...
7
votes
3answers
1k views

How do I adjust the origin of rotation for a group of sprites?

I am currently grouping sprites together, then applying a rotation transformation on draw: private void UpdateMatrix(ref Vector2 origin, float radians) { Vector3 matrixorigin = new ...
7
votes
2answers
707 views

Using GPU on Silverlight 5 for a Fast Fourier Transform

I've got an audio library for Silverlight that is in need of some acceleration on slower machines. Specifically, this library makes extensive and repeated use of the FFT transform as a part of its ...
7
votes
2answers
1k views

Question about top down/side scrolling!

I know that its just the background that scrolls and the player pretty much stays centered. What I am wondering what technique is more correct when I am implementing a large side scrolling map (I am ...
7
votes
1answer
1k views

In XNA, should I use the built-in game component classes?

I'm just getting started on an XNA game for Window Phone 7. For my Flash games I have my own framework that I was just going to port from AS3, but I have just found the built-in game component stuff ...
7
votes
1answer
650 views

Developing an RPG Encounter System

I'm in the middle of an encounter system for an XNA RPG. The idea is, you walk around a dungeon, and certain tiles are makred as RandomBattleTiles, and you have an area in the map defining what ...
7
votes
2answers
900 views

How to deal with variable size font in XNA 4.0

After searching for a while, I found no way to draw vector/scalable fonts in XNA 4.0 (which would be perfect...) and I am currently in a bind about how to render fonts for my game. In the game I use ...
7
votes
2answers
957 views

Blurring point light variance shadow map

I've been working on implementing variance shadow mapping for my game. I was able to get a spot light working with variance shadow mapping with a gaussian blur applied to the shadow map to reduce the ...
7
votes
1answer
552 views

XNA 2D Collision Detection without GetData()

I'm currently working on a Worms game which involves terrain deformation. I used to do it with .GetData(), modifying the color array, then using .SetData(), but I looked into changing it to make the ...
7
votes
2answers
1k views

HLSL - Creating Shadows in 2D

The way that I create shadows is by the following technique: http://www.catalinzima.com/2010/07/my-technique-for-the-shader-based-dynamic-2d-shadows/ But I have questions to HLSL. The way that I ...
7
votes
1answer
2k views

XNA Quadtree with LOD

I'm looking to create a fairly large environment, and as such would like to implement a quadtree and use LOD on it. I've looked through numerous examples and I get the basic idea of a quadtree. Start ...
7
votes
1answer
491 views

Spritebatch drawing sprite with jagged borders

Alright, I've been on the making of a sprite class and a sprite sheet manager, but have come across this problem. Pretty much, the project is acting like so; for example: Let's take this .png ...
7
votes
2answers
382 views

Windows Phone Performance Analysis makes game run faster. Possible reasons?

A XNA game I was making was running slowly on my WP7 device. However when I started it in Windows Phone Performance Analysis to find the bottleneck, the game ran smoothly on the same device. I ...
7
votes
1answer
366 views

Trying to use stencils in 2D while retaining layer depth

This is a screen of what's going on just so you can get a frame of reference. http://i935.photobucket.com/albums/ad199/fobwashed/tilefloors.png The problem I'm running into is that my game is ...
7
votes
1answer
655 views

Implementing water effects (splashes) into XNA 4.0 game [closed]

I am creating a 2D XNA game and came across a tutorial on adding water effects (splashes) to an XNA game but after implementing it into my game I can't get it to scale down. Currently it takes up the ...
6
votes
4answers
5k views

How much memory does a texture take up on the GPU?

A large png on disk may only take up a couple megabytes but I imagine that on the gpu the same png is stored in an uncompressed format which takes up much more space. Is this true? If it is true, how ...
6
votes
2answers
520 views

Why does the order matter in multiplication of matrixes?

I stumbled on this question because I had the same problem with my camera, and changing the multiplication order worked. I ran into a similar problem when scaling a model. This code produced the ...
6
votes
2answers
3k views

What kind of culling does XNA do for me?

Which kinds of culling and clipping does XNA do for me as default, and which kinds does it not? Z-culling? Backface culling? etc.
6
votes
5answers
1k views

Why do objects interpenetrate in this simple collision solver?

The code below is from a Microsoft XNA sample here. This is quite a simple rigid body simulation that ignores many physical effects (such as angular momentum), but it does try to push objects ...
6
votes
4answers
2k views

How do I add Different Screens to my C#/XNA Game?

I'm working on a Pong clone in XNA. Gameplay-wise, I have it where I want it to be. I want to add a title screen and some other screens to it like a menu, as well as a screen for the Winning/Losing ...