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
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 ...
0
votes
1answer
322 views

XNA and C# Draw method question

If I missed the answer to this question being already posted I apologize but I was unable to find it. I'm new to C# and XNA and converting a VB game I created into them. Im finding a problem I'm not ...
0
votes
1answer
151 views

I want to split the texture width

Simple question: I have this image that is 200x200. I want to change it to 100x200 inside the HSLS, making it thin. Anyone have idea? I tried to do something like output *= ...
5
votes
2answers
2k views

Sloped tiles in Platformer

I'm extreme new to game development and this is my second project. I’m working on a platform game that expands on the Platformer example provided at the app hub, so far I’ve got parallax scrolling ...
3
votes
1answer
936 views

2D platformer corner collision

Repost from my question on stack overflow, didnt know this site existed. I have a 2d platformer and I need help with collision. To show you my current collision system, here is picture: Top picture ...
5
votes
1answer
479 views

How to attach two XNA models together?

I go back on unsolved question I asked about attaching two models together, could you give me some help on this ? For example, If I want to attach together Model1 (= Main model) & Model2 ? I ...
1
vote
2answers
1k views

XNA: How to make particles face the camera but not alter the pitch

I'm using the particles sample from create.msdn.com/en-US/education/catalog/sample/particle_3d which by default, has all the particles look straight at the camera. I'm trying to modify it so that the ...
1
vote
1answer
433 views

XNA objects not occluding properly

I have got simple 1x1x1 cube model. I draw 3 of them. They are located at: 1,0,0 2,0,0 3,0,0 I draw them in the same order every time. When I move the camera and look at them from one end everything ...
4
votes
3answers
3k views

2D XNA Tile Based Lighting. Ideas and Methods [closed]

I am currently working on developing a 2D tile based game, similar to the game 'Terraria'. We have the base tile and chunk engine working and are now looking to implement lighting. Instead of the tile ...
1
vote
2answers
471 views

How can I orient a projectile along its flight path?

I have a projectile that is moving around the world (in a ballistics trajectory right now). I am currently keeping track of its position and velocity. I want to draw it oriented to its velocity, so ...
2
votes
2answers
327 views

Can XNA's content pipeline be used to load C# source files?

I am wondering if its possible to use the XNA Content Pipeline to load C# files? I'm working on a game and am currently writing a FSM. I would like to be able to load states from the content ...
0
votes
1answer
658 views

Some help understanding and modifying a 2D shader

I have a similar question as the one posed here, except that I don't wish to use a 1D Color Palette. I simply wish to have it display 1 color of my choosing (red, for example). I plan to use this ...
2
votes
1answer
646 views

How to create projection/view matrix for hole in the monitor effect

Lets say I have my XNA app window that is sized at 640 x 480 pixels. Now lets say I have a cube model with its poly's facing in to make a room. This cube is sized 640 units wide by 480 units high by ...
2
votes
1answer
1k views

Why is a fully transparent pixel still rendered?

I am trying to make a pixel shader that achieves an effect similar to this video http://www.youtube.com/watch?v=f1uZvurrhig&feature=related My basic idea is render the scene to a temp render ...
4
votes
1answer
425 views

3D models overlapping each other

I have a problem at the moment when I draw some models to teach me more about 3D game programming. The models at the moment overlaps each other from some angles witch makes sense since the game at the ...
8
votes
2answers
2k 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 ...
2
votes
1answer
437 views

Xna GS 4 Animation Sample bone transforms not copying correctly

I have a person model that is animated and a suitcase model that is not. The person can pick up the suitcase and it should move to the location of the hand bone of the person model. Unfortunately the ...
2
votes
1answer
776 views

Inaccurate 3D model collision using XNA

I am creating a classic game in 3D that deals with asteriods and you have to shoot them and avoid being hit from them. I can generate the asteroids just fine and the ship can shoot bullets just fine. ...
0
votes
1answer
401 views

Rotate player to face direction it's moving in 3D space

I'm making a 3D game in XNA4.0. How do I rotate a model to face the direction that the user is pressing. I assume I need to set its look at to the direction being pressed, but can't figure out how to ...
2
votes
1answer
595 views

Collision with half of a semi-circle

I am trying to port a game I made using Flash/AS3, to the Windows Phone using C#/XNA 4.0. You can see it here: http://goo.gl/gzFiE In the flash version I used a pixel-perfect collision between ...
2
votes
1answer
509 views

Smooth Camera Rotation around 90 degrees

I'm developing a third person 3D platformer in XNA. My problem is when I try to rotate the camera around the player. I would like to rotate (and animate) the camera 90 degrees around the player. So ...
2
votes
3answers
1k views

Rotate 3D Model from a custom position

I have a 3D Model like above in which i want to rotate it from a given location(pointed in red) but I can only rotate it from the middle. How can I rotate it from a custom point. Edit: I ...
0
votes
2answers
1k views

How to achieve after-image pixel shader effect

How would one go about writing a pixel shader like this one in XNA 4.0? http://www.youtube.com/watch?v=f1uZvurrhig&feature=related
0
votes
3answers
411 views

Which should be faster: 10 flat shaded polygons or 2 with a transparent texture

I have particle system, and I want to the individual particles to take the shape of a star. Which should be faster: Drawing the 10 polygons using a flat shader, or 2 polygons (a square) with a ...
2
votes
0answers
649 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
738 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
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 ...
1
vote
1answer
722 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
417 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
306 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
267 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
329 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
415 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
507 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
828 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
825 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 ...
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 ...
5
votes
5answers
904 views

Glass shatter simulation

I need to make a simulation with stone thrown on the glass window. Could you please help me choose the tools to make it quickest and easiest? And maybe some tips how to do it :). I mean, I was ...
6
votes
2answers
483 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
835 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 ...
5
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
335 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 ...
6
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 ...
3
votes
2answers
676 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.
5
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
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 ...
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 ...