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

8
votes
1answer
371 views

Picture rendered from above and below using an Orthographic camera do not match

I'm using an orthographic camera to render slices of a model (in order to voxelize it). I render each slice both from above and below in order to determine what is inside each slice. The model I ...
8
votes
2answers
500 views

Automating XNA Performance Testing?

I was wondering what peoples approaches or thoughts were on automating performance testing in XNA. Currently I am looking at only working in 2d, but that poses many areas where performance can be ...
7
votes
3answers
3k views

Random enemy placement on a 2d grid

I want to place my items and enemies randomly (or as randomly as possible). At the moment I use XNA's Random class to generate a number between 800 for X and 600 for Y. It feels like enemies spawn ...
7
votes
3answers
3k views

A cool way of doing Z-index for XNA components?

I am trying to render some elements in my game. First, I render the textures (the textures of the textboxes themselves etc). Then I render the primitives (borders around controls etc). Then I render ...
7
votes
5answers
3k views

Best pathfinding algorithm for a tower-defense game? [duplicate]

What do you suggest would be the best algorithm for a tower-defense game? It's a 2D based tile game, where there is walls and towers blocking the way, between spawnpoints and their destination points. ...
7
votes
4answers
3k views

Using XBOX controllers on PC for an XNA game

Does anybody know how to do this? I have been trying to figure this out with no luck.
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
4answers
217 views

Game development for multiple Microsoft platforms

I intend to develop games for Microsoft's Windows Store, however, I'm confused between their platforms, so please clarify those questions: Is there any technology (XNA, DirectX), so a game can be ...
7
votes
2answers
346 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
479 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
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
9k 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
463 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
3answers
2k views

Is there a simple way to group two or more sprites, so all of them will be dependent on each other?

I think that this question is very similar to this one, but I'm not sure if the answers are universal. So, my goal is: Place two sprites in fixed position, for example player and his eyes Make ...
7
votes
2answers
5k views

How to turn off vsync in XNA 4.0?

I created a FpsCounter DrawableGameComponent (linked to code, it's longish). It seems to work great, it displays 60.0 fps normally, and if I artificially slow down the game loop then it drops. Given ...
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
399 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
625 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
603 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
748 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
853 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
1k 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
706 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
284 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
11k 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
4k 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
1k 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
1answer
801 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
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
632 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
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
1answer
413 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
464 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
245 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
2answers
724 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
677 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
2k views

Voxel Face Crawling (Mesh simplification, possibly using greedy)

Edit: This is just for my own learning experience, it is NOT for performance reasons that I ask this question. This is in regards to a Minecraft-like terrain engine. I store blocks in chunks ...
7
votes
1answer
484 views

Timestep in multiplayer game

I'm trying to wrap my brain around the concept of creating a server/client multiplayer experience. My problem is mainly related to timestep. Consider the following scenario: A client connects to ...
7
votes
2answers
1k 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
1k 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
559 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
548 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 ...