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
2answers
143 views

Create a variety a sprites from a single image in XNA?

I want to be able to take a single image and cut them up into a lot of images to make the sprites. How would I do that in XNA since I only know how to load the texture then use it without changing it? ...
1
vote
1answer
436 views

Collision detection against specific sprite shape using XNA with Farseer Physics?

I am making a 2D XNA Game, using Farseer Physics for collisions. I need collisions to be resolved against the actual shape of the sprite image, ignoring transparent pixels, rather than against the ...
-2
votes
1answer
118 views

Help finding a good XNA physics library? [closed]

I'm looking for a good physics library for XNA. Can anyone help me find something good, simple and easy to learn for XNA?
1
vote
1answer
490 views

Make bones in blender work corectly in XNA

So, I am trying to connect bones with vertex groups in blender, but I keep failing. if I move a bone in XNA, it doesnt also move those vertecis that are connected to this bone(vertex groups). What I ...
-1
votes
2answers
159 views

Tile collision, can't get correct behaviour [closed]

I define a tile with a rectangle. This is displayed below. public class Tile : Sprite { Rectangle rectangle; public Rectangle GetRectangle { get { return ...
8
votes
3answers
557 views

Vector3 vs. Vector2 - performance, usage?

I'm currently playing around with XNA, and creating a simple 2D platformer. I was thinking of adding multiple layers to make it a little bit of challenge. In stead of having a Vector2 for my ...
-2
votes
2answers
123 views

Drawing background is very costly/slow [closed]

I'm creating a "simple" Tetris style game for a beginner project. My problem is when I added the background (tiled look consisting of a bunch of squares), the game got very slow. It has to have ...
0
votes
2answers
149 views

How do I achieve one touch one shot for WP7 game?

I want to be able to have a sprite shoot in a game for WP7. What I have at the moment is that as long as the shoot button is held down the sprite constantly shoots. How do I sort it that only one ...
2
votes
1answer
175 views

How to implement in-game purchase?

I am currently developing an indie game using XNA/C#. I would like to give players the opportunity to try a free (but somewhat limited) demo version of the game. Nevertheless, the player should be ...
1
vote
1answer
87 views

Drawing sprites messes up my model in XNA4

I have a model which draws correctly in XNA4. However if I try to add a background image (or any sprite), the rendering of my model is messed up. There are two problems with the rendering model is ...
2
votes
1answer
233 views

How do I detect when the Xbox home button is pressed XNA?

How do I detect when the big Xbox button in the middle of the gamepad is pressed in XNA?
2
votes
2answers
626 views

Background blur in 2D game?

In an XNA 2D game, I am thinking about blurring the background slightly to increase the feeling of depth? I am already using parallax scrolling which works pretty well in terms of enhancing depth ...
2
votes
3answers
246 views

Complex Scaling

I've been trying to figure this thing out for weeks now, but with no luck.So, I am creating this program in WindowsForms and Xna, that allows users to create a 3D room. By draging and customizing ...
0
votes
1answer
114 views

Making A Sprite Rotate To A Specific Angle XNA 4.0

I have a game that the character spins when you press either of the triggers on the xbox remote. Here's the code. if (gamepadState.IsButtonDown(Buttons.RightTrigger)) RotationAngle += ...
1
vote
2answers
358 views

Protecting XNA Assets

With so many XNA asset viewers out there, how do I distribute my XNA game for PC without having my assets open for persons to steal or manipulate? I know i can create custom asset importer/processor, ...
1
vote
1answer
619 views

XNA - moving the 3rd person camera

I'm having following problem: Can't set my camera to follow object from behind and rotate when I use left/right arrow. I've tried different tutorial and examples but it still doesn't work for me. ...
0
votes
1answer
138 views

3D models and hit detection

I'm currently trying to create a game that involves the inside of a cube, which i will make in Maya. My question is what is the best way to create a model with hit detection in mind? For example my ...
2
votes
1answer
124 views

What size window should i use for making an Xbox 360 game in XNA

I have a basic understanding of XNA 4.0 and i want to create an xbox game. What size window should i use? should i use the 16:9 aspect ratio then put it in full screen?
-5
votes
2answers
690 views

Repeatedly Shooting Bullets

I'm making an XNA shooter game. How do I have my sprite repeatedly shoot bullets instead of waiting for one bullet to go off the screen. Do I do this with and array?
0
votes
2answers
649 views

HLSL shader optimization [closed]

The following HLSL shader (without preprocessing) results in 65 arithmetic operations (see below). Can the same effect achieved with <=64 operations? // Center of "light" float x; float y; // ...
2
votes
2answers
1k views

Flip sprite vertically AND horizontally?

In Microsoft.Xna.Framework.Graphics.SpriteEffects there is the possibility to flip a texture horizontally or vertically before rendering. But can one do both at the same time? When I use: ...
1
vote
0answers
115 views

Collision shape and Model problem

I used BEPUphysics for my XNA 4.0 game , the problem is that I load my model.fbx from into the game then add it to the space of physics engine , but when I change the scaling matrix of my Model then ...
4
votes
1answer
370 views

Sound effects in separate thread?

Does it make sense to carry out all audio (music, sound effects, etc.) in a separate thread? In your experience, how large would you expect the performance impact of playing some MP3 music and 10-30 ...
0
votes
1answer
133 views

Separating Axis Theorem fails at certain angles

I'm currently attempting to add an overlap tester for an axis aligned and orientated bounding box but the solution only seems to work accurately when the OBB's angle is between -10 and +10. As the ...
7
votes
1answer
636 views

How to make a 3d beam effect with XNA 4.0?

Do you know any demo or tutorial to learn to make a 3D Beam effect? I have learn to make a 2D laser by simply using a texture and moving it thru screen. But I am a little bit lost while trying to do ...
1
vote
2answers
173 views

Per color collision is really expensive - can my approach be improved?

I've been working on adding a color based collision component which takes a list of colors and checks to see if an object is colliding with any of them. However, the operation seems to be extremely ...
2
votes
3answers
703 views

Creating Rectangle-based buttons with OnClick events

As the title implies, I want a Button class with an OnClick event handler. It should fire off connected events when it is clicked. This is as far as I've made it: public class Button { public ...
4
votes
2answers
653 views

XNA 4.0 / C# Collision Response

Okay, this is really starting to annoy me. First of all, detecting collisions is nice and easy. I have a list of tiles, and a player. The player and each tile have their own rectangles. (The tiles ...
2
votes
3answers
604 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 ...
-4
votes
1answer
129 views

Can't add rectangles into rectangle list [closed]

When i run this code, it gives me "Object reference not set to an instance of an object." here clickableArea.Add(temp); here is the entire class using System; using System.Collections.Generic; ...
1
vote
0answers
329 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
1answer
90 views

Scripted Motion Paths (?) (XNA)

Ok, so the title isn't the greatest because this is a lot more general. Say I want to have the player be able to hit A and have their ship model roll to the right, and shift to the right of the ...
-1
votes
1answer
130 views

Relative positions of player and enemy are different In XNA 3D game

I am having a problem in my 3D jet fighter game using XNA. I have a player jet and a few enemy drones built from a separate class. The problem is that when I set player position and a drone's position ...
0
votes
1answer
161 views

Speed up content loading

I am using WinForms Sample downloaded from microsoft website. The problem is, that the model loading time is quite long, using: contentBuilder.Add(ModelPath, ModelName, null, "ModelProcessor"); ...
1
vote
1answer
228 views

Scaling Skeletal values to be able to reach objects on the screen

I have created a game using Kinect + XNA and the game runs on full screen mode.. However when i try to touch or reach a certain area on the screen using hand.. I cant reach it.. I will already be ...
-1
votes
1answer
199 views

forward motion car physics - gradual slow

Im having trouble creating realistic car movements in xna 4. Right now i have a car going forward and hitting a terminal velocity which is fine but when i release the up key i need to the car to slow ...
1
vote
0answers
142 views

Maya Animated Character export for XNA 4.0 problem

To begin with, I'm trying to export an animated character in .fbx format from Maya 2013 to XNA 4.0 In Maya, The Model has a basic rig and the animations are in clips made in the Trax editor. so the ...
4
votes
1answer
137 views

Why does CameraZ=0 result in no render?

I am trying to draw simple model, but I am experiencing strange error. When I use this View matrix: Matrix.CreateLookAt(new Vector3(0, 200, 1), new Vector3(0, 0, 0), Vector3.Up); my model is drawn ...
0
votes
1answer
134 views

Animated Models in XNA

I've been using XNA for 2D games for awhile, and I am just learning 3D now. I have a question, which seems like it should be fairly basic. As I understand it, I make a model in Maya (or whatever) and ...
5
votes
1answer
336 views

Performance of pixel shaders vs. SpriteBatch: XNA

Precondition: I read this question/answer about using shaders, or spritebatch, to render and mark a sprite. I need to do something like that. I also have a 2D lighting PoC which I need to write. The ...
-5
votes
1answer
54 views

What are the statements in XNA?

A hypothetical game called “AlienShooter” needs to be able to work on Windows and on the Xbox. In the Windows version, the keyboard will handle firing at alien spaceships, and this functionality is ...
-1
votes
2answers
103 views

Setting a leader from a sprite array [closed]

I'm looking to set a leader from an array of sprites, I keep on getting a NullReferenceException was unhandled error from within my main game class when calling the UpdateMouse Method. What have I ...
1
vote
2answers
129 views

Displaying total playing seconds at end of game

Creating a simple survival game. When the player has been caught I want to display the amount of seconds that they survived for. How do I go about this?
-1
votes
3answers
354 views

How to implement smooth flocking

I'm working on a simple survival game, avoid the big guy and chase the the small guys to stay alive for as long as possible. I have taken the chase and evade example from MSDN create and drawn 20 ...
1
vote
2answers
160 views

Set vertex position

Can anyone tell me how to set the positions of model vertices? I want to be able to change the position of some of the vertices of a Model. Is there any way to make that happen? And make the changed ...
2
votes
1answer
263 views

Artificial intelligence for targeting 3D flying objects

I'm working on a 3D game in Xna in which there is my jet which I am controlling. I want to add other jets as enemies. For that I need their AI so that I could have them able to target my jet. I've ...
0
votes
2answers
163 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
vote
2answers
270 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 ...
0
votes
1answer
52 views

XNA- Texturing problem, exporting model

How,can I disable coloring when texture is applied, because right now the texture is being colored over. foreach (BasicEffect effect in mesh.Effects) { effect.TextureEnabled = textureApplied; ...
2
votes
1answer
216 views

How do I modify a Boids algorithm to be player controlled?

Found source code on Boids in C#. http://3carrotsonastick.wordpress.com/2012/11/01/boids-in-c-xna/ How do I go about making the raven class in the above player controlled? If I could control it ...