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)

2
votes
0answers
694 views

XNA 4 Deferred Rendering deforms the model [closed]

I have a problem when rendering a model of my World - when rendered using BasicEffect, it looks just peachy. Problem is when I render it using deferred rendering. See for yourselves: what it looks ...
6
votes
3answers
813 views

Why is my model's scale changing after rotating it?

I have just started a simple flight simulator and have implemented Roll and pitch. In the beginning, testing went very well; however, after about 15-20 seconds of constantly moving the thumbsticks in ...
7
votes
2answers
4k 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 ...
1
vote
1answer
778 views

How to set TextureFilter to Point to make example Bloom filter work?

I have simple app that renders some particles and now I am trying to apply the bloom shader from the xna samplers ( http://create.msdn.com/en-US/education/catalog/sample/bloom ) to it, but I am ...
4
votes
2answers
437 views

Does XNA support 1 dimensional textures

Does XNA support 1 dimensional textures. And by 1 dimension texture I mean something like Texture1d not a Texture2d where one dimension is 1 (because of the 4096 limit)
3
votes
1answer
331 views

How to access the nth element in a 2d texture from a pixel shader in XNA

How can I access the nth element in a texture2d from a pixel shader? For example if I wanted to get the 5th vector4 from 10 x 10 texture2d
0
votes
2answers
308 views

What does tex1D do with a 2d texture?

If I call tex1d from my pixel shader on a texture that has been initialized as a texture2d will it treat the data as a one dimensional array and then just take the element at whichever position you ...
1
vote
1answer
355 views

XNA CustomModelAnimationSample problem

I downloaded the official tutorial from:CustomModelAnimationSample It works fine but when I try to replicate it in my project, it fails to load the Tag property in my model. Is found that the probelm ...
2
votes
1answer
545 views

What are the GPU requirements for XNA 4.0?

I tried to build a sample application using XNA, but I got an error saying that Pixel Shader 1.1 was required, so I got a used Radeon X300 GPU that supports Pixel Shader. I tried to build it again, ...
-5
votes
1answer
622 views

How do I make the Cylinder in the model?

I have a class which will draw cylinders with deformer's index in the FBX file. The deformer which was in the 3ds max's biped. ex: If I have 22 bones in the deformer's structure, I will draw 22 ...
1
vote
1answer
927 views

Why does changing the diffuse color of my model's effect change it for all models?

I want to change color of individual model in my game. But when I use effect.DiffuseColor = newColor then all of models which were loaded from same model file change color too. How can I do ?
7
votes
4answers
961 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 ...
10
votes
2answers
3k 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
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 ...
6
votes
2answers
539 views

How does one specify raster operations in XNA?

I'm looking for a way to add a sprite using a particular logic operation (like XOR). I can't find anything on Google and I'm not sure where to look in the documentation. I've looked into ...
1
vote
2answers
927 views

How do I move a 3D particle using the Mercury particle engine?

I'm currently creating a 3D game with XNA, and I am in need of some particles.That's why I searched for a particle engine. I found Mercury, watched the tutorials and integrated it in the game. But ...
7
votes
2answers
2k views

How do I align the matrix used in SpriteBatch and the matrix used in BasicEffect?

I'm writing a Windows tool that uses XNA and allows the user to place textures on the screen. I'm using a 'camera' for the SpriteBatch used to draw the textures, e.g: Matrix matrixForSpriteBatch = ...
2
votes
1answer
364 views

How to create a view looking down the sight of the gun

I am in the midst of creating an FPS game using XNA. I am using the camera class from the First Person camera demo from dhpoware.com, and everything is working great. What I'd like to implement is ...
7
votes
4answers
4k 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 ...
3
votes
2answers
747 views

16-Bit textures in XNA 4 on WP7

WP7 textures are supported in the Reach-Profile that WP7 devices falls into. But XNA converts all my ressources upon adding them to a project to RGBA8, that's insane, the displays of WP7 devices are ...
6
votes
9answers
2k views

Is it essential that I learn Try/Catch and Finally statements for Game Programming, or is it something I can come back to? [closed]

Doesn't seem like something that would be an essential part of GAME Programming.
6
votes
4answers
2k views

Fading to transparent with premultiplied alpha

I'm fading an object from fully visible to transparent, but the fade darkens the object. this.Color = Color.Lerp(Color.White, Color.Transparent, weight); The object does fade to transparent, but.. ...
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 ...
1
vote
1answer
113 views

Issue With Image Rendereing

I'm pretty New to the XNA Side of things, I have built in PhotoShop a Set of frame by Frame images side by side to go through an animation class to display them frame by frame. With this my images ...
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 ...
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 ...
0
votes
1answer
184 views

Is it possible (from the vertex shader) to always draw at specific pixels?

I am wondering if I can (if possible) make a vertex shader that will always make the pixel shader draw everything in 1 pixel, at position 0,0. I know this sounds crazy, but it's needed in the ...
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, ...
3
votes
2answers
697 views

XNA 4.0: Trouble Aligning an Animating Sprite (Texture Origin)

I'll try to explain this as best as I can. I'm trying to build a game where there exists a "Surfer" who is surfing down a rail. I have a sprite sheet for the surfer however I have been running into ...
1
vote
2answers
371 views

XNA 4.0: Animating a moving 2D sprite (not via user input)

I see a lot of tutorials explaining how to do 2D Sprite Animation with sprite sheets, based on the user's input (i.e. Move Left, Move Right ) etc.. etc.. I have already incorporated an ...
12
votes
2answers
907 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 ...
1
vote
2answers
2k views

Create a body of an irregular 2D sprite in Farseer

I'm trying to create a body of a irregular 2D sprite Farseer 3.3.1. The regular shapes that BodyFactory provides are not that I want. Is there a way that one can create irregular objects? Could it be ...
8
votes
3answers
7k 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. ...
1
vote
3answers
1k views

XNA Entity Component Design: Lost on how to include Sprite Animation

I've been reading about Entity Component design and thought it's pretty neat. I've been trying to write a quick 2D engine in XNA. I think I've laid the proper groundwork for registering and updating ...
6
votes
3answers
2k views

XNA 4.0: 2D Camera Y and X are going in wrong direction

I asked this question on stackoverflow but assumed this might be a better area to ask it as well for a more informed answer. My problem is that I am trying to create a camera class and have it so ...
7
votes
2answers
6k views

How do I enable higher FPS in XNA 4.0?

I created a FpsCounter DrawableGameComponent (linked to code, it's longish). It works great: It displays 60.0 fps normally. If I artificially slow down the game loop, it drops. My 'game' at the ...
2
votes
1answer
843 views

How to track position on a map vs position on screen with XNA 4.0?

I'm working on my first XNA 2D game (overhead view), and I'm pondering how to manage the difference in position on screen vs. the position of a sprite on a global map. The solution I'm currently ...
0
votes
1answer
2k views

How does one do alpha transparency testing in XNA 4.0?

I've read a lot of tutorials, but it just doesn't seem to work. Here's the code as suggested by a tutorial, using the built-in AlphaTestEffect class: Matrix projection = ...
3
votes
2answers
586 views

Problem with bounding box in model space and intersection with ray

I have a bounding box in model space and I want to intersect it with a ray. I have tried to transform the ray like this. Rotating and scaling works well, but transition does not. Here is my code: ...
38
votes
8answers
23k 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 ...
2
votes
2answers
2k views

What's efficient way to draw a lot of textured cubes in XNA4?

Title says it all. What's efficient way to draw a lot of textured cubes in XNA4?
1
vote
1answer
576 views

with XNA 4.0, How can I combine 2 models to make one?

I want to animate Model1 (an aicraft) and I want an object, Model2 (a sphere), to follow it in translation and rotation, as it is a part of this aircraft. With the following code (I use one or two ...
3
votes
1answer
482 views

Problems making my basketball bounce around horizontally

This is probably a very easy question, but I can't seem to understand why it's not working. I want the basketball to bounce horizontally when it touches the borders on the right and left, but when it ...
2
votes
2answers
2k views

How do I get access to the SpriteBatch service in my Sprite class using XNA?

I have the following Sprite class (leaving out everything that doesn't pertain to my question): public class Sprite { public Texture2D Texture { get; set; } public Vector2 Position { get; ...
7
votes
2answers
4k views

How do I access variables in the Game1 class from another class in XNA?

I'm trying to write a SpriteManager class in XNA, but I need access to the Game variables. For example, the Game.Content property would be very helpful in loading textures, and ...
2
votes
0answers
454 views

Rotating camera changes directional light depth map, and changes PCSS penumbras

I am implementing PCSS and I am using a directional light. The directional light volume is clamped to the camera frustum (as is typical with directional lights). So when the camera rotates, the ...
3
votes
1answer
350 views

Problem drawing text in a for loop

for (int i = -5; i < 5; i++) { Rectangle screenRectangle = new Rectangle(0, 0, screenWidth, screenHeight); spriteBatch.Draw(foregroundTexture, screenRectangle, Color.White); Rectangle ...
4
votes
1answer
350 views

XNA 4.0 keeping fonts/sprites without the use of a content project

Note: The actual title of my question does not really reflect my problem but is actually one of the possible solutions to my problem. I couldn't find a proper way to express my question so feel free ...
1
vote
2answers
1k views

in XNA 4.0, How to get the matrix or Vector3 of a model?

I'm trying, for many days, to get the Matrix or the Vector3 of my 3D model, I don't want to use the World matrix because I need first to idenfy the axes of my object for animation (= rotation of a ...
1
vote
2answers
934 views

Using a shader messes up my alpha in XNA

I'm making a 2D game that ends up being too dark on some laptops, so I figured I'd use a shader so people could brighten it up if need be. Unfortunately, once I got it in there nothing would fade in ...