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
1answer
12 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' ...
0
votes
0answers
13 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 & ...
0
votes
1answer
32 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 ...
0
votes
1answer
51 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 ...
0
votes
1answer
42 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 ...
0
votes
1answer
44 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 ...
0
votes
0answers
17 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 ...
0
votes
3answers
72 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?
0
votes
1answer
57 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....
1
vote
0answers
33 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: ...
0
votes
0answers
46 views

How to correct mouse position to world position in xna/monogame

I'm making a small game where the player shoots projectiles by clicking the mouse. Everything worked fine before adding in a camera. Now the position of the new projectiles is always off. shoot code:...
0
votes
0answers
48 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 ...
0
votes
1answer
30 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 ...
0
votes
0answers
53 views

How to check if the bottom side of one object touches the top side of another object?

How can I check if the bottom side of one object touches the top side of another object? Like on the image: I tried this: ...
0
votes
0answers
98 views

C# Monogame/XNA: Workinging with positions on 2D tile-based game

Lately, I have started working on a simple MMORPG 2D tile based world (for learning purpose only). I started working on the server (networking, messages encoding/decoding and ect), and assumed 2 ...
0
votes
0answers
34 views

Creating a weighted mesh from skeleton data

I am trying to wrap my head around animation, but I am having some problems. The lower body looks ok, but upper body is still very wrong. I think my problem is that I have introduced some scaling ...
0
votes
0answers
22 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 ...
2
votes
1answer
82 views

Getting Rendered Sprite Size

I need the rendered dimensions of a sprite, I'm calling Draw in the class below: ...
2
votes
1answer
73 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 ...
0
votes
1answer
56 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 ...
0
votes
0answers
87 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 ...
0
votes
1answer
69 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 ...
0
votes
1answer
59 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 ...
0
votes
2answers
143 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 ...
0
votes
1answer
118 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" ...
0
votes
0answers
152 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 ...
2
votes
1answer
114 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 ...
0
votes
0answers
38 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 : ...
0
votes
0answers
90 views

HLSL : Offset and length were out of bounds

...
0
votes
1answer
36 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 ...
1
vote
1answer
607 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 ...
1
vote
0answers
33 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: ...
0
votes
2answers
269 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 ...
2
votes
1answer
223 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 ...
1
vote
1answer
248 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 ...
0
votes
0answers
121 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 ...
1
vote
0answers
261 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 ...
1
vote
1answer
129 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 ...
0
votes
1answer
46 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 ...
1
vote
1answer
153 views

Collision detection problem in monogame C#

...
1
vote
1answer
171 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 ...
1
vote
1answer
53 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,...
0
votes
1answer
207 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 ...
0
votes
1answer
66 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 ...
0
votes
1answer
300 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 ...
1
vote
0answers
35 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 ...
1
vote
2answers
68 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 ...
0
votes
1answer
47 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: ...
0
votes
0answers
312 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 ...
1
vote
1answer
216 views

XNA 4.0 How to combine triangles vertices 3D

Preview for the problem: I'm making a similar game to Minecraft (a game that it's world is made by cubes), but the fps of the game is getting low only by rendering a little amount of cubes in the ...

1
2 3 4 5
62