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

How does Monogame achieve a target FPS?

So in monogame, in your Game1 class you can write something like this: ...
DrZ214's user avatar
  • 338
0 votes
1 answer
33 views

How to correctly position a set of cuboids based on a direction property in MonoGame

I am trying to create a map for my game using a list of cuboid sections that are defined like this: ...
Maxim Gershkovich's user avatar
0 votes
1 answer
39 views

Is there a simple way to find where our code is keeping references to disposed/pooled objects?

In our c# game we use object pools to store sprites once the Dispose() method gets called.Then when the Sprite.Create method gets called if a sprite is in the pool it gets depooled, cleared and ...
Matteo's user avatar
  • 15
0 votes
0 answers
108 views

How to make 3D particles in Monogame?

I have made a 2D game and right now I am converting it to a 3D game. All fine so far, only for the particles I had used the particles library from monogame extended but this library only supports 2D ...
codymanix's user avatar
  • 364
0 votes
1 answer
228 views

Drawing Sprites and Primitives with layers in MonoGame

I'm writing my own 2D engine using MonoGame and I want to be able to draw 2D primitives (using DrawPrimitives) along with sprites using SpriteBatch. But when I draw them, the primitives are always ...
DragonSpecter's user avatar
0 votes
1 answer
178 views

Problems with rotating Child Objects

I'm writing a Transform script for a Monogame project and I'm trying for a few days now to fix the Rotate method of this script, but without success. Currently, the Parent transform only rotates ...
NOrlYNcE's user avatar
1 vote
1 answer
146 views

D3D11 ERROR ("invalid arguments") from HLSL shader

I am using MonoGame 3.8.1.303 with Windows/DirectX. I am just rendering a TriangleList using DrawIndexedPrimitives, but I am ...
codymanix's user avatar
  • 364
0 votes
1 answer
59 views

correct matrix to draw mesh as flat object

I need to draw a tilemap for a 2d game. For that I created vertices with their relative positions already hard baked. The coordinates start top-left with (0f, 0f) and z is always 0. I rendered them to ...
codymanix's user avatar
  • 364
0 votes
1 answer
108 views

Monogame - When to reuse buffers?

So - how do these work exactly? Right now I am making a buffer and setting the data every frame for my object, but I heard you can reuse the buffer, too. If the object is not changing in any way ...
Lukas Kawalec's user avatar
0 votes
1 answer
128 views

How to modify single-scene ECS setup to support multiple local players in different scenes?

I'm currently developing a game in Monogame / C#. I have the underlying game engine set up in the following way: Entity/Component/System architecture A Scene includes a map, cameras, and a list of ...
Rich. T.'s user avatar
0 votes
1 answer
156 views

Apply bloom effect to RenderTarget without affecting UI

I'm currently rendering my whole game to a RenderTarget in order to stretch the scene to any resolution. I also have a bloom effect rendered with the scene. I'm now ...
Syll's user avatar
  • 11
0 votes
1 answer
232 views

Drawing Textured Quads

I've been starting to write some XNA / Monogame code lately, and wanted to draw a quad with a Texture2D attached to it. After searching the internet for a while, I've come up with this render code: <...
Mickey's user avatar
  • 1
0 votes
1 answer
40 views

Rotate and Zoom a group of tiles

I'm working on a tile-based game and I'm trying to rotate my tiles as a group around the center of the screen and want to have the ability to zoom in and out. Here my code: ...
Canox's user avatar
  • 103
0 votes
0 answers
152 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 ...
ajrao's user avatar
  • 1
0 votes
1 answer
55 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 ...
web_dev_beginner's user avatar
1 vote
2 answers
498 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 ...
Bent's user avatar
  • 23
1 vote
1 answer
118 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 ...
Gabriel Ozzy's user avatar
1 vote
1 answer
66 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: ...
Lukas Kawalec's user avatar
3 votes
1 answer
149 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 ...
sboutin4's user avatar
0 votes
1 answer
3k 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 ...
atrefeu's user avatar
  • 103
1 vote
1 answer
242 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 ...
Emobe's user avatar
  • 11
0 votes
1 answer
97 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 '...
Dominicentek Gaming's user avatar
2 votes
1 answer
249 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: ...
gamer1's user avatar
  • 65
1 vote
1 answer
104 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 ...
TanguyB's user avatar
  • 161
0 votes
0 answers
142 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 ...
gamer1's user avatar
  • 65
0 votes
1 answer
1k 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' ...
DubstepZedd's user avatar
1 vote
0 answers
96 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 ...
x L u M i x's user avatar
0 votes
2 answers
149 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 ...
ECMiraldo's user avatar
0 votes
1 answer
119 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 ...
LoukasPap's user avatar
  • 103
0 votes
1 answer
239 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 ...
MysteriousFruit's user avatar
0 votes
1 answer
99 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 ...
Beanicles's user avatar
1 vote
2 answers
122 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 ...
Bill Sambrone's user avatar
0 votes
1 answer
167 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 ...
jriley's user avatar
  • 1
0 votes
3 answers
163 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?
LionCatDev Studio's user avatar
0 votes
0 answers
58 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 ...
Fábio Pires's user avatar
1 vote
0 answers
146 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: ...
Pooper's user avatar
  • 13
0 votes
0 answers
65 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 ...
yasko kai's user avatar
0 votes
1 answer
47 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 ...
LaoR's user avatar
  • 101
1 vote
2 answers
268 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 ...
ibrahim topçu's user avatar
0 votes
1 answer
1k 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 "...
Sankhayan Bhattacharjee's user avatar
0 votes
1 answer
357 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 ...
Sankhayan Bhattacharjee's user avatar
0 votes
0 answers
92 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 ...
Sankhayan Bhattacharjee's user avatar
0 votes
1 answer
69 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 ...
Louis BERTRAND's user avatar
0 votes
0 answers
120 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. ...
RickS.'s user avatar
  • 51
3 votes
1 answer
47 views

Spritebatch drawing the other way

I am drawing a rectangle using a emptytexture (1x1) and I use the following: ...
Alanus Ger's user avatar
2 votes
1 answer
307 views

Getting Rendered Sprite Size

I need the rendered dimensions of a sprite, I'm calling Draw in the class below: ...
mxmissile's user avatar
  • 131
2 votes
1 answer
145 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 ...
TheCo's user avatar
  • 21
0 votes
1 answer
85 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 ...
Louis BERTRAND's user avatar
0 votes
0 answers
434 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 ...
Louis BERTRAND's user avatar
3 votes
2 answers
612 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 ...
Schwefelhexa's user avatar

1
2 3 4 5
16