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

How to play more than one background song in XNA?

The current tutorial I am using to play background songs only allows me to play one song throughout the entire game. Link to tutorial --> http://rbwhitaker.wikidot.com/playing-background-music I ...
2
votes
2answers
98 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
1answer
44 views

c# list that contains more then 3 lists [on hold]

How to create a list that contains more then 3 lists. If those lists change the "bigger" list that contain them also changes. public List<Rectangle> CoTree,CoRock1,CoRock2; public ...
0
votes
1answer
81 views

XNA game structure question

I see to be running into a problem here. I know it's easier to show code samples so here you go. This is my main game class namespace WindowsGame4 { public enum MoveDirection { Left, Right, Up, ...
0
votes
1answer
148 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 ...
0
votes
1answer
111 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 ...
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. ...
-2
votes
0answers
12 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
26 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 ...
4
votes
1answer
500 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
311 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
692 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
1answer
22 views

Question about segment of code in XNA [closed]

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
40 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
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
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 ...
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 ...
5
votes
1answer
317 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
101 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 ...
-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.
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 ...
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
41 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
2answers
1k views

Exported FBX Blender Model not showing up in XNA

I really do apologise if this question has been asked before, but I recently created a model in Blender 2.63, exported it to an FBX file, and tried to display it in XNA (using 4.0 Refresh), but all ...
0
votes
0answers
20 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
36 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
3answers
125 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[] ...
3
votes
1answer
175 views

Smoothing the scrolling path in 2D

I have the following problem: In a 2D game the screen can scroll in any of the 4 directions. Basically, the center of the screen during scrolling moves from (x1,y1) to (x2, y2) whereby (x1,y1) is the ...
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 ...
1
vote
2answers
61 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 ...
0
votes
0answers
34 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 ...
-1
votes
1answer
82 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 ...
0
votes
1answer
99 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
0answers
51 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
58 views

Sprite sheets, Clamp or Wrap?

I'm using a combination of sprite sheets for well, sprites and individual textures for infinite tiling. For the tiling textures I'm obviously using Wrap to draw the entire surface in one call but up ...
0
votes
1answer
235 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 ...
1
vote
3answers
176 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 ...
0
votes
0answers
49 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 ...
5
votes
2answers
605 views

XNA 3.1 to 4.0 Vertex Shader Not Drawing [closed]

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 ...
3
votes
3answers
699 views

AI algorithm for avoiding bullets in a shoot-em-up game

I am working on a shoot-up-game in XNA, it is going to be my final project in school. I was thinking of utilizing the minimax algorithm for AI agents for making tactics. However, I realized that the ...
1
vote
1answer
55 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
72 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 ...
5
votes
1answer
782 views

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

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 ...
0
votes
1answer
179 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 ...
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
2answers
71 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 ...
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
69 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
16 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 ...