Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

XNA is a game framework by Microsoft that allows deployment for Windows, Windows Phone & Xbox 360.

0
votes
0answers
11 views

Issue with Monogame Skybox [duplicate]

I'm new to 3D graphics and I was following one of the RBWhitaker's tutorials on setting up a skybox for a 3D XNA game. I think it was slightly outdated. The original code was something like: ...
0
votes
0answers
22 views

Monogame Skybox Advice

so I'm pretty new to 3D graphics and I was following one of the RBWhitaker's tutorials on setting up a skybox for a 3D XNA game. I think it was slightly outdated. In my .fx file for the skybox I did ...
1
vote
0answers
24 views

Monogame Per Pixel Collision scale texture

I have a problem: I am learning the Per Pixel Collision, because I am very new to Monogame. Everything works thine, but my texture (image) is too big, so I scaled it down to 0.5f. Now it doesn't work ...
0
votes
2answers
84 views

C# Fastest way to iterate over certain tiles overlapping multiple chunks?

What's the fastest way of iterating over certain tiles overlapping multiple chunks in C#. Ideally without having to iterate over everything, just a specific set of coordinates? (green cubes example ...
2
votes
0answers
33 views

Viewport not matching Window size when fullscreen

I am using: GraphicsDevice.Viewport.Bounds to determine the size of the canvas / stage for my window. This works well if I am in Windowed mode, but if I launched ...
0
votes
2answers
38 views

TouchPanel.GetState() Returns wrong touch locations XNA

I am trying to make my Desktop game playable on IOS. I have a Button.cs class, which has this code in it: ...
1
vote
1answer
66 views

Issue importing TileMaps/TileSets in Monogame.Extended 1.0

I've just started coding my first ever videogame using Monogame/Xna. I've reached a point where I would like to start editing maps and importing them into my game using the program Tiled. After ...
0
votes
0answers
35 views

Conversion from lat-long to Cartesian coordinates 's result is different with real location

I'm trying to put building from real lat-long in my Monogame app (4 buildings in my school, please check the image with the blue circles) But after some convert method, it went terribly wrong (please ...
1
vote
1answer
71 views

Destroying a ship removes both the ship and the bullets it has fired

So I'm making a game where you fire bullets at enemy ships which are flying past you. The enemy ships are also firing at a straight line in front of them. The bullets are made into a list of another ...
0
votes
2answers
74 views

Tile slopes and jittery movement

I'm trying to handle slopes in a tiles based world. I'm using basic linear interpolation to find the Y coordinate of the character based on his X position. But i have a problem, when the character ...
0
votes
0answers
11 views

Check Collision with rounded off objects [duplicate]

Alright, I am writing my first game on C#. Let's imagine I have got two classes: HeroEntity (has an X of type float, a Y of type ...
0
votes
1answer
24 views

Camera not in sync with player

I am currently working on a game in XNA and MonoGame. This game is supposed to be a port of KidsCanCode's tutorial series of creating tile-based games in Python. Here is a link to one of the videos in ...
0
votes
0answers
35 views

I want my mouse position to change when I move my player

So I set my camera following my player but I have a problem. When my player moves, the vector changes obviously but not my mouse position. I have to calculate the mouse angles of where I shoot my ...
0
votes
1answer
44 views

How to get tile rotation from TiledSharp and convert it to XNA/MonoGame

I am currently working on a game using XNA and Tiled. I use Tiled to create my maps and load them using TiledSharp. Some of my maps have tiles that are rotated by using one or more of the left rotate, ...
1
vote
1answer
37 views

Efficient way to avoid shadow “streaks” beyond bounds of shadow map

BACKGROUND INFO: Using MonoGame. To maximize shadow resolution, I've got a shadow map that covers only the area closest to the camera. (I am aware of Cascading shadow maps, but for now, I am ...
0
votes
1answer
113 views

System.Windows.Form.Control.FromHandle returns null for current window

I was following the book "XNA 4.0 Game Development By Example" and in the eighth chapter, the author adds windows form to an XNA game. I was following the book for a MonoGame project, but I get null ...
0
votes
0answers
98 views

Why do I see blurring lines when moving a camera, and how can I fix it?

I am using Monogame and I'm rendering the terrain as tiles. I am bringing in the tiles from Tiled. When I move my camera up, I get these lines that seem to be blurring the tiles together. Please ...
0
votes
2answers
196 views

Monogame Drawing Text

I'm really new at XNA. I've been following some tutorials at gameprogrammingadventures.org but when it comes to conversations I don't really like how the author does it so I've been trying to ...
1
vote
1answer
227 views

How do I prevent tile tearing effects when using pixel art in XNA/MonoGame while keeping the low velocity of the player?

Most of my Texture2D are pixel art, meaning they're rather small, so my player/character's position has to change using decimal points to keep a realistic movement that matches its walking animation. ...
0
votes
2answers
122 views

How to render many tiles fast if zoomed out? (Monogame/xna)

I'm currently trying to optimize my tile engine. I used monogame with the spritebatch first, but that doesn’t works well. I have read many articles how I could optimize my rendering code. I moved ...
0
votes
0answers
30 views

Monogame - how to have draw layer while on SpriteSortMode.Texture

I have a problem in which in my game I have to use SpriteSortMode.Texture because I have a lot of objects with few textures, so I cannot afford to use SpriteSortMode.BackToFront. The thing is this ...
0
votes
2answers
55 views

Xna/Monogame How to get an object to decelerate

So I've written a statement for releasing the ball based on a certain speed and for it to move in the direction of the mouse, like so: ...
0
votes
1answer
32 views

XNA triangle grid not drawn using DrawIndexedPrimitives

I have just recently started working with Monogame (XNA). Now I had code that was drawing a grid using DrawUserIndexedPrimitives. However I read that it reloads the vertices in the GPU each draw, and ...
0
votes
1answer
84 views

Trying to get an object to move in the mouse direction XNA C#

Right, so in my Player class where I call the object I got an if statement which gets the coordinates for the mouse ...
1
vote
1answer
68 views

Questions about “minecraft” game optimisation [duplicate]

I'm currently trying to do a basic "minecraft style" game. I know how difficult it is to create a game like this, that's why I juste want to do the base of a game like this. I did a class which ...
0
votes
0answers
35 views

AI how to choose target for sumo like game

I am building a game that is the same as an old game I used to play called Sumo in fusion frenzy for Xbox. The object of the game is to knock enemy spheres off the edge and stay in the middle of a ...
0
votes
1answer
43 views

Update sprite position when speed changes if frame rate is low

I have a sprite moving horizontally from left to right. For each iteration I want to start decreasing the speed. This works ok, and the sprite will stop at some point, however depending on the frame ...
0
votes
1answer
59 views

C# XNA How to work out minimum distance to decelerate and stop at a point

I am building a game in C# using XNA. I am currently trying to get a character to always travel to the middle of the map which is located a point (0,0,0). I want the character to accelerate to the ...
2
votes
1answer
199 views

Tilemap Collision w/ different height levels and directions

I've been programming a final fantasy 6 clone in C# using Monogame and Monogame Extended, and have met on a few interesting challenges regarding tilemap collision. The game seems to have different ...
0
votes
0answers
39 views

Why pixel images so much blurred in xna? [duplicate]

I'm making a pixel game in XNA and there are some kind of problem. I made a pixel image in aseprite(or ps) but these images made with 1 pixel and when i enlarge this image in XNA it is very blurry. ...
0
votes
0answers
36 views

Using a custom made message queue to manipulate sound effects

I am currently creating a small game with Monogame and have created a custom message queue to handle all intercommunication. I am looking for some insight into a problem I have in visualizing how to ...
0
votes
1answer
97 views

C# XNA Making a TextBox Appear to input the X and Y coordinates

Okay I'm trying to find a way to not have to hard code in my values for the x and y coordinates. so far I have hard coded these in when you press certain numbers on num-pad it'll move the camera to ...
0
votes
0answers
108 views

How can i apply occlusion culling in XNA / Monogame

I try to make a mini voxel game since a while. And now i try to improove performance the best i can. After use the frustum and Octree, i want to use the [Occlusion Culling]. But unfortunatly i can't ...
0
votes
1answer
116 views

Changing the color data of an instance of a shared texture? MonoGame

I want to load multiple instances of a texture on the screen and be able to change the color of each one individually by clicking on it. I've tried many different ways and currently I'm creating two ...
3
votes
1answer
114 views

Why are .xnb files used rather than source files?

XNA and Monogame are built using a content pipeline, which takes source files (images, sound effects, 3D models, etc.) and converts them to proprietary .xnb files. What's the benefit of doing this as ...
0
votes
1answer
141 views

Is there a way to force a resolution on Android when using Monogame?

I think I looked everywhere but I couldn't find a way. My phone has a native resolution of 1920x1080 and I would like to run my game at 1280x720. I tried by changing PreferredBackBufferWidth and ...
0
votes
1answer
98 views

Monogame problem with flat shading low poly terrain

I have been dabbling in 3d rendering recently and I am having a problem with the shading on the mesh I am using. The code I am using to calculate the normals for all the triangles is as follows. <...
0
votes
0answers
22 views

XNA: How should I handle re-using vertices

I have a helper class that generates vertices for a polygon when you give it position, color, rotation, and radius. However, every time the user wants to draw a polygon I re-create the vertices from ...
1
vote
0answers
54 views

XNA / Monogame Camera flickering on collision

I have my camera follow my player and it works perfectly, I had some issues with collision and managed to get it working, but now my camera follows my player when it gets pushed back so the camera ...
0
votes
2answers
67 views

Collision stickyness problem on multiple inputs

I've been trying for a couple of days to solve an issue I'm having with top-down 2D collisions, whenever I collide with tiles that have adjacent collidable tiles my player sticks to the wall, If I ...
0
votes
1answer
96 views

Performance issues when loading maps in XNA / Monogame

I'm new to Monogame and I'm having some perfomance issues, I'm loading a matrix of 9 maps (3x3) each with 50x50 tiles of 32x32 pixels each. I store that in a list of maps from 0 to 8 and call them by ...
0
votes
1answer
164 views

How can I store and read dialogue?

How can I store dialogue so that it could be read for a kinetic (linear) Visual Novel type of game in XNA/MonoGame? I'm currently using a .txt file, but I noticed that I can't read from a specific ...
0
votes
1answer
60 views

2D Game : How do I draw my entities (player, etc.) by their Y position?

I am using C# with MonoGame 3.6 A picture of what I mean: http://i.imgur.com/S3i5iB0.png You see, the little black box is drawn over the red box, because it is drawn before the red box gets drawn. ...
1
vote
1answer
103 views

How can I calculate respective 2D world/mouse position through different resolutions?

I have been at this game of trial-and-error for days now. I cannot find a consistent method to calculate the respective mouse position in my game world after the calculations are done to stretch the ...
2
votes
1answer
47 views

Model disappears when viewing from up vector

I'm sure there is a simple explanation for this behavior that makes mathematical good sense, but I need a way to look at my model along the up vector. I have tested it with the three unit vectors to ...
0
votes
1answer
162 views

2D Platformer Collision Detection Issues - XNA

I am developing a basic 2D platformer game to learn the basics of making a game engine and XNA. I have a CollisionHandler class that deals with AABB collisions between the player and the tiles of the ...
2
votes
0answers
64 views

Monogame resizing GraphicsDeviceControl in WindowsForms?

I'm currently working on a custom Map editor using Windows Forms. I have a class inheriting from GraphicsDeviceControl (called MapDisplay) that I'm using so that I may use spritebatch to draw the ...
1
vote
1answer
176 views

Is there any way to make xTile work with MonoGame?

I am currently in the process of planning and developing a game. I use MonoGame as my framework, and I also planned to use xTile with tIDE (https://tide.codeplex.com/) to manage my tiles, but it >only&...
2
votes
2answers
52 views

How to iterate through members of lists of members of lists within members of previous lists?

I'm sorry for the clumsy title, and for what will be the continuation of further clumsiness in my question - I'm not even sure how to properly ask this, so please allow me to illustrate: I'm writing ...
0
votes
1answer
110 views

Sprite masking with multiple, non-equally dimensioned textures in XNA

I know this question's been asked many times before, but I can't seem to get sprite masking to work in XNA/Monogame no matter if I try the stencil method, or the shader method. Considering I'm having ...