Tagged Questions

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)

-4
votes
1answer
485 views

XNA PC vs Monogame Online Multiplayer [closed]

I've got a mostly working PC game in XNA 4, and am looking to make it networked. From the documentation it seems that I can use XNA Networking through GFWL to do LAN sessions, but not online sessions ...
1
vote
1answer
199 views

How to calculate the Screen Position of a bounding sphere/box?

Synopsis: What I have is an object rendered on the screen. I need to calculate the top-left / bottom-right of it's location on the screen in Screen Coordinates. Explanation: The object is ...
0
votes
1answer
107 views

XNA 4.0 thick triangle strip to fix aliasing issues upon rotation

My triangle strip based lines are disappearing intermittently when I rotate my camera around the X axis. I was advised that this is due to aliasing issues and that "At a certain angle when its edge ...
1
vote
3answers
2k views

How to create / draw clickable object (such as Button in WinForm) in XNA WP8?

I am developing a 2D (No 3D in every aspect) Windows Phone 8 turn based tactical games for my college project. I use Monogame. I want to draw an object similar to Button in windows form, that if the ...
2
votes
1answer
583 views

Collision avoidance (AI)

Now my 3D model has complete AI behaviours, but my model has no collision avoidance while he is moving towards the player! Because of this, he gets stuck in front of 3D blocks sometimes. I think the ...
1
vote
1answer
213 views

Sharing the effect [closed]

my problem is : If I load 2 models ( the same model zombie ) and give them the same effect I got the following error : for(int i =0 ; i<2 ; i++) { dwarfModel[i].model ...
3
votes
1answer
99 views

center point of a text?

i'm drawing a text using a spritefont and the draw.string function of the spritebatch object. in some point, i need to augment the size of the text, so i use a variable to scale it. all this is ...
1
vote
2answers
622 views

SpriteFont Exception, no such character?

I have such spriteFont: <?xml version="1.0" encoding="utf-8"?> <!-- This file contains an xml description of a font, and will be read by the XNA Framework Content Pipeline. Follow the ...
0
votes
1answer
74 views

International Font in XNA?

I'd like to know are there some international fonts? I mean a font for all European languages including Russia. The question is about XNA fonts.
1
vote
1answer
275 views

Damage indicator screen overlay

I want to make something already done by a lot of games , which is when I am taking so much hits from enemy red screen drawn like the following , using XNA 4.0: after it's drawn and I am still alive ...
0
votes
2answers
76 views

Can't show an object in a tapped coordinate

So hi, I have a problem. I want to show an object (Texture2D) in an area tapped by user. This is my fields : List<Texture2D> list = new List<Texture2D>(); List<Vector2> list2 = new ...
1
vote
1answer
377 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
381 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 ...
2
votes
1answer
115 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 ...
2
votes
1answer
357 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 ...
4
votes
2answers
163 views

What's involved in resetting the graphics device?

I'm playing with XNA 4.0, VS2010. I've created a window (not maximized) and drawn some sprites. All is good until I resize the window, after which the sprites stop displaying or only partially ...
-1
votes
1answer
336 views

XNA - 2D Rotation of an object to a selected direction

I'm trying to figure out the best way of rotating an object towards the directional input of the user. I'm attempting to mimic making turns on ice skates. For instance, if the player is moving right ...
0
votes
1answer
271 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 ...
-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, ...
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
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
202 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
266 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 ...
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
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 ...
0
votes
2answers
359 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 = ...
-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
567 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 ...
3
votes
1answer
655 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 ...
-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 ...
-2
votes
3answers
764 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 ...
1
vote
1answer
368 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();
1
vote
1answer
353 views

Pixel Shader - apply a mask (XNA)

I'd like to apply a simple few masks to few images. The first mask I'd like to implement is mask like: XXXOOO I mean, that on the right everything is masked (to black), and on the left everything ...
0
votes
1answer
101 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 ...
5
votes
2answers
413 views

Set a 2d camera's position so that a building is under the players feet

My issue is this: i am making a scrolling game in XNA, and the camera updates based on the players velocity, but the player never actually moves, he is always in the center of the screen. When he hits ...
2
votes
1answer
904 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 ...
8
votes
1answer
801 views

Implementing water effects (splashes) into XNA 4.0 game [closed]

I am creating a 2D XNA game and came across a tutorial on adding water effects (splashes) to an XNA game but after implementing it into my game I can't get it to scale down. Currently it takes up the ...
-1
votes
1answer
276 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
72 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
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); ...
11
votes
1answer
891 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 ...
4
votes
2answers
138 views

XNA Transparency depending on drawing order?

I am drawing two 3D objects, both of them can fade from opaque to transparent independently, and they can intersect between them (so you cannot say when one of them is before the other one). Look at ...
-2
votes
1answer
282 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 ...
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 ...