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)

0
votes
1answer
174 views

XNA Skinned Model - Keyframe.Bone out of range exception

I'm getting an IndexOutOfRangeException on this line of AnimationPlayer.cs: boneTransforms[keyframe.Bone] = keyframe.Transform; I don't get what it's really referring to. The error happens when ...
5
votes
2answers
524 views

XNA 3.1 to 4.0 Vertex Shader Not Drawing

I have recently been converting our XNA 3.1 game to XNA 4.0 and am stuck on the shaders. I have the game running, but nothing is drawing to the screen, except things not using a shader. This is only ...
0
votes
0answers
39 views

How to draw Farseer destructable terrain XNA

XNA: 4.0 Farseer Physics: 3.5 I am struggling with drawing my Farseer Phyics terrain. Due to the fact that this terrain is destructable, I need to have a way to update the drawing of the terrain to ...
3
votes
1answer
346 views

How do I generate a mipmap for a texture loaded from a stream?

I am loading a Texture2d from a stream: public static Texture2D GetTexture(GraphicsDevice dev, System.Drawing.Bitmap bmp) { Texture2D texture; using (MemoryStream s = new MemoryStream()) ...
1
vote
1answer
278 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 ...
3
votes
1answer
616 views

Stencil mask with AlphaTestEffect

I am trying to pull off the following effect in XNA 4.0: http://eng.utah.edu/~brendanw/question.jpg The purple area has 50% opacity. I have gotten pretty close with the following code: public ...
0
votes
2answers
50 views

Issue implementing proper collision in XNA Game Studio 4.0

I am building a game in XNA 4.0, where a player moves about a 2 dimensional (vertical perspective) map consisting of blocks. My issue is creating proper collision between the payer and the blocks ...
5
votes
1answer
745 views

Should the networking of my game be a component or a service?

I am working on a windows game and I am trying to understand the XNA GameComponents and GameServices classes and use. From what I understand about a component is that it has an Update method that ...
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 ...
0
votes
0answers
16 views

Monogame. Xml files not included on deployment

We are making a XNA game and porting it with MonoGame. The game works fine on deployment, it finds without a hitch the xml files we need for the content. On publishing however, the files are never ...
0
votes
0answers
11 views

3D Model in the midst of tracking state inferred and tracked

I am developing Kinect motion capture application by using XNA framework.My 3d model's bones are sometimes at the state inferren and tracked ,so for example the hand is being at the very unrelated ...
0
votes
0answers
10 views

how to add .tif importer to skinned model pipeline

I have model which is occuring .tif components but XNA can not import .tif.Because of that I should add a .tif importer to my skinned model processor. How can ı add this? My SkinnedModelProcessor into ...
1
vote
1answer
92 views

How do I temporarily pause an XNA game?

Collision with an enemy should pause the game for 1.5 seconds. My failed attempt: bool tPause; float timer; public ovveride Update(GameTime gameTime) { if(!tPause) { // ... ...
7
votes
4answers
410 views

How can I test different TV display types for my XBLIG game?

The XBLIG submission check-list asks to ensure all gameplay-critical graphics be visible in the 'TitleSafeArea'. I've received a bug report during play-testing that says parts of my scrolling 2D map ...
0
votes
0answers
35 views

Having trouble getting shader to work with sprite batch in XNA #4

I found a neat "CRT screen" effect shader on the web, but I've never used shaders before and I can't seem to get it working properly. If I do the second sprite batch in my code here normally without ...
7
votes
2answers
5k 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 ...
4
votes
1answer
94 views

Odd Behaviour XNA Game Component

Inside of my main class file I am initializing a number of game components which are used to represent game scenes i.e. main menu and game. I am initilizing each component inside of XNAs LoadContent ...
0
votes
0answers
35 views

Handling menu input in the GameStateManager sample

I've been trying to get more customization out of the GSM sample and i'm a bit lost. I've made a new method in InputState.cs that returns true when a key is being held down. This is for scrolling ...
10
votes
2answers
728 views

Portable buffered keyboard input for XNA / MonoGame?

As a preliminary solution, I am currently using the Nuclex framework in an C#/XNA game project for buffered keyboard input. Sadly, nuclex relies on SlimDX.Directinput.dll and therefore to my knowledge ...
1
vote
1answer
39 views

XNA Texture.GetData “Size of the data passed in is too large or too small for this resource.”

I am attempting to retrieve the color data for a given sprite located on a texture atlas by creating a new color and passing a source rectangle width and height for the given sprite. I am then passing ...
1
vote
1answer
49 views

Use of SpriteFonts without installing on host machine

I am working on a Windows game for my university project. In this project I am using a custom TrueType font which is not installed on any university computers. For submission my game is required to ...
2
votes
1answer
83 views

Is it bad practice to add GameComponents and DrawableGameComponents outside of the main initialization method?

I'm working on a snake game that has multiple game objects (snakes, apples, obstacles), and game modes (classic, adventure), that are DrawableGameComponents. Is it OK that I'm adding them as needed ...
0
votes
0answers
83 views

2D animated sprite jumping and gravity physics

I'm currently writing a Megaman clone for my school project. So far all I did was making the character run and stay put when needed. Know I want to be able to make him jump using the 'X' button. I ...
-1
votes
1answer
1k views

How do I make a health bar that drains when the player takes damage? C#/XNA

I've drawn a Health Bar before and had it drain/refill on a button press using if statements and rectangles. First I loaded the image, then I set a new rectangle to be equal to the image's height and ...
0
votes
0answers
50 views

SetRenderTarget(null) clearing previous draw calls

I'm not sure if everything's working as it should be or whether I'm just not doing something properly, but I couldn't find anything that discussed this so I thought I'd ask here. I'm using Monogame ...
0
votes
2answers
41 views

Can you save a png in XNA larger than the backbuffer width?

I'm looking at using the 'savetopng' method of the texture2D class to draw out custom textures. My problem is that my viewport is quite small (the application runs in a window) and the textures will ...
0
votes
0answers
55 views

How do I open/edit a *.xnb file in XNA Game Studio 4.0?

I've downloaded a *.xnb font sprite, but I don't know how to open/edit it. I installed XNA Frameword 4.0 in VS 2010. Thanks for your help!
-1
votes
2answers
64 views

Speeding up sprite the second time it passes the screen [closed]

I'm a student studying Games Development. I want a sprite to speed up on it's second passing of the screen. How do I do this? Code I wrote so far: public class Game1 : Microsoft.Xna.Framework.Game { ...
0
votes
2answers
237 views

Water Physics In top down 2D game

I have been making a game like Minecraft or Terraria in which you add blocks and such to the world, and I came across this interesting debacle, the game is in a top down 2D perspective, and I would ...
1
vote
0answers
99 views

Collision detection implementation suggestions

I'm working on a simple 2D game involving a rotating octagonal ring where a sphere sprite moves up/down avoiding objects as the ring rotates faster and faster. I'm having a difficult time with the ...
-1
votes
1answer
203 views

Issues with touch buttons in XNA (Release state to be precise)

I am trying to make touch buttons in WP8 with all the states (Pressed, Released, Moved), but the TouchLocationState.Released is not working. Here's my code: Class variables: bool touching = false; ...
1
vote
3answers
115 views

Get highest (Y-axis) vertices from primitive d20 dice in xna

I have created a d20 dice (icosahedron) in xna and used BEPU physics to roll it. But now I'm trying to get the value from the dice after its rolled. I was thinking about looking for the 3 vertices ...
7
votes
1answer
670 views

How To Approach 360 Degree Snake

I've recently gotten into XNA and must say I love it. As sort of a hello world game I decided to create the classic game "Snake". The 90 degree version was very simple and easy to implement. But as I ...
0
votes
0answers
89 views

How to block Kinect rotation

I'm developing a Kinect Project using C# and XNA 4.0. Now facing a problem that I couldn't solve. When the player turn around himself, the avatar doesn't turn, but its arms and legs are trying to ...
6
votes
3answers
2k views

XNA: Rotating Bones

XNA 4.0 I am trying to learn how to rotate bones on a very simple tank model I made in Cinema 4D. It is rigged by 3 bones, Root -> Main -> Turret -> Barrel I have binded all of the objects to the ...
1
vote
2answers
189 views

Detecting Hitbox Collisions (Rectangle)

So I have some Hitboxes set up on 2 classes, HealthPickup and Player. public static Rectangle Hitbox; public override void Initialize() { Hitbox = new Rectangle(Pos.X, Pos.Y, 32, 32); } That's ...
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 ...
4
votes
2answers
203 views

The XNA redistributable isn't in the prerequisites list; how do I include it when publishing?

So I created a small project in XNA 4.0, and wanted to try and publish it, and so I did. Yet when attempting to install it on a different computer it didn't seem to work. I've read and studied about ...
0
votes
0answers
84 views

graphics.IsFullScreen resetting to false after game constructor and graphics.ApplyChanges()

This is a MonoGame 3.2 Windows (DirectX) Project. I've tried setting graphics.IsFullScreen to true in the game's constructor and in the game's initialize function, both times running ...
5
votes
2answers
415 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 ...
0
votes
1answer
92 views

Why am I getting a return value of zero from my position computation function?

Ok I have a Function int x(), which is used in new Rectangle(x(),a,a,a); in DrawMethod in XNA but when I use it I get x() = 0 as as the answer.Here is my CODE: int x() { int px ...
0
votes
1answer
87 views

Find world matrix

I'm making my first 3D-game with XNA (MonoGame) and have come to a point where I wish to add a crosshair for the player. To do this I need the on-screen coordinates of the location where my fighter ...
1
vote
1answer
30 views

XNA Texture2D storage question

Are Texture2D objects stored on the graphics card or on system memory? I am thinking that the backbuffer is located on the graphics card (by default) and that the textures are on the system memory. I ...
1
vote
2answers
81 views

Loading and storing content efficiently

So for example I have a class called TypingKeyboard. It allows you to display a string while it's being typed by the computer with sounds. I need one in the menu, for the title. And one for the ...
0
votes
1answer
36 views

XNA - Autodeploy .exe of game upon succesfull commit to GIT

I know of ClickOnce which creates an .exe file so a user can play my XNA game. However, I have to manually go through a wizard in order to create this file. I would like for the new .exe to be ...
1
vote
1answer
68 views

How can I determine whether a unit is in range or not?

I'm programming a small game that's going to be somewhat like a tower defence. I was playing around with how I determin whether a unit is in range or not. public void Update(GameTime theGameTime) ...
0
votes
1answer
35 views

Should I Open/Close SpriteBatch with different settings?

I'm still new in game developpement, and I'm trying to complete my 1st game. Its a simple 2d game, but i'm trying to add lots of differents techniques in it. It's all good when you take a single ...
1
vote
0answers
60 views

Any easier way to add networking to an XNA game? [closed]

I know that the MSDN has an article on this but I'm not developing for Xbox so I'm not sure if I should use NetworkSession or LocalGamer etc etc because I think they are Xbox only. But I haven't tried ...
1
vote
3answers
118 views

Removing something on Collision?

I have my collision detection code working so how would I tell my HealthPickup to disappear when my Player collides with it? I haven't played around with it yet but I think I may have to somehow ...
1
vote
2answers
141 views

How to Calculate Velocity in a 2D space game

I am currently using screenpos.X = (float)(screenpos.X + velocity * Math.Sin(r)); screenpos.Y = (float)(screenpos.Y - velocity * Math.Cos(r)); For my Movement with r being the Rotation in Radians. ...