Questions tagged [monogame]

Open-source implementation of Microsoft's XNA 4, for Windows, Mac, Linux, Android, and iOS, among others.

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

Best way to implement a weapon/tool swing

In some games like Keplerth or Archvale, a weapon basically points towards the mouse and stays around the player sprite. But when you attack the weapon swings. I don't believe this is done with a ...
user avatar
  • 1
0 votes
0 answers
30 views

Drawing lines of arbitrary thickness and color in 3D space (xna/monogame)

Trying to find a way to do as the title says. I'd accept solutions with or without perspective, meaning the line may remain the same thickness regardless of how close or far it gets from the camera, ...
user avatar
0 votes
0 answers
41 views

DivideByZeroException is only thrown in Mono builds, not in IL2CPP. Why?

I'm working on exception handling and I usually test it with causing a DivideByZeroException. But this time it's not thrown. (While throwing a ...
user avatar
  • 627
0 votes
1 answer
45 views

Remove gaps between 2D trail that is based on particle engine

Hi I'm using a particle engine suggested from this answer I'm trying to create a seamless particle trail effect every similar to this (same) question However, when the vehicle is travelling too fast ...
user avatar
1 vote
2 answers
128 views

Combining palette-swaps and smooth scaling in a pixel-art shader

I am creating a pixel-art game in MonoGame, and have written a shader to perform various effects on a sprite when rendering it, such as performing palette swaps, highlighting outlines, etc.. Most of ...
user avatar
  • 23
1 vote
0 answers
45 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
24 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
80 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
0 votes
1 answer
459 views

How to handle octave & frequency in the Perlin noise algorithm?

I would like to implement a Perlin noise algorithm into my MonoGame project in order to procedurally generate 2D terrain. I've been using engines in the past (Godot, mostly) where there was an API to ...
user avatar
  • 103
1 vote
1 answer
167 views

How can I get correct coordinates from a diamond isometric map created in Tiled?

I am rendering a diamond isometric map created in Tiled using Monogame.Extended.Tiled package. Here is where I'm trying to spawn a player with an object at ...
user avatar
  • 11
0 votes
1 answer
65 views

Monogame - SpriteFont build error

I am quite new to Monogame. When I try importing a .spritefont file using the Monogame Pipeline GUI Tool and then build it, it gives me an error: "System.DllNotFoundException: Unable to load DLL '...
user avatar
2 votes
1 answer
175 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
  • 63
1 vote
0 answers
71 views

Decouple shared data from consumers

I am a former Unity user, and after a big pause in game dev decided to try out Monogame (I'm a software engineer IRL so I'd figure this is the best way to go). In Unity I was using scriptable objects ...
user avatar
  • 161
0 votes
0 answers
93 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
  • 63
0 votes
1 answer
143 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
1 vote
0 answers
56 views

How do I play multiple animations at once with an MonoGame skinned mesh?

I am working with the SkinnedMesh from this tutorial. I am at the point where I want to let my character run (which already works), but when I press the punch key on my keyboard, I only want the upper ...
user avatar
0 votes
2 answers
121 views

How do I create an infinite tower

So I had this idea of creating a 2D game where the player would just climb a tower the furthest he could. I do already have a camera and a scene class somewhat ready, but I'm not sure how I would add ...
user avatar
0 votes
1 answer
88 views

Will a game made with .Net Desktop Development, be able to run on Windows' desktops?

I am new to making games (I have experience only with pygame), and I want to start creating with C#. I've found out that Monogame is a very good engine. On my way of setting up, in the part where I ...
user avatar
  • 103
0 votes
1 answer
112 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
67 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
1 vote
2 answers
61 views

Exported FBX to Monogame doesn't translate all meshes

I'm taking a crack at a minecraft clone in Monogame, and I am trying to get my model to render as it's shown in Blender 2.9.1. When I look at the model in Blender, it looks great. When displaying in ...
user avatar
0 votes
1 answer
117 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
110 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
0 answers
52 views

Advices on multiplayer implementation

I am developing a top down shooter and my singleplayer is pratically finished so now I want to move on to develop multiplayer but I have some questions and I am seeking for some advices. In my game a ...
user avatar
1 vote
0 answers
62 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
55 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
42 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
1 vote
2 answers
170 views

How can I stop the ball from bouncing forever without changing the gravity?

I am using Monogame in Visual Studio 2019 and I need to find a method to make the ball that I fired with the cannon stop after bouncing from the ground, and while doing this, I have to not change the ...
user avatar
0 votes
1 answer
824 views

How to detect Tilemap collisions with monogame extended?

So,I kind of figured out how to detect the collisions when the chracter hits a certain tilelayer(such as a wall).Right now it just just the tiles which should have collision and prints out "...
user avatar
0 votes
1 answer
186 views

How to change the player character size in monogame?

So I made a new project, Loaded up the player sprite(16x16) but the player is too small(as compared to the level) How should I fix this? Here the code which loads the sprites and the levels(I am using ...
user avatar
0 votes
0 answers
72 views

Monogame pipeline is throws exceptions when trying to build .tmx files

I have correct referenced the monogame extended pipeline dll file to the monogame pipeline the importers and processors of the .tmx file are not missing/unknown but when I try to build the it it ...
user avatar
0 votes
1 answer
51 views

Publish to folder equivalent for a desktop GL project with visual studio Mac 2019

I'm not home so the only computer I have access to is a Macbook, and now I would like to see how I could pack up projects to export for various platforms. But when I build my project it only produce a ...
user avatar
0 votes
0 answers
85 views

Per pixel collision depth

I need to modify the code below to get the penetration depth from the per pixel collision and return it as a Vector2 to later apply it to the character position. ...
user avatar
  • 51
3 votes
1 answer
44 views

Spritebatch drawing the other way

I am drawing a rectangle using a emptytexture (1x1) and I use the following: ...
user avatar
2 votes
1 answer
180 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
137 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
69 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
237 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
3 votes
2 answers
359 views

Room Detection on a Tilemap

I am working on a 2D top-down game inspired by Prison Architect. What I just can't wrap my head around is recognizing rooms built by the player. The game is built on a tilemap, meaning the map is ...
user avatar
0 votes
0 answers
123 views

Making an enemy class for monogame c#

I have been given the task to create an enemy class as well as an enemy manager. I am completely confused as to how I will attempt this. these classes will be added into one group project with my ...
user avatar
0 votes
2 answers
1k views

How does ECS handle systems which need to know more about the environment of the entities it processes?

I'm trying to wrap my head around the concept of ECS (Entity Component System). I think I grasp the concept of the different parts, Entities, Components, and Systems. Entities: Basically just a ...
user avatar
  • 103
0 votes
2 answers
324 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
1 vote
1 answer
331 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
2 votes
0 answers
108 views

Are there any good techniques for reducing or smoothing stutter after a longer frame?

I've been using SDL2 with OpenGL to play around with some very basic game engine development. I'm running everything on a newer laptop with Linux and Intel integrated graphics. Regardless of whether ...
user avatar
  • 21
0 votes
0 answers
108 views

Fresh new MonoDevelopment install "assembly not found for framework .NET Framework 4.5"

I'm using Ubuntu 18.04.4 LTS and I went through the instructions on this page: https://www.monodevelop.com/download/ very specifically, (yes, I made sure to use the steps for the correct operating ...
user avatar
1 vote
1 answer
273 views

Calculating 3D character movement based on YAW and Pitch

I'm not sure how to calculate an XYZ immediately to my characters left based on the direction they are facing. I am learning to create a 3D game in Monogame on top of .Net Core 3.1 in c# using ...
user avatar
  • 113
0 votes
0 answers
226 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,317
2 votes
1 answer
227 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
1 vote
1 answer
69 views

Monogame pipeline couldn't load Xamarin.Mac

I Try to use my ContentProcessor, which I wrote on a Linux machine, on a Mac but it crashes with an unexpected failure. The Pipeline Tool gives me the following It seems to be a problem with the ...
user avatar
  • 91
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
2 3 4 5
16