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)

1
vote
1answer
380 views

How do I convert my XNA game to Android without using MonoGame?

I want to convert my XNA Game to Android, but I don't want to use MonoGame or ExEn. How can I do this?
0
votes
1answer
90 views

My Sprite Rectangle moves, but my sprite doesn't

Here's the issue, When I build, everything loads fine, everything works, but then, when you enter the game, the sprite is there. However, The sprite does not move, the sprite RECTANGLE does. Meaning ...
0
votes
3answers
388 views

Trying to get enemy sprites to move on C#

In my XNA game, I'm have the enemy sprites loaded and in the game screen. However, I put in the code to update their position in the Update method of the main class. The objective is to get the ...
1
vote
1answer
105 views

Where to put input detector?

So below is the usual XNA Game Component override method. If I want to add a touch input detector (lets say, I want to draw a rectangle under touched screen area), where do I put it and how? Googled ...
0
votes
2answers
283 views

XNA 4.0 Plane size

Possibly a dumb question, but do planes stretch on to infinity? I can't define a spanning area for it, and would have to do some sort of check for collisions like if(x intersects BoundingBox and ...
2
votes
1answer
116 views

XNA Scale and Render Targets

I'm working on a top down Strategy/RPG/Tower Defense XNA Game for Windows, and I'm running into an issue while scaling. My display mode is 1680 X 1050, and that is what I'm setting the ...
0
votes
1answer
176 views

XNA 4 Content Pipeline dependency

I tried to create something to parse XML with, which needs the inclusion of the Microsoft.Xna.Framework.Content.Pipeline; reference. This was fine and all, but as soon as I tried to debug, I got the ...
2
votes
1answer
365 views

Include a custom font when publishing in Visual Studio XNA

I have a custom font called "Gold Box Games" that I want to use in a game I'm making. I have the font installed on my computer and it works just fine in the program when I run it in test. However, ...
1
vote
0answers
23 views

Transparent RednerTarget2D afrer blending

How to get transparent bacground in RenderTarget2D after alpha blending? I use Color.Transparent to clear the render target, but I get black color after blending where alpha is 255 even that there is ...
2
votes
0answers
164 views

Problems loading Hilva tutorials [closed]

I'm a newcomer to XNA, and I'm evaluating some libraries. The Hilva Graphics Engine looks interesting, and I'm trying to run their tutorials. However, all of them give me errors. For example, if I ...
0
votes
1answer
274 views

How to prevent the player from clicking too fast [closed]

I'm having trouble with some bullets in my game, the M1911, which is supposed to be semi-auto is only capable of shooting one projectile per mouse click (trying to learn how to do multiple ones at ...
0
votes
2answers
166 views

How to create Button/Switch-Like Tile where you can step on it and change its value?

If the player steps on a Button-Tile when its true, it becomes false. If the player steps on a Button-Tile when it is false, it becomes true. The problem is, when the player stands on (intersects) ...
-1
votes
2answers
145 views

Trying to reduce health by a certain value once XNA [closed]

I've got a bullet and collision data for the bullet, when the bullet collides, it's supposed to cut an integer off of the max health for the object. Basically heres what I want: Object is shot, ...
2
votes
3answers
682 views

MonoGame and normal windowed desktop application

I am trying to move all my XNA projects to Monogame. But in project templates I found only XAML and horrible metro application template. Is MonoGame support creating application in good old windowed ...
0
votes
1answer
143 views

Why spritebatch.Draw shows blank output? [closed]

In my code below, I think it's correctly done. But idk, the image called by _bg is does not shown up. The screen only show White. Weirdly, there is 0 error message when I run it. (The RenderTarget2D ...
0
votes
1answer
128 views

XNA Camera Positioning All Wrong

I've been working in 3DSMax for years now and decided to give XNA 4.0 a try. I've got the majority of it working, however the camera is being a pain to me and I can't discern what's gone wrong. I ...
2
votes
2answers
386 views

Applying Angular Acceleration in a Basic Physics Model

I'm attempting to use a basic physics system to create an arcade flight model. So far I have managed to get the aircraft moving forward, apply gravity, etc. However, after trying to implement torque I ...
2
votes
1answer
282 views

Issues upscaling pixel art with SampleState.PointClamp

I'm developing a 2D game, and I'm striving to create a nice blocky low-res appearance for the game, yet allow it to be played at variable resolutions. So, I've researched resolution independency and ...
0
votes
1answer
203 views

Are there any guidelines/articles/tutorials for creating a network protocol for games? [closed]

I am currently developing a little 2D sandbox game with multiplayer functionality in XNA 4.0 and the latest lidgren-lib for networking. I found myself quickly at a point where sending a players ...
-2
votes
1answer
269 views

XNA rendertarget sprite batch problem [closed]

When using this code: public static Texture2D ShowHealthBar(SpriteBatch spriteBatch,Texture2D empty, Texture2D full, float health) { spriteBatch.Begin(); RenderTarget2D ...
2
votes
2answers
2k views

Weird behavior with XNA SpriteBatch.Draw origin

I have a texture with 256x256 pixels. Consider this piece of code: protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); ...
1
vote
1answer
110 views

XNA texture overlay with offset

Is it possible to overlay one texture over another and make them into a new texture? It should also work with an offset. Here's an example: This texture and this texture should make this ...
0
votes
2answers
363 views

XNA texture GetData exception

When using this code: public static Texture2D MakeTexRed(Texture2D tex) { Texture2D drawTex = new Texture2D(Game1.graphics.GraphicsDevice, tex.Width, tex.Height); Color[] data = ...
0
votes
1answer
105 views

Texture not carrying over to game correctly?

I have created my map for my game using 3DS Max. I have then applied textures to the map within 3DS Max, where the textures all show correctly. I export the map as a .fbx file to use within an XNA ...
-1
votes
2answers
100 views

XNA model texture maps [closed]

Is it possible to make a texture maps for XNA .fbx models? Just one texture file for the whole model.
0
votes
2answers
574 views

XNA change a specific color of a model to another

Is it possible to change a specific color of a model to another? Example: Everything that's blue should be red or something like that. And is it possible to do this without the use of effects? I ...
-1
votes
1answer
148 views

Is there any physics engine for XNA? [closed]

I am an XNA game developer. I am now starting to develop physics games on XNA but the problem is that I don't know about any physics engine desinged for XNA. Please if you know about it kindly help ...
3
votes
1answer
665 views

Reading text files XNA 4.0 on Xbox 360

I'm working on porting a game from PC to Xbox 360. When I want to create a level I read a .txt file that I store in my content I read the whole file as a string using this method ...
3
votes
1answer
175 views

'perfect' platformer base Xna

When a player touches a ground peice in a game, he seems to sink through the ground then slowly rise back up, and when he has risen back up, he is very jittery. if (touchingTheGround()) { ...
11
votes
1answer
893 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 ...
1
vote
1answer
370 views

XNA effect lighting like basic effect lighting

Is it possible to make lighting in a normal effect work like the lighting in the basic effect? With a basic effect it's really easy: BasicEffect effect; effect.EnableDefaultLighting();
-2
votes
3answers
773 views

Can I use a list to spawn enemies? [closed]

I need to have about 10 enemies in my game, can I use a list to spawn them all in? This is what I was working on but it only spawns 1 enemy in the coordinates of the last added to the list. Here are ...
0
votes
2answers
223 views

3d to 2d Collision

I have a 3d model which rotates around my screen, it's always on the Z axis = 0 where everything of my 2d images are. My 2d images fly out of the center and get bigger to give the view as getting ...
0
votes
1answer
102 views

Distorted edges in model rendering xna

The edges of my model are not rendered smooth in xna. See here. What can i do for this, as when designer renders the same model in maya, edges are smooth. And is it possible to render models in xna ...
2
votes
1answer
916 views

XNA 4.0, FBX and Texture Loading Failures

I've been going through several tutorials on how to use XNA and understand a lot thus far. I've got a screen, I've got 2D sprites working, got a shader system operational, so far so good. Now I've ...
-1
votes
1answer
279 views

XNA Framework doesn't recognise controller [closed]

So just a little bit of XNA code: if (this.IsActive && (Keyboard.GetState().GetPressedKeys().Length > 0 || Mouse.GetState().LeftButton == ButtonState.Pressed || ...
1
vote
1answer
73 views

XNA draw model partially

Is it possible to draw a model partially (along the X, Y or Z axis) to make an extending barrier or something like that? (Scaling doesn't work because of the textures)
2
votes
2answers
237 views

Collision detection against large arbitrarily shaped textures

What is the most effecient way to do collision detection on strangely shaped textures in XNA? Here is an example texture: As you can see, it is far from a perfect square. I want the player to ...
0
votes
2answers
1k views

XNA Health Bar continually decreasing

As per the Health bar tutorial on ... http://www.xnadevelopment.com/tutorials/notsohealthy/NotSoHealthy.shtml I have set up the above, how do I make it decrease by 1 health per second? I want to ...
-2
votes
1answer
283 views

Does this UV mapping method look ok? [closed]

i'm having a spot of trouble trying to get my voxels textures in the right place. I am using a very simple mechanism that assumes all sides of any given block are always individually specified (i'll ...
2
votes
2answers
541 views

World space and model space the dummies version [closed]

I'm by no means a 3d programmer but have recently taken it upon myself to build a Voxel based game and I'm having a little trouble understanding some of the concepts around matrices (what with my ...
0
votes
0answers
78 views

What is an efficient/safe way to broker head to head communication for a mobile game

I have a mobile game written in XNA/MonoGame with a wcf server and I am currently designing the head to head competition mode. Previously I have created a game that used UDP to set up communication ...
0
votes
1answer
282 views

Is a HashTable the best way to store replay data in C#?

I'm looking to make a deterministic replay in my 2D game. I want to follow a similar approach to braid in storing the relevant information every frame (at 60 frames per second). I wanted to know what ...
0
votes
1answer
103 views

A view and projection matrix oddity?

I have a bit of a dilemma ... So i setup my scene how I want it with some bits in it and now I want to move all my camera related code in to a camera class however doing so is proving to be a pain in ...
-1
votes
1answer
1k views

Extension method must be defined in a non-generic static class when adding static bool function [closed]

I try to use first answer of Checking for alternate keys with XNA IsKeyDown but the compiler shows me Extension method must be defined in a non-generic static class. How can I fix this issue?
1
vote
2answers
318 views

How do I stop XNA/Visual Studio from rebuilding my content project every time I build?

My group and I are working on a game in XNA 4.0 with Visual Studio 2010/2012. The main solution has 6 projects: 2 XNA game projects (1 executable/ 1 class library), 1 WPF executable for the level ...
-2
votes
1answer
2k views

Moving A Sprite In The Direction Its Facing XNA [duplicate]

There are many questions on this site that explain this except they seem to all be in Java. I want to move a sprite in the direction it's facing, in XNA. I know you must use Radians and lots of ...
1
vote
0answers
444 views

XNA - How to move skinned model and merge animations

After you helped me to resolve my loadContent problem I've wrote some code and made 3D model with animation. Because XNA 4.0 doesn't support .fbx with multiple animations I've generated 3 models with ...
0
votes
2answers
109 views

Returning The Position Of A Sprite Drawn & Updated By A List [closed]

My problem is this, when iceBoy hits any of the newGrounds in the ground.groundAmmount list, it will return the specific position of this newGround so that i can set iceBoy's position based on the ...
0
votes
1answer
128 views

Receiving server data inside game loop

I'm planning on how my multiplayer game client game loop should work. While I'm convinced that server should be moved from game loop into it's own thread, I'm not sure what should I do about receiving ...