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

17
votes
1answer
7k views

Orienting a model to face a target

I have two objects (target and player), both have Position (Vector3) and Rotation (Quaternion). I want the target to rotate and be facing right at the player. The target, when it shoots something ...
77
votes
6answers
32k views

What is the future of XNA in Windows 8 or how will manged games be developed in Windows 8? [closed]

I know this is a potential dupe of this question, but the last answer there was 18 months ago and a lot has happened since. There seems to be some uncertainty about XNA in Windows 8. Specifically, ...
44
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?
10
votes
1answer
968 views

Information about rendering, batches, the graphical card, performance etc. + XNA?

I know the title is a bit vague but it's hard to describe what I'm really looking for, but here goes. When it comes to CPU rendering, performance is mostly easy to estimate and straightforward, but ...
14
votes
7answers
15k views

How do you calculate where a ball should go when it bounces off the bar?

I'm trying to wrap my head around this very Hello World-y problem in game development. I've created a TicTacToe game in XNA so I guess the next step would be a breakout clone. Keep in mind that I ...
17
votes
4answers
8k views

What are the cons of using DrawableGameComponent for every instance of a game object?

I've read in many places that DrawableGameComponents should be saved for things like "levels" or some kind of managers instead of using them, for example, for characters or tiles (Like this guy says ...
29
votes
16answers
38k views

What are some famous games developed with .NET and/or XNA? [closed]

Are there famous games written in .Net and/or XNA?
53
votes
8answers
6k views

2D graphics - why use spritesheets?

I have seen many examples of how to render sprites from a spritesheet but I havent grasped why it is the most common way of dealing with sprites in 2d games. I have started out with 2d sprite ...
16
votes
2answers
3k views

Best way to mask 2D sprites in XNA?

I currently am trying to mask some sprites. Rather than explaining it in words, I've made up some example pictures: The area to mask (in white) Now, the red sprite that needs to be cropped. The ...
6
votes
3answers
3k views

XNA - Static classes from game libraries executing after content pipeline extensions, how to avoid the problem?

Alright, formulated this way I'm sure it sounds obscure, but I'll do my best to describe my problem. First, let me explain what's wrong with my real source code. I'm making a platformer, and here ...
46
votes
4answers
19k views

How is 2D lighting implemented?

I am wondering what the best way to approach a "lighting" effect in 2D games is. For instance, if my main character is glowing, what techniques can I use to complete the visual effect of the character ...
22
votes
4answers
4k views

Top Down RPG Movement w/ Correction?

I would hope that we have all played Zelda: A Link to the Past, please correct me if I'm wrong, but I want to emulate that kind of 2D, top-down character movement with a touch of correction. It has ...
8
votes
1answer
4k 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 ...
2
votes
2answers
3k views

Loading and unloading “chunks” of tiles in a 2d tile engine with 2d camera

I am making a 2d tile based game in C# and XNA 4.0. I am having trouble loading and unloading "chunks" of tiles(blocks). The whole world is randomly generated and is infinate on both axis. How would I ...
4
votes
1answer
1k views

Turning a sprite such that it rotates in the direction that's most efficient

I have a sprite that moves from waypoint to waypoint. It turns to face its velocity vector, but not instantly (there's a rotation speed). The problem I'm having is, from one direction to another, the ...
27
votes
2answers
8k views

How exactly does XNA's SpriteBatch work?

To be more precise, if I needed to recreate this functionality from scratch in another API (e.g. in OpenGL) what would it need to be capable of doing? I do have a general idea of some of the steps, ...
6
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 ...
12
votes
7answers
7k views

What is a good way to store tilemap data?

I'm developing a 2D platformer with some uni friends. We've based it upon the XNA Platformer Starter Kit which uses .txt files to store the tile map. While this is simple it does not give us enough ...
10
votes
2answers
7k views

How to generate projectiles with the direction of the mouse pointer

I'm experimenting on a small top-down space shooter where the player controls a ship and he can shoot bullets toward the direction of the mouse cursor. My question is how can I shoot the bullets with ...
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 ...
5
votes
2answers
3k views

How to determine collision direction between two rectangles?

I am trying to figure out how to determine the direction a collision occurs between two rectangles. One rectangle does not move. The other rectangle has a velocity in any direction. When a collision ...
3
votes
3answers
3k views

Alpha blending not rendering properly XNA 4.0

I'm trying to render a tree made out of 2 rectangles intersecting in the center at a 90degree angle. The texture has an alpha channel but which ever rectangle gets rendered second causes a weird ...
13
votes
4answers
2k views

Where is XNA headed? [closed]

I love XNA. I really do. As president of the Game Development Club at my school, we use it and I teach it. But I'm worried about it. I've always wondered, are there any signs that XNA will ever ...
52
votes
7answers
5k views

What are the dangers of self-teaching game development? [closed]

I am about to embark upon a journey into game development. Following answers to my last question, I will be using C# and XNA. However, I don't personally know any other game developers and I don't ...
24
votes
10answers
2k views

Effects to make a speeding spaceship look faster

I have a spaceship and I've created a "boost" functionality that speeds up my spaceship, what effects should I implement to create the impression of high speed? I was thinking of making everything ...
12
votes
4answers
4k views

Curved movement between two points

What is a good technique to enable an object to move between to points in a nice curved motion? The end position could also be in motion, such as the trajectory of a homing missile.
5
votes
1answer
6k views

How can I use Rectangle.Intersect() to resolve collisions in XNA?

I have a 2D game written in XNA, and I've been trying to fine-tune my collision resolution. All of my game objects are squares, which means detecting a collision is easy - use the position and the ...
6
votes
1answer
1k views

How to chain actions/animations together and delay their execution?

I'm trying to build a simple game with a number of screens - 'TitleScreen', 'LoadingScreen', 'PlayScreen', 'HighScoreScreen' - each of which has it's own draw & update logic methods, sprites, ...
5
votes
6answers
2k views

Making classes available to others

I'm currently working on a 2D game engine in XNA, and I am very interested in architecture, and how best to let my game objects communicate. I know a lot of people use a Singleton design but I ...
9
votes
2answers
8k views

How to use XML files as content files in XNA?

I have an XML file representing different car manufactures that will be available in my game. The file looks like this: <?xml version="1.0" encoding="utf-8" ?> <XnaContent> <Asset ...
3
votes
1answer
636 views

How do I make a jumping dolphin rotate realistically?

I want to program a dolphin that jumps and rotates like a real dolphin. Jumping is not the problem, but I don't know how to make the rotation. At the moment, my dolphin rotates a little weird. But I ...
24
votes
6answers
6k views

A way to store potentially infinite 2D map data?

I have a 2D platformer that currently can handle chunks with 100 by 100 tiles, with the chunk coordinates are stored as longs, so this is the only limit of maps (maxlong*maxlong). All entity positions ...
20
votes
11answers
4k views

XNA development tutorials

Can anybody guide me about where can I get the basic starter tutorials for developing using XNA framework?
17
votes
7answers
16k views

What are some known 2D/3D physics engines for XNA? [closed]

I'm looking for a physics engine to use in an XNA project (2D or 3D). Because it's for XNA, it needs to fulfill some requirements: Not necessarily free, but close to it is obviously preferred ...
15
votes
1answer
4k views

Terrain Generation for Tile-Based 2D Platformer

I'm currently working on a tile-based 2D platformer similar to Terraria in some ways, although I'm having difficulty with the terrain generation. I have some basics done, although they do not come out ...
32
votes
1answer
4k views

Mouse aim in an FPS

I would like to make a First Person Shooter and move the camera with the mouse. The problem is that when the cursor reaches the limits of the screen, the camera won't turn anymore. How can I keep the ...
18
votes
3answers
2k views

How can I create a lighting effect like this?

This is the most beautiful 2d lighting I have ever seen, and I'd like to perform lighting like this too. How do I do it? I don't care about the physics or how the particles are simulated - I only ...
12
votes
4answers
3k views

How can I acheive a smooth 2D lighting effect?

I'm making a 2D tile based game in XNA. Currently my lightning looks like this. How can I get it to look like this? Instead of each block having its own tint, it has a smooth overlay. I'm assuming ...
2
votes
3answers
2k views

How do I check collision when firing bullet?

I'm currently creating 2D game from top perspective. I'm having problems with bullets. Yes, I currently simulate their movement so user can see them (about 2x ). Moving them with // this is static ...
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 ...
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 ...
8
votes
1answer
6k 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 }.
27
votes
7answers
7k views

Can you access Kinect motion sensing from XNA?

As of 2010 with the release of XNA 4.0, if I buy an Xbox 360 with Kinect will I be able to access its motion sensing data with the XNA game I'm developing? Or is this only restricted to C++ developers ...
16
votes
4answers
1k views

How to colorize certain parts of a model - like RTS games have those team colors?

I am in a need of implementing something we see in RTS games: team colors. Basically, I am looking for a way to colorize certain parts of a model. How would I achieve this? I have no idea where to ...
11
votes
2answers
2k views

Arbitrary Rotation about a Sphere

I'm coding a mechanic which allows a user to move around the surface of a sphere. The position on the sphere is currently stored as theta and phi, where theta is the angle between the z-axis and 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 ...
4
votes
3answers
7k views

2D Tile-based Collision Detection

I've been planning an indie game project for a while now. I'll summarise it for you so I can get right to the question. It's done entirely using the latest version of XNA through Visual Studio. ...
12
votes
6answers
5k views

Making (or emulating) a “D-Pad” on a touch-screen; virtual d-pad

With the proliferation of touch based devices, many lacking a true D-Pad, I'm wondering if anyone has any resources on how to emulate a D-Pad on a touch screen? I'm specifically interested in XNA ...
9
votes
2answers
2k views

Isometric Collision Detection

I am having some issues with trying to detect collision of two isometric tile. I have tried plotting the lines between each point on the tile and then checking for line intercepts however that didn't ...
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 ...