XNA is a game framework by Microsoft that allows deployment for Xbox Live Indie Games as well as Windows Phone 7.

learn more… | top users | synonyms

1
vote
1answer
54 views

Smooth slow pixel art movement MonoGame/XNA

When ever I move a sprite that is scaling using point filtering slower then 1 pixel for example 0.1 pixels the movement becomes choppy/jerky instead of moving in sub pixel movement it jumps from pixel ...
1
vote
2answers
62 views

HLSL Pixel Shader - Color depending on condition

I am new to shaders and HLSL so bare with me on this one. I have a 2D tile map in my game and want to create a mini-map, at first I was just copying all the data from one sprite batch to another and ...
1
vote
1answer
34 views

XNA Monogame - Move .dll and .xml root folder

I was just wondering if it's possible to move the dll and xml files into a subfolder, like in this picture: Thanks !
-1
votes
0answers
65 views

Is XNA still relevant? [on hold]

I am currently devlopping a game with XNA. But the community seems to not be active anymore. That's why I am asking if I should still go on... What's the advantage of using Unity3D ? Will I be able to ...
0
votes
1answer
18 views

Changing the texture filtering methodology within the same SpriteBatch Begin/End pair

How would I go about using changing the texture filtering method being used within the same SpriteBatch Begin/End pairing? I have this code so far. spriteBatch.Begin(SpriteSortMode.Deferred, ...
0
votes
0answers
37 views

Monogame can’t enable Anti Aliasing

I make a new project in Monogame with DirectX, run this example code and AntiAliasing does not enable. If I make an OpenGL project it enables correctly. Why is this happening ? How can i fix this ? ...
1
vote
0answers
30 views

XNA Billboards dont have correct depth

Im back again with yet another problem :( My current problem is with my billboard effect. Im having trouble trying to get the depth correct so that billboards that are closer to the player are ...
1
vote
1answer
47 views

Good way to support multiple types of triangles? (C# XNA)

[this question is somewhat long. here's my question in a nutshell] I want to use multiple types of Vertex data types for my triangle, interchangeably. So if I have a generic type T private void ...
0
votes
1answer
123 views

Vector2 to 3D world coordinates

I think I am almost there, but not quite. I am trying to transform a 2D point, (in the following example (100,100)) into 3D world coordinates, in order to draw my 3D Model named TestModel in ...
1
vote
1answer
74 views

How can I test if one point can “see” another point. (XNA)

I want to test if my enemy can see the player, however I want this to be pixel-perfect. I already have all of the solid objects drawing into a separate render state. It should be noted that every ...
1
vote
1answer
38 views

Event handling on own UI implementation in XNA

I´m creating a game in XNA with my own UI and its controls/components. Currently I have some problems with the event handling. Let me tell me the way I do it right now. Every object is handles as a ...
1
vote
0answers
26 views

Getting back to game page from xaml page problem. (Windows Phone 8.1)

I have implemented a xaml page where user can submit his score. I have managed to get the user to the xaml page, after 2 hours of struggling but I do not know how can I navigate the user back to the ...
1
vote
0answers
47 views

XNA/DirectX: Advanced 3D Sound

Im currently working on an xna game with c#. Ive been looking into 3D Sounds recently as this is the next objective on my list. Ive found several tutorials online and they dont work to the standards ...
0
votes
1answer
39 views

Creating a queue for BeginInvoke method - loading chunks

I have a voxel game similar to Minecraft. I have a funciton PushLoadedChunks(Direction) that pushes all of the loaded chunks forward, backward, left, right. This is done with ...
0
votes
0answers
58 views

Xna: Basic shadows

I have been programming in xna for quite some time now an I would really like to get real time shadows working. I have shadows already in my game which I got from "reimers shadow map tutorial". The ...
0
votes
2answers
82 views

Collision detection with moving tilemap

I have a player whose who's sprite is 48* 32. I know the player's position. The player can move up and down based on user input. I have a tilemap which moves. Here is an example of the array I use to ...
0
votes
1answer
54 views

Center a 3D model to cursor's position

I am having a hard time understanding how to go about this. I have a 2D game with some 3D models in it. I want to move a 3D model to where the mouse cursor is currently at in every frame (In other ...
0
votes
1answer
43 views

XNA C# Adding objects to List in another class [closed]

Hi all i started creating this XNA/C# version of Space invaders to get better at xna since i've only been using it for about 4 days. I've managed fine till now.. So my problem is adding my Bullets ...
0
votes
1answer
54 views

Drawing the same model multiple times

I am looking ways to improve the efficiency of my draw method in XNA/Monogame and understand how things work. I have just a group of 4 models (bricks), (red, green, blue, yellow) I am drawing multiple ...
1
vote
3answers
35 views

XNA - How to use One Rectangle in sprites for collisions

I'm new to XNA and game development in general. If I want to make an object solid so my character cannot pass through it, I would use several Rectangles to make the collision more "realistic" What I ...
1
vote
2answers
33 views

How can I draw sprites in layers based on their Y position?

I am trying to figure out the most efficient way to draw sprites in a way that they layer properly based on their Y position. Lets say I have four objects of the same class named A, B, C, and D, and ...
0
votes
1answer
34 views

Most efficient way to hide out of bounds object in tile based environment [duplicate]

I am working on a desktop game in C#, with Monogame framework. I am storing the tile instances in a 2D Array, for the sake of easy collision detection. But the levels are big (often 100x100 or bigger) ...
0
votes
2answers
31 views

Problem with my camera2d

Hey im doing and smoonth camera for my game. My camera shake 1 pixel so this show horribol. Here is my code: Player Camera Rectangle first second Camera rectangle last the move method: public ...
0
votes
0answers
58 views

How do I rotate a skybox?

I am trying to find the way to rotate my skyBox. I have a vehicle at a static position (0,0,0) and I can rotate that, but it seems that rotating the skybox is a different operation. First I load the ...
0
votes
1answer
54 views

Camera movement constrained to pixel boundaries

So a friend and me, we are currently making a game in C# using XNA. We are trying to get the camera to move in full pixel motion, but we just don't get it right. This concept is hard to explain, but ...
2
votes
1answer
102 views

Rendering lighting only on specific objects

I have done something similar to this in monogame: My question is, what would I have to do to draw that lighting effect only on the pillar and not the background ? Is there something like ...
0
votes
1answer
41 views

XNA Distortion Shader problem

So I came up with a distortion pixel shader in hlsl, but it has some issues. First of all, here is how it works: The shader uses another texture generated by the program as a distortion "map" (if ...
0
votes
0answers
16 views

DynamicSoundEffectInstance get volume, pitch for each frame XNA

I'm seeking to write a neural net for simple speech recognition in c#, I recorded the speech using the DynamicSoudnEffectInstance class, I need to know how to convert it to a series of pitches and ...
-1
votes
1answer
133 views

Loading Texture2d content in Monogame [closed]

I am using Monogame and following this tutorial series: https://www.youtube.com/watch?v=agt9-J9RPZ0 I am trying to load a Texture2d into the window and despite not getting any error messages the ...
1
vote
0answers
22 views

SpriteBatch passing textures to GPU

How exactly (or, how often) are textures passed to the GPU shaders in MonoGame/XNA? I am asking because I was profiling a MonoGame/XNA application and noticed that the memory controller load (using ...
0
votes
2answers
44 views

Collision detection of cicle and rectangle [closed]

How to find the collision detection of a moving rectangle on circular object? Here i have tried to junp rectangular object but the collision detection of a small rectangular object while jumping ...
0
votes
1answer
76 views

How to correctly enable anti aliasing in XNA?

In my project when I add graphics.PreferMultiSampling = true; this line in the Game1 Constructor (as the msdn website suggests), anti aliasing does not enable. Any idea what I might be missing ? Here ...
0
votes
0answers
25 views

XNA/XACT publishing help

So I'm trying to send off a demo to a friend to check out my game I started in XNA. It plays well when I'm debgging it on my computer w/Windows8 (and my other computer w/Windows7). I went to publish ...
0
votes
3answers
121 views

Is there a way to scale a texture via GPU rather than by CPU?

For my game that I'm developing I want to have my cards dynamically drawn so if there is any changes done to them it could be drawn on the card itself. What I have currently is that the cards are ...
-1
votes
1answer
45 views

Logic outside of game loop running slower than calculated

I've been trying to figure out what is happening when I run functions from the update loop in XNA that the game freezes for a few seconds until the function is done. When I do performance testing to ...
0
votes
1answer
21 views

How to DrawUserPrimitives after Drawing a separate Vertex List

I am currently making a voxel based game and so far I have chunk loading working well. My voxels are stored in an array, then pushed to a VertexBuffer, then drawn as a triangle list. My problem is ...
0
votes
2answers
82 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
1answer
72 views

How i can do colisions with irregular hitboxes [XNA]?

I'm developing my new platform engine and i don't know how to program collisions with slopes - I'm using hitboxes. For the collisions of rectangles i use this: if (player.rec(Position, ...
0
votes
1answer
53 views

Draw 3D model on top of another one

I am trying to draw a 3D model I made with Blender in Monogame/XNA and this is the result I get when I draw 2 of them on top of each other How can I make it so that the colors don't add up, but the ...
0
votes
1answer
27 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
2answers
47 views

XNA My Texture's Transparency is shown Black

I am trying to draw an image on to the screen. My image is drawn correctly but the background color which is transparent is shown black. Why is this so? My code: spriteBatch.Draw(Texture, Position + ...
0
votes
0answers
39 views

XNA Get height at players position from heightMap

So i got a server and a client, at the server I only got this on Terrain class: public class Terrain { int Id; float[,] HeightMapData; int Width; int Height; Vector3 Position; ...
1
vote
0answers
52 views

Multi-textured terrain XNA-monogame

I'm developing a TerrainEngine for my project and I have some issues with the multi-texturing part. I already tried some techniques but it doesn't match with my TerrainEngine's conception. My ...
0
votes
0answers
20 views

function of spriteBatch and Game1.draw method in XNA [duplicate]

I'm supposed te create a game for school in java but I already programmed games in XNA before this. Thats why I started reproducing the XNA framework (only gametime spritebatch and game1 class) I ...
1
vote
1answer
59 views

How to pass content through the project's structure efficiently?

so following situation. I have a project which is structured something like this. Game1 -> GameManager -> Module (multiple instances) During runtime units are being spawned in each instance of the ...
0
votes
2answers
53 views

Using shader for cubes

I am trying to use a shader to get an effect like this. Notice how every cube has exactly the same lightning as every other no matter where it is on the screen if you look closely the lightning is ...
0
votes
1answer
33 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
90 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
28 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
52 views

Multiple models not drawing

I got Camera, Terrain and player working, moving around, etc. When I try to add another player (another model to draw) it just dont any of the models. Here is my code; public class World { public ...