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

Overlapping Vertex in DynamicVertexBuffer draw priority?

I am creating a voxel game, and I have recently run into an issue. My world is drawn by a DynamicVertexBuffer, which just consists of vertices for the blocks themselves. On top of that, I switch ...
0
votes
2answers
56 views

How to rotate (YAW) aircraft in XNA?

I'm developing a flight simulator based on Riemer's Blog tutorial (XNA C#). To control the aircraft, I use the following code: Quaternion additionalRotation = Quaternion.Identity; additionalRotation ...
0
votes
1answer
28 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 ...
1
vote
2answers
27 views

Flushing KeyboardState

I'm using a simple InputManager class for an XNA game with keyboardState and lastKeyboardState that gets updated and has KeyDown/KeyReleased/KeyPressed functions... but ran into a small problem: I ...
5
votes
1answer
300 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
14 views

Can I generate collision boxes from a model file with BepuPhysics and XNA?

I am currently developing a game using BepuPhysics in XNA 4.0, and I am trying to reasonably match the in game collision Entities with the Model they are associated with. My current workflow involves ...
0
votes
1answer
49 views

Fast mesh collision 3D (C# XNA)

I'm trying to write a simple program where a 3D landscape can be walked about with a basic camera. However, I've found it very difficult to do even simple collisions with my terrain. I'm wondering if ...
1
vote
2answers
95 views

MonoGame 3.3 Font loading

Is there any way to have fonts in game without making a separate Content Project and adding a .spritefont file in the new 3.3 Monogame? You can now load other resources directly from the Content ...
0
votes
2answers
34 views

MonoGame Point filtering movement appears Choppy/Jerky

When you move a sprite that is drawn using point filtering with a decimal number, example : 0.1 pixel or 100 * deltaTime (1.6) the movement appear choppy/jerky because it jumps from pixel to pixel. ...
0
votes
0answers
78 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
1answer
37 views

XNA Stop movement when arrived

I'm trying to stop movement when sprite arrive target position. But i couldn't handle it. Sprite still move and pass target position. Here's the code that runs every update to move it. public ...
0
votes
0answers
22 views

Problem restoring the game preffered buffer size after navigating from a XAML page. Monogame

I have implemented to my game a simple leaderboard and submit score pages, which are pages in XAML. I used PreferredBackBufferHeight/Width to set the buffer to be equaly on all devices, whether their ...
0
votes
1answer
35 views

Issue with rotating particle effects with DrawUserPrimitves

I am creating a voxel-like game in XNA/Monogame. I am trying to create particle effect of which I create by making a list that is populated every frame. My issue is here: I am using a WorldMatrix to ...
0
votes
3answers
66 views

Strategy for keeping a primitive facing the viewport?

Using XNA, c#. I'm writing a stellarium-type of program-- well, trying to :-) -- and I have a 'sun' texture that I'll be pasting onto triangle primitives. I'll also be floating some text above each ...
1
vote
1answer
108 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
54 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
40 views

XNA/C# Shadows look strange in orthographic

I have implemented shadows in to my game engine. They look fine when rendered in projection mode as a projected light, however I get a strange "blocky" look when they are put into orho'. I will be ...
1
vote
0answers
46 views

Equivalent to Draw() method in Unity project?

I have been using xna/monogame before this. So I read tutorials about unity, made some classes, loaded some sprites, everything "seems" to be going good, but I can't figure out how to add things into ...
0
votes
0answers
75 views

XNA renderTarget, how to convert mouse coordinates to world position when upscaling

I'm currently developing a monogame game with a tile engine. I have been experimenting with different tiles and sprites sizes : 16px, 32px, 64px I have settled for 32x32 pixels tiles rendered at a ...
0
votes
0answers
29 views

Additional dependencies in XNA/Monogame

I made a game in monogame recently, using the XNA content pipleline. I then sent the whole folder (The release folder in visual studio) to a friend of mine who does not have visual studio or monogame. ...
4
votes
2answers
302 views

How can I achieve a pseudo-3D camera effect like this?

I am trying to achieve a pseudo-3D camera effect similar to this: I have gotten the following results using a 3D camera and billboards: I am now running into the following problems: In the ...
0
votes
0answers
37 views

How to play a video and run content at the same time

Alright, so I have a video loaded, and other game content. Earlier this morning, when I was just learning how to actually play a video, I magically happened to get the video running in the ...
0
votes
1answer
64 views

Can someone explain to me the difference between 2 XNA methods?

I was recently trying to make a boucing ball off the environment walls. I apparently had everything correct, except for one thing, that I corrected stupidly, which made my code work, but I don't ...
0
votes
1answer
60 views

How do I make a time lapse in my code so it updates slower?

I have made some collision if statements, but they didn't work. birdbox3.X += 5; birdbox3.Y -= 5; if (birdbox3.Intersects(Banner1)) { birdbox3.Y ...
0
votes
1answer
69 views

Is sidescroller movement just offsetting the background?, MonoGame/XNA

When I make a sidescroller game and what to move my character do I just offset the background, or is there another better way?
1
vote
2answers
85 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
52 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 !
0
votes
1answer
33 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, ...
1
vote
0answers
42 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 ...
2
votes
1answer
51 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
132 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
84 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
2answers
72 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
50 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
52 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
53 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
62 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
93 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
64 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
53 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
70 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
39 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
43 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
37 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
54 views

2d camera shaking back and forth

I'm trying to create a smooth moving 2d camera but the camera is shaking back and forth 1 pixel. Player camera rectangle: public Rectangle recCamPosition(Global global) { return new ...
0
votes
0answers
64 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
66 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
111 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
55 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
18 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 ...