Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [xna]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
37 views

Best way to draw a tile (a floor) all over the screen?

I wanted a tip, a guidance perhaps to know the best way to draw a tile all over the screen. This tile is a 16x16 tile that should be the floor in my top-down map. I set my resolution to 1280x720 and i ...
user avatar
1 vote
0 answers
23 views

Meshes seem to get distorted when I use rotate or zoom transforms (XNA/Monogame)

Whenever I seem to create a rotation matrix or try to zoom, the meshes that I draw to the screen get stretched and distorted. I've tried to make a simple rotation matrix like this: ...
user avatar
3 votes
1 answer
76 views

Proper way to build sensible object graphs?

The Context I'm currently working on a game and its engine using C# and MonoGame. The engine is data-driven and I want people to be able to mod the game or make their own using my engine. All the ...
user avatar
2 votes
1 answer
168 views

Floats vs. Ints for position and collision

So I’m writing a player class and using floats to store the positon and velocity (Vector2) as well as using it when drawing. When it comes to collision I get the player bounds using this code: ...
user avatar
  • 31
0 votes
0 answers
84 views

How to mask 2D tile sprites

I want to use masking technique to be able to reuse tiles. Basically I have the base texture and an array of masking textures for different corners and positions and want to combine the two to get a ...
user avatar
  • 31
0 votes
1 answer
101 views

Something goes wrong when using System.Diagnostics.Process.Start to open a Monogame project

I am trying to develop a menu application for a homemade arcade. However, when I use Process.Start(path) to open my monogame projects' ...
user avatar
0 votes
0 answers
23 views

Basic Projection & View matrix

Currently writing a camera component for FNA (basically XNA), and can't for the life of me figure out why my matrix transform isn't working as expected. This is how I calculate my view & ...
user avatar
  • 7,609
0 votes
1 answer
79 views

How to handle objects on 2D Map

I am making a 2D RPG game in Monogame XNA. For the moment I have 2 kinds of data in my game: sprites objects and tiles. All the sprites are contained in a array list. I iterate over the sprites ...
user avatar
  • 1
0 votes
1 answer
90 views

How to do topdown collisions properly?

I'm trying to achieve grid/tile based collisions like "a link to the past"; here is an article showing it off (sliding off the corners and such). I'm currently using this type of collision ...
user avatar
0 votes
1 answer
62 views

How can I find the direction a sprite is moving?

I'm trying to get the direction a sprite is moving (up, down, left, right). My current approach is to get the x and y coordinates of the target and the sprite (the sprite is the thing that I'm trying ...
user avatar
0 votes
1 answer
286 views

Window handle is invalid

I'm trying to implement an input listener for FNA (modern version of XNA). Since FNA does not supply any sort of way to listen to native input this has to be done through the windows API and native ...
user avatar
  • 7,609
0 votes
1 answer
100 views

How to select a sprite with the mouse in c# XNA?

I'm attempting to create a chess game, for the movement I need to be able to click on a piece with the mouse, and then the square I'd like to move it to. Each piece on the board is a sprite, and I'm ...
user avatar
  • 1
0 votes
3 answers
102 views

How do I show only the level in monogame? [closed]

How do I remove the blue background shown here So that only the level is visible without making the sprites/map larger or the window smaller?
user avatar
0 votes
1 answer
64 views

XNA configuration on legacy code

Background: Our biomechanics and Advanced Surgical Technologies Lab wrote a surgery navigation system desktop application in C# around ten years ago. One of its major functions uses XNA Game Studio 4....
user avatar
1 vote
0 answers
56 views

Matrix transforming with translation/rotation/scale at center of screen

I'm trying to create a camera using matrix transforms, the gist is as follows: ...
user avatar
0 votes
0 answers
54 views

how to order entities by their distance from 0 on the x axis

I'm creating an infinite runner game in which you control several characters at once. Right now when you press the spacebar, they all jump at once but, I want them to jump at separately, one after ...
user avatar
0 votes
1 answer
41 views

Complex mesh (created in Blender) is not overlapping when rendered in Monogame (XNA)

community. Just started playing with Monogame and stuck with a quite simple, but still unanswered issue, at least I couldn't find any answer. The model rendered in Monogame (XNA) is not overlapping ...
user avatar
  • 101
0 votes
0 answers
61 views

How do I export an XNA crossplateform project to Nintendo 3ds or Nintendo Switch? [duplicate]

I would like to document my self a bit about 3ds and switch game creation. I know that modern game engine have builtin tools to export games to these platforms, but I could not find - in google ...
user avatar
2 votes
1 answer
156 views

Getting Rendered Sprite Size

I need the rendered dimensions of a sprite, I'm calling Draw in the class below: ...
user avatar
  • 131
2 votes
1 answer
118 views

Frame-rate drops when drawing 2D map tiles

Update: I figured out it has nothing to do with the camera but instead framerate drops when drawing my map tiles onto the screen. Here’s a link to a video showcasing the bug in action (For further ...
user avatar
  • 21
0 votes
1 answer
67 views

Game() parametters Content and Window are not pre initialized

I've been experiencing a really Strange problem since recently, Every variables of XNA Framework Game class seems not to be initialized before my extending Game1 class. Variables does not seem to be ...
user avatar
0 votes
0 answers
196 views

Playing Video for Splash screens etc using Monogame

I've been searching around on internet a way to display a video using XNA/Monogame. But everything tend to go in the direction of the class Microsoft.XNA.Framework.Media.Video. Unfortunatly, my xna ...
user avatar
0 votes
1 answer
110 views

How to flip a rectangle

I'm curently working on a system that make the player character look towards the mouse pointer. My system is effective but i'm having an issue while displaying the rectangle. In the Following code i ...
user avatar
0 votes
1 answer
79 views

Check if point is inside convex hull

I first tried with a simple axis aligned bounding box to test my algorithm (later shape will be different but always convex 6 faces), but even this case did not work, it always tells me that the point ...
user avatar
  • 334
0 votes
2 answers
288 views

XNA Rotate Vector2 around Origin

I have a Rectangle and a Vector2 position, my sprite is being drawn at this position. The rectangle is meant to be a collision system with the cursor, when I rotate my sprite around the origin and ...
user avatar
0 votes
1 answer
287 views

Monogame - SpriteFont Exception: Text contains characters that cannot be resolved by this SpriteFont

I'm trying to put text on the screen and if I put anything but an empty string I get "Text contains characters that cannot be resolved by this SpriteFont.\nParameter name: text" ...
user avatar
0 votes
0 answers
220 views

Sprite Distortion (Ghosting While Moving and Artifacts when Mirroring to External Display)

I am working on my first MonoGame project. I love the framework so far! I have implemented my own letterbox/pillarboxing to scale my native resolution by the maximum integer scale allowable on my ...
user avatar
  • 1,297
2 votes
1 answer
210 views

Sprites looks blurried on fullscreen

I'm trying to make a pixel art game and my resolution is 384 x 224, but when I change to fullscreen the sprites looks blurry and I don't know how I can disable bilinear filtering. I tried ...
user avatar
  • 21
0 votes
0 answers
49 views

HLSL Xna Deferred light issue

My point lights seem to have problems when the camera is far away… is it the depth map? Anyway i'll show you the code Here is my GBUffer fx : ...
user avatar
0 votes
0 answers
119 views

HLSL : Offset and length were out of bounds

...
user avatar
0 votes
1 answer
38 views

How to stop movement from moving multiple spaces when a directional key is pressed

I am making a 15 piece puzzle game and having difficulty making my sprite move one tile at a time, when i initially press the left key the sprite moves once, but after that the sprite moves multiple ...
user avatar
  • 1
1 vote
1 answer
1k views

Monogame/XNA - How do you resize a Texture2D and then scale it?

Problem: It seems like the Draw() call allows us to use either Destination Rectangle for resizing (5of8) or Scale (6of8/7of8) but not both. Purpose: I would like to resize a button from 567x634 to ...
user avatar
  • 21
1 vote
0 answers
34 views

How do I change a specific set of spawned buttons from gray to green?

I'm a self-taught programmer. I have a button class runs like this: ...
user avatar
  • 21
0 votes
2 answers
355 views

How would you go about placing objects between chunks in a 2D game?

I have a 2D infinitely generated world which is split up into 9 chunks at a time. Three chunks are loaded and three are unloaded whenever a player moves into a new chunk (if the player moves up a ...
user avatar
2 votes
1 answer
370 views

MonoGame game running slowly

Through development I've been running my 2D game (Monogame 3.6) on my windows laptop, which has some crummy integrated graphics card and an i5. Now I try my game on my gaming PC, which has a GTX 970 ...
user avatar
  • 43
1 vote
1 answer
343 views

Monogame - Collision not working and invisible walls

I have recently been experimenting with Monogame and XNA (moving from Gamemaker) and decided to work on a simple collision system. Problem is shown in the GIF. Main Collision Each entity (Quick name ...
user avatar
0 votes
0 answers
145 views

How can I make the screen scroll only when the character is close to the edge?

On the internet, I saw videos and tutorials about screen scrolling. But those only show how to keep the player always in the center of the camera. I want my camera to scroll over the level, following ...
user avatar
  • 121
1 vote
0 answers
399 views

Implementing a scrollable Panel in XNA/MonoGame

I am trying to create a scrolling Panel for my game. The code I've shown below works but there is a problem. I read Andrew's answer here and decided to implement the scrolling effect by using a ...
user avatar
  • 113
1 vote
1 answer
168 views

How to add a animation to myPlayer

I'm currently making a shoot em up in monogame. I want to add just one animation to my object. No commands or transitions between animations for different actions: just an object swapping between ...
user avatar
0 votes
1 answer
61 views

Blender export does not render correctly in Monogame

I am using Monogame 3.7.0.7 on Linux and Blender. I have exported my model using the "FBX 7.4 Binary" exporter. Here is a render from Blender: However, when ...
user avatar
  • 275
1 vote
1 answer
251 views

Collision detection problem in monogame C#

...
user avatar
  • 121
1 vote
1 answer
225 views

My position is "changing" when handling animation

I'm trying to learn Monogames(Old XNA) and how to develop a 2d game. I'm in the process of animating my sprites. It works but there are somethings that are weird to me. For some reason when ...
user avatar
  • 31
1 vote
1 answer
64 views

Why isn't my vertical scrolling functioning properly?

I'm trying to make a simple 2D platformer in XNA, but I'm having trouble with the vertical scrolling. What I'm trying to accomplish is that whenever the player is above half the height of the screen,...
user avatar
  • 11
0 votes
1 answer
252 views

How can I do a Metroid like transition between two tilemaps with Monogame Extended?

I want to do a transition like those in the Metroid games. Here is an example of what i mean: https://www.youtube.com/watch?v=RKJ3MAi0ZI0. You enter the door, the screen fades to black and the camera ...
user avatar
0 votes
1 answer
87 views

How to check if a custom Control is focused?

So I am building custom UI for my MonoGame project. I've gotten pretty far already, having created Controls such as: Button Panel TextBox Form ComboBox CheckBox etc. All of these controls obviously ...
user avatar
  • 113
0 votes
1 answer
342 views

Draw a texture2D at specific coordinates on another Texture2D

I have a ShipTexture and a Sail Texture. I need to draw the sail texture at a specific location on the shipTexture (call it the sailMountPoint) regardless of the location vector associated with the ...
user avatar
  • 101
1 vote
0 answers
37 views

MonoGame game does not work on other pc, when installed by WiX

I made a simple tetris game. I wanted to give it to my friend, so that he could test it. I made very fast WiX project and setted up every file from bin/Debug. On my ...
user avatar
  • 111
1 vote
2 answers
76 views

XNA: Classes with Texture2D to be treated as one

Summarised Problem: I have an Animation class that I want to be able to treat as a Texture2D field when need be. I do not ...
user avatar
  • 13
0 votes
1 answer
54 views

Simplify Matrix math code- Sun billboarding

If was trying to set the correct position of my sun billboard in my 3d game. I tried long until it worked correctly, but I wonder why this code must be so complicated: ...
user avatar
  • 334
0 votes
0 answers
446 views

XNA 4.0 C# How to draw cube with the index method

EDIT NOTE: I was trying to impliment indexing to my code instead of instancing. I left the indexing method because in my case, I don't need to use it. Preview Untill now I have drawed my cube with ...
user avatar

1
2 3 4 5
62