XNA Game Studio 4.0 is a programming environment that allows you to use Visual Studio to create games for Windows Phone, the Xbox 360 console, and Windows-based computers.

learn more… | top users | synonyms (1)

46
votes
3answers
10k views

Optimizing an XNA 2D game

Does it make sense to implement the logic to skip rendering objects outside the viewport or should I not care about it and let the Framework do it?
35
votes
8answers
17k views

How'd they do it: Millions of tiles in Terraria

I've been working up a game engine similar to Terraria, mostly as a challenge, and while I've figured out most of it, I can't really seem to wrap my head around how they handle the millions of ...
17
votes
4answers
3k views

What are the differences between XNA 3.1 and 4.0?

I have been away from XNA for a couple months and want to get back into it. I had a game I was currently working on, but it was done in XNA 3.1. What are the differences between the two, and is it ...
16
votes
2answers
24k views

Error on new XNA 4.0 game project - No suitable graphics card found

Any ideas on how to fix this? According to what I remember about XNA 3 was that when running the application from scratch, I would get a blue colored windows with nothing rendered. Any suggestions? ...
14
votes
2answers
3k views

Creating an electricity/lighting/tesla coil effect in a 2D XNA game?

I'd like to create beams of electricity between two points very similar to this video: http://www.youtube.com/watch?v=eMJ8-56L3Lc. The effect is so dynamic, with varying lengths and pseudo-random ...
14
votes
1answer
3k views

How do you add equipment to a 3D character model using XNA/Blender?

I've watched quite a few Blender tutorials, but I have yet to see examples of how to swap out sub-models. So my question is, how do you swap out equipment on a character model? Specifically I’d like ...
14
votes
3answers
2k views

Faking isometric graphics in a 2D space game

First off, I know exactly what my drawing problem is, and I have various ideas on how to approach solving it. I am here to figure out how to adjust which frame is drawn so that the isometric ...
12
votes
3answers
1k views

Why are there lines in between my tiles?

I'm making a top down XNA game. The maps are created by tiles. A problem I recently noticed is a 'grid' of lines between the tiles. It only shows up sometimes and only depending on the camera ...
12
votes
2answers
2k views

Playing a Song causing WP7 to crash on phone, but not on emulator

I am trying to implement a song into a game that begins playing and continually loops on Windows Phone 7 via XNA 4.0. On the emulator, this works fine, however when deployed to a phone, it simply ...
12
votes
2answers
839 views

XNA: Questions regarding games architecture

So I've finally got around to playing around with XNA and have been toying around with making a 2D game (I have a bunch of art assets from a friend who developed it on iOS) A lot of things seem to be ...
12
votes
1answer
3k views

Disposing only certain resources in XNA?

The ContentManager in XNA 4.0 only has one Unload() method that Unloads all Assets. I want to have some "global" Assets that are always loaded, but then I want per-Level Assets which should be ...
12
votes
1answer
2k views

How can I create gradiented Fog of War?

I'm creating a top down 2D RTS game for educational purposes. Currently, I'm really just copying Starcraft's design/ideas. I've decided I should probably implement Fog Of War too. My expectations: ...
11
votes
2answers
6k views

How do I disable texture filtering for sprite scaling in XNA 4.0?

I have a sprite that I'm trying to scale up in XNA, but XNA is applying some sort of texture filtering that smooths it and makes it look ugly. I'd like it to just do pixel doubling instead of ...
11
votes
6answers
674 views

Run XNA game without graphics

Wondering if there is anyway to run an XNA game with out displaying anything. I have a working game that runs in a client server setup where one player is the host and other people can connect to ...
11
votes
1answer
797 views

How do I prevent XNA from pausing Updates while the window is being resized/moved?

XNA stops calling Update and Draw while the game window is being resized or moved. Why? Is there a way to prevent this behaviour? (It causes my network code to desynchronise, because network ...
11
votes
2answers
2k views

Export Blender 2.59 models with animations to XNA 4

Whats the best way to export from Blender 2.59 for XNA 4? I have heard you can use the DirectX to export to .x instead of .fbx which works better with animations? Unfortunately all the tutorials out ...
11
votes
2answers
1k views

Projective texture and deferred lighting

In my previous question, I asked whether it is possible to do projective texturing with deferred lighting. Now (more than half a year later) I have a problem with my implementation of the same thing. ...
10
votes
1answer
403 views

How to know if the player is signed in?

I was wondering if there's any way to know if the "player" is signed in or not? Something like this: if (GamePad.GetState(PlayerIndex.Two).IsConnected && !Gamer.PlayerTwo.IsSignedIn) So ...
10
votes
2answers
1k views

In-Game Level Design with XNA?

I am wondering about in-game level design. My current situation revolves around Tiled - I have many different layers with different types of objects in them (for anyone who isn't familiar with Tiled, ...
10
votes
1answer
6k views

Ultimate beginner's tutorial to 3d game dev using XNA Framework?

I'm looking for a tutorial that starts at square 1 for game development and moves up through intermediate/expert levels of 3D game development. I really want to get into 3D game dev and I've been ...
9
votes
4answers
639 views

Make the player run onto stairs smoothly

I have a 2D Platform game, where the player Always runs to the right, but the terrain isn't Always horizontal. Example: I implemented a bounding-box collision system that just checks for ...
9
votes
5answers
4k views

45° Slopes in a Tile based 2D platformer

I want to have simple 45° slopes in my tile based platformer, however I just cant seem to get the algorithm down. Please take a look at the code and video, maybe I'm missing the obvious? ...
9
votes
3answers
594 views

Outline sprites

I'm currently working on a 2D game, and my current task is to outline selected object. I basically use a blur shader to do it fully runtime. I first draw my sprite using a vertical gaussian blur ...
9
votes
1answer
657 views

Portable buffered keyboard input for XNA / MonoGame?

As a preliminary solution, I am currently using the Nuclex framework in an C#/XNA game project for buffered keyboard input. Sadly, nuclex relies on SlimDX.Directinput.dll and therefore to my knowledge ...
8
votes
3answers
5k views

How do I make objects move along a path?

I'm trying to get something like the below image. As you can see, there's a highway and inside of it, there'll be some objects moving (millisecond). I guess the street behavior is like a pipeline. ...
8
votes
3answers
627 views

Vector3 vs. Vector2 - performance, usage?

I'm currently playing around with XNA, and creating a simple 2D platformer. I was thinking of adding multiple layers to make it a little bit of challenge. In stead of having a Vector2 for my ...
8
votes
4answers
856 views

Which is better, one big level model or multiple smaller level models?

I am writing a game in XNA 4 and I want to have something like a corridor. Do you think that is better to use one big and solid model, or to use multiple small parts (window, stairs, door...)?
8
votes
4answers
4k views

Should I use Events in a XNA Game?

I created a button class which draw a button on the screen. When I click on it, I want to see something happening. In WinForm, I would simply use the event OnClick of the button. What about XNA? ...
8
votes
5answers
1k views

How can I simulate shattering glass?

I need to make a simulation with stone thrown through a glass window. How can I accomplish that? I mean, I was thinking about making a 3D model of a stone and glass in 3D Studio Max 2012, shatter the ...
8
votes
2answers
2k views

Getting rid of dead objects in a game effectively?

I'm using a for loop or foreach loop (doesn't matter) to loop through all my objects when they need to be updated or drawn. However, when an object gets killed, I want it to get removed from the ...
8
votes
2answers
3k views

Eliminate delay between looping XNA songs?

I'm making a game with XNA and trying to get some background music to loop correctly. Because the file is an MP3 of about 30 seconds in length, I instantiated it as a Song. I want it to loop ...
8
votes
3answers
3k views

Load all content from folder

I want to ask, is there way to load in xna all content from folder ? For example in my content I have: Images/hero Images/car Images/tree I want to make something like this ...
8
votes
3answers
855 views

Inverted textures

I'm trying to draw textures aligned with this physics body whose coordinate system's origin is at the center of the screen. (XNA)Spritebatch has its default origin set to top-left corner. I got the ...
8
votes
2answers
579 views

What are some ways to texture map a terrain?

I'm working with XNA on a 3D Game, and I'm trying to have a proper and nice environnement. I actually followed a tutorial to create a terrain from a heightmap. To texture it, I just apply a grass ...
8
votes
1answer
495 views

How do I stop stretching during window re-size in XNA?

In my windowed mode XNA game when the user resizes the window the game stops updating the window and the last frame drawn is stretched and distorted until the user releases the mouse and the resize ...
7
votes
5answers
3k views

2D Procedural Terrain Generation - Guaranteeing connectedness?

I'm working on a 2D platformer in XNA. One of things I'd like to be a main design characteristic is procedural content generation. The first step of that is to procedurally generate the terrain. So, ...
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
2answers
3k views

The true cost to get my XNA game on XBox?

There seem to be many hurdles to get ones game onto Xbox, so far I have uncovered: You need Visual Studio (once your game becomes commercial you cannot use Express - but have to pay for ...
7
votes
4answers
3k views

How do you manage your game resources in XNA?

In the past I have used Content.Load<type>("filename"); all over the place. This quickly becomes a nightmare to manage and worse you start having multiple copies of the same asset loaded in ...
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
4answers
400 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
1answer
854 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
648 views

How To Approach 360 Degree Snake

I've recently gotten into XNA and must say I love it. As sort of a hello world game I decided to create the classic game "Snake". The 90 degree version was very simple and easy to implement. But as I ...
7
votes
3answers
560 views

How do I target a tank turret with an offset barrel?

I have a tank model consisting of multiple parts, a body, a turret and the barrel of the gun. The turret is offset from the body origin and can rotate around the Y axis(up). The barrel is connected to ...
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
1answer
4k views

Resolution Independent 2D Rendering in XNA

I am trying to figure out the best way to render a 2d game at any resolution. I am currently rendering the game at 1920x1200. I am trying scale the game to any user selected resolution without ...
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
4answers
884 views

How can I create NPCs and scenes?

How would I go about creating NPC Events/Scenes? For example, any RPG will have a ton of different in-game cut scenes where you can express a story line. What I have thought of so far is having ...
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 ...