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
0answers
46 views

XNA 4.0 displaying .fbx texture problem

Here is my image. I have Steve from MineCraft I exported it to .FBX format. After Googling for a while, I changed sampling mode to PointClamp and turned off anti-aliasing, but somehow the texture ...
0
votes
2answers
76 views

Player's camera, how to obtain smooth movement

In a 2D platformer, I have a player that can move both horizontally and vertically. I also have a camera that moves in relation to player. In every update I do this: public void RepositionCamera() ...
0
votes
0answers
24 views

Loading dynamically created files with XNA

I'm trying to implement a structured save/load functionality so if the user saves, it will take up one of 10 slots, and if the user loads, they would select one of these slots. To do this, I need ...
3
votes
1answer
116 views

Explanation of matrix transformations

I've been looking for something that can help me understand matrix transformations. I've been to multiple different sites, including Wikipedia and quite a lot of related questions on SE and other ...
2
votes
2answers
143 views

XNA: Non-overlapping shadows

I want to create an effect similar to the following in XNA / MonoGame: There's a background and a semi-transparent shadow consisting of several objects (two circles in this example). However, the ...
0
votes
1answer
44 views

XNA 4.0 - Strange Behavior when using RenderTarget2D

My Problem is similar to XNA 4.0 - Why does using a RenderTarget2d cause transparency on models?. I want to render my scene to a Texture2D and then draw the texture. If I set no RenderTarget at all ...
0
votes
1answer
68 views

How can I animate the stretching of a sprite over time?

My goal is to find the function to stretch a sprite like my example below, and then get it to animate during a certain time. It is like an interpolation, where the starting point is the original ...
1
vote
1answer
83 views

How can I deploy a Xbox 360 game onto a disc?

I'm making some games for Windows now since about 3 years using the Microsoft XNA Framework and C#. Now I finally came to buy myself a Xbox 360 and now I want to deploy some games I converted to Xbox ...
4
votes
1answer
2k views

XNA Platformer Sample: Supporting multiple resolutions?

I have been looking at the XNA Platformer Sample and noticed that, when you change the resolution, the game world still renders at 800x480 and not the new width and height of the display. Can anyone ...
3
votes
1answer
1k views

C# XNA Is key toggled?

I've got a question about toggling keys. How do You check if the key is toggled? Here's my quick and easy code: public class KeyToggle { private bool isEnabled = false; ...
1
vote
3answers
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
148 views

Can I render some vertices as an object instead?

I am generating vertices at runtime that represent terrain. I've always drawn the vertices as triangles with GraphicsDevice.DrawUserPrimitives<VertexPositionColor>, but I'm wondering: Can ...
2
votes
1answer
85 views

Monogame/Android: Using content from PCL

I'm quite new to Monogame and PCL, but I hope someone can help me with my question. I have a Monogame/Android project with references a PCL which targets .NET 4.5, iOS and Android. The PCL has ...
0
votes
1answer
40 views

Store custom data against XboxLIVE Gamer in XNA?

If I am using Xbox LIVE Gamer Services for a networked XNA game, is there anyway to store custom data against the Gamer or GamerProfile so should they sign-in again even on a different machine I can ...
1
vote
0answers
43 views

Grid patter appear over bloom when resolution is lower than 1366x768

The bloom post process in our engine is done via consecutive downscaling of the treshhold texture down to 1/64x1/64 of the main size. Every texture we use is R16G16B16A16 FP16. Afterwards, we ...
-2
votes
1answer
98 views

explosion spritesheet is not working [closed]

I want to do a simple explosion on a collision.Here is my code... public explosion(Texture2D newTexture, Vector2 newPosition) { texture = newTexture; position = newPosition; ...
0
votes
0answers
181 views

Implementing Exponential Shadow Mapping

I've been following the tutorials (link1) and (link2) to implement Shadow Mapping. However, I'm getting shadowing artifacts which are quite ugly. I've done some research, and found that ESM ...
0
votes
0answers
37 views

Sprite won't travel properly to a point

I am creating a game in which I would like the player to be able to click a location and have the character travel to it. This is the code I am trying to use for this: if (Mouse.GetState().LeftButton ...
1
vote
1answer
82 views

XNA Move List of Rectangles

I have a game in which sprites will be removed and added under different circumstances, and so I created Rects of type List<Rectangle> to hold the bounding rectangle for each sprite. ...
2
votes
0answers
30 views

Xna 4 Model Rotation with inertia not working as expected with variable updates

I am trying to rotate a model with inertia damping with the keyboard. The code works great with a fixed time step but it doesn't behave the same with a variable update frequency. Update method: ...
2
votes
1answer
118 views

What's the difference between Textures and VertexTextures in XNA?

The GraphicsDevice class of XNA has the properties Textures and VertexTextures. What is the exact difference? I don't really understand what MSDN tells me about this. I usually use Effect parameters ...
1
vote
0answers
33 views

Multisampling Gamma Correction Problem

I have multisampled rendertarget where I use red channel as stencil data, but the problem is I get incorrect results around borders if "Antialiasing - Gamma Correction" is set to on in Nvidia Control ...
1
vote
1answer
42 views

Proper Directional light on multiple models

I've been trying to implement a Directional light into an XNA game I'm working on, but for what ever reason, I cannot seem to get the directional light to be a true directional light. Instead, I am ...
1
vote
2answers
206 views

How can I project a vector on another vector?

I have a generic not normalized Vector3 v1 and I want to calculate its component along another Vector3 v2. I used to normalize the vector I want to be the direction and then multiplying the other ...
12
votes
1answer
2k views

How can I create gradiented Fog of War?

I'm creating a top down 2D RTS game for educational purposes. Currently, I'm really just copying Starcraft's design/ideas. I've decided I should probably implement Fog Of War too. My expectations: ...
0
votes
1answer
159 views

Texture2D can't find my sprite - how to setup the content directory in XNA

So I keep getting told that spr_lives can't be found. I'm working out of a book and using the samples given to me (have not changed the code or folder structure, so it /should/ work) but nothing's ...
1
vote
1answer
114 views

Scale adaption based on distance to object

I have situation illustrated on image above, name displayed over the player. Text is rendered as 3d rectangle and rotated to face camera as billboard. (I am using this article ...
1
vote
0answers
58 views

Monogame apply tint to only some parts of sprite [duplicate]

Each player is a different colour (Red, Blue, Green, Yellow) and I want a small part of each piece of armour to be tinted to the player colour. Is this possible without using a second armour sprite ...
0
votes
0answers
60 views

How can I position different size creatures in a group automaticly

I'm doing a game (in xna) on my free time, as I'm not in the game market, I'm pretty sure I'm missing something that would help me get this right. Think of Ogre Battle. A group of unit moves, and ...
12
votes
3answers
1k views

Why are there lines in between my tiles?

I'm making a top down XNA game. The maps are created by tiles. A problem I recently noticed is a 'grid' of lines between the tiles. It only shows up sometimes and only depending on the camera ...
1
vote
1answer
61 views

Can I rely on SoundEffects being stopped when unloaded?

I am using XNA's SoundEffect class to play sounds. I have to unload all sounds from the corresponding ContentManager for technical reasons, while some of them are still playing. What happens to ...
0
votes
0answers
71 views

Interactions between camera and procedural terrain

QUESTION REWORKED I need to update every frame camera position along a surface with hills and drops. In this picture you can see a particle of the surface terrain (just one triangle) and a sphere ...
0
votes
1answer
61 views

Issue with calling Spritebatch in XNA 4.0 Game [closed]

So, I am creating a game in XNA 4.0, using the program Microsoft Visual C# Studio Express 2010. The issue I am having: I have the entire game done, and there is no reason why it should not be ...
1
vote
1answer
97 views

Dealing with angles in 3D

In 2D everything is easier to understand. I'm not enought experienced to join people who say that 3d is the same: you JUST need to add a dimension - THAT adding a dimension is my problem, bacause I ...
0
votes
0answers
99 views

Smooth circular collisions with edges/collision boxes [C# + XNA]

So, me and a friend are working on our top-down perspective 2D game, and have come to work on perfecting our collisions. In its current state our player sprite is colliding with walls, but is ...
5
votes
5answers
2k views

More Efficient Data Structure for Large Layered Tile Map

It seems like the popular method is to break the map up into regions and load them as needed, my problem is that in my game there are many AI entities other than the player out performing actions in ...
0
votes
1answer
314 views

Incorrect colour blending when using a pixel shader with XNA

I'm using XNA 4.0 to create a 2D game and while implementing a layer tinting pixel shader I noticed that when the texture's alpha value is anything between 1 or 0 the end result is different than ...
3
votes
1answer
3k views

XNA + Windows Forms: How make them work together without making the trick of the custom GraphicsDeviceControl?

What I've found is a solution where you have to code a custom GraphicsDeviceControl to put inside the form (the well known tutorial from the APPHub), but that's not what I'm searching for. I would ...
0
votes
0answers
83 views

Collision - Per Pixel and Rectangle Based, Combined

UPDATE:i found the error in my calculation the problem was that i needed to consider if the image is rendered flip or not to fix it just need to rub from the opposite side of the sprite I am currently ...
1
vote
1answer
161 views

Angular velocity from 2D Collision

I have been working on a 2D physics engine for my A Level computing project and I am having trouble calculating the angular velocity from a collision. I have managed to workout each objects linear ...
1
vote
2answers
176 views

XNA blurring moving images

Why does XNA blurs the images which moves less than 1px in between two draws? It is quite annoying, because everything looks really blurry. Is there a way to disable it? I have tried to set the ...
0
votes
0answers
30 views

Farseer Physics, mass affecting velocity

I have just started with Farseer Physics, so I am kind of a newbie in this theme, so not a surprise that I have encountered something that is not involved by the engine, or I just don't know about it. ...
0
votes
1answer
56 views

xna 2.5d gravity system

i currently developing a game using the xna API. now the game i am developing is 2.5d. by 2.5d i mean the character or object can move left and right and a up and down(not just by jumping) that it ...
1
vote
1answer
211 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 ...
0
votes
1answer
169 views

How can I create my own GameTime for timing things in my game?

I have a Game class and a GameComponent class. I want to perform operations inside the GameComponent class which depend on calling gameTime.ElapsedGameTime.TotalSeconds, but I've noticed that that ...
2
votes
1answer
107 views

map the section of a procedurally generated surface on a plane

I'll try to be as clearer as I can. I have a surface on a 3D space which is not flat, it has hills and depths. My goal would be intersect it with a plane so that I can map the section of the surface ...
1
vote
2answers
100 views

Where does the Game class come from in the DrawableGameComponent constructor?

I'm making a project to Windows Phone using Silverlight + XNA, but I don't know how I can use the DrawableGameComponent because the constructor requires a Game class, it looks like this: Planet.cs ...
6
votes
3answers
629 views

How do I make a moving object stop smoothly at the end of a path?

There are a dozen ways I could word this question, but to keep my thoughts in line, I'm phrasing it in line with my problem at hand. So I'm creating a floating platform that I would like to be able ...
1
vote
0answers
107 views

Using obj file in an XNA game [closed]

Sorry if this is a bit novice but I am far more into engineering than game development but I just want to make a small 3D game for fun with XNA (well actually MonoGame). The thing is that I don't have ...
-1
votes
1answer
80 views

Why doesn't my XNA model render at all? [closed]

I am trying to draw a 3D Model in XNA 4.0, but it doesn't show up. I think I made it correctly, but maybe not. My code follows: Here is the LoadContent and Draw method of my Main class. Spaceship is ...