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

XNA: How to switch songs at the press of a button

Well i have this: Song Song1 = Content.Load<Song>("VirtualRiotEnergyDrink"); Song Song2 = Content.Load<Song>("VirtualRiotIdols"); MediaPlayer.Play(Song1); ...
1
vote
1answer
22 views

How can I draw some of my XNA models semi-transparent? (C#, XNA 4.0)

I've recently made some basic Blender models without transparency for a new game I've been working on, but I'm having some problems rendering them semi-transparently. Namely, I haven't been able to ...
0
votes
1answer
22 views

Question about segment of code in XNA [on hold]

Basically when the code says public static Camera Instance { // Code and something with get statement } Is it declaring a method? I don't think it is a method because there is no parenthesis to ...
0
votes
1answer
36 views

xna - Render background and multiple sprites to a single texture

I currently creating a game and I am trying to render my background and a sprite to a texture. Currently I have the background being rendered to a texture. But I am needing to render both my ...
0
votes
1answer
37 views

How to prevent constant adjustments form collision?

I'm try to clone a popular 2D platformer as a project. For both the player character and enemies, whenever I constantly check to see if they are walking on the ground or floating platforms, they ...
5
votes
1answer
315 views

How can I remove Magic Pink from an image at runtime using GraphicsDevice?

In XNA 4.0, I want to load all my textures at runtime, which means I will not be able to take advantage of the content processor. (This is fine because it would allow people to change graphics and ...
0
votes
0answers
99 views

How to do animation of XNA model integrated with WPF?

Back with another weird question I managed to find a XNA Model viewer integrated with WPF which is this one https://xnamodelviewer.codeplex.com/ So I had a custom processor which sort of run multiple ...
0
votes
2answers
39 views

XNA - debugging

I know how to debug step by step in XNA however when I do that the screen is gray and the console does not give out any output. This is a problem because it greatly limits my ability to find problems. ...
1
vote
1answer
116 views

Apply shader to only a part of a sprite

I'm trying to make an image blur when a transparent image overlays it, I am wanting it only to blur the section that is being overlayed. So if half of the original image is not being overlapped, that ...
-2
votes
2answers
62 views

Create a big image out of several other small images in MonoGame/XNA

How can I create one big Texture2D out of several other small Textures2Ds? Then display that image instead of all the small images.
0
votes
0answers
34 views

Choppy edges with sub pixel movement MonoGame/XNA 4

When I move a texture slower that one pixel it moves using sub pixel movement inside but the edges jumps from pixel to pixel. Video : https://www.youtube.com/watch?v=zcai1PUfzzA Sorry for the low ...
0
votes
1answer
40 views

Wrong distance in Depth-buffer

I am currently trying to get the Depth Buffer as a texture to use it for edge detection algorithms. Since XNA4 does not allow direct access to the Depth Buffer as texture i have to render it into a ...
0
votes
2answers
103 views

How to get asset/model name from (custom) Content Processor in XNA 4.0

I'm trying to make multiple animations for multiple models in XNA 4.0 and I need to get the name of the model/asset from the content processor which is a custom one (XNA default I think), I'm trying ...
0
votes
0answers
19 views

Play soundeffect only once?

I am creating a game in XNA and when there is a collision between two objects a siren will sound. I have pixle-colliding between the objects and if several pixles collide the sound plays several times ...
0
votes
1answer
33 views

XNA SoundEffect won't stop playing

For my HND I've got to re-create Frogger, and everything was going swell until I tried adding some collision detection and sound. Whenever my player intersects a vehicle, the sound file just starts ...
0
votes
1answer
38 views

XNA draw texture/font and DrawIndexedPrimitives at the same time [duplicate]

When i Draw a texture2d or a font with spriteBatch and also draw GraphicsDevice.DrawIndexedPrimitives, the frame is draw weird SpriteBatch spriteBatch = new SpriteBatch(GraphicsDevice); BasicEffect ...
0
votes
3answers
119 views

Drawing 3D cubes with xna

I managed to draw a 3d cube using triangles like this: protected override void LoadContent() { basicEffect = new BasicEffect(GraphicsDevice); VertexPositionColor[] ...
0
votes
0answers
33 views

XNA sound effect loop cancel

I'm using SoundEffectInstances in XNA to play a tone. This means I have ~.005 second clips playing on a loop. It sounds fine, but I can't gracefully stop them because XNA gives a ...
0
votes
1answer
139 views

Lightning bolt effect with particles is not continuous

I am Drawing a lightning effect animation using this image: Below the result: As you can see the outcome is not a continuous purple color as I wanted it to be, but it has black spaces in ...
-1
votes
1answer
77 views

How to remove the jitter from my pong AI movement?

I am developing Pong using Monogame / XNA and my AI paddle is really jittery when the ball is moving more horizontally than vertically. My AI is very simple and works as follows: If the ball's ...
1
vote
2answers
59 views

Scaling sprites in XNA 4.0/Monogame

So I looked up a tutorial on how to scale sprites in XNA and I think I have it all figured out. The only problem is that I want to use a spriteBatch.Begin() method overload without changing anything ...
2
votes
1answer
81 views

How to make my installer install XNA framework and .NET 4.0

I have made a simple Monogame game. Right now I am using this installation-package maker: http://installforge.net/ Currently my installer only installs my "game". (All the output files generated by ...
0
votes
0answers
50 views

how to draw a “thick” line between two points on screen in xna wp8

/* private void DrawLin( Vector2 begin, Vector2 end, Color color, int width = 8) { Microsoft.Xna.Framework.Rectangle r = new Microsoft.Xna.Framework.Rectangle((int)begin.X, ...
0
votes
1answer
209 views

Adding SpriteFont in Monogame

My question is probably something you guys have heard before - "How do you add SpriteFont's in Monogame's content manager?" The simple answer to this is, right click the 'Content' folder, go on 'Add ...
0
votes
0answers
48 views

DrawBone Angle variable using Kinect

when we want to draw Bones into XNA (using KnectSDK and C#), you have to calculate differences between two joints and draw bones between them. this is the function for drawing Bones: private void ...
1
vote
3answers
172 views

2D HLSL World position

I'm trying to get world position from my vertex shader to my pixel shader so that I can disable the shader once a preset X coordinate has been passed (no shading once I'm over X). Getting the screen ...
1
vote
1answer
53 views

Missing texture coordinates for channel 0 Fbx and XNA 4.0

I'm getting this error while trying to load a model in XNA 4.0 : Error 2 The mesh "transform1", using SkinnedEffect, contains geometry that is missing texture coordinates for channel 0. The model ...
-1
votes
1answer
70 views

How do I make my sprite freeze on a frame? [closed]

I'm trying to make a working duck animation but the animation keeps looping, how do I make it so that the duck animation freezes on a sertain frame? Right now I use a variable to loop it so that it ...
0
votes
0answers
62 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 ...
0
votes
0answers
68 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
2answers
68 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 ...
0
votes
0answers
15 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
16 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 ...
0
votes
1answer
103 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 ...
4
votes
1answer
118 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
42 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 ...
1
vote
1answer
137 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
57 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
101 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
1answer
174 views

2D animated sprite jumping and gravity physics [duplicate]

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 ...
0
votes
1answer
95 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
46 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
345 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
79 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 { ...
1
vote
0answers
115 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 ...
0
votes
2answers
298 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
3answers
127 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 ...
0
votes
0answers
164 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 ...
4
votes
2answers
252 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
166 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 ...