7,288 questions
Score of 1
0 answers
56 views
Clamp camera boundaries including zoom in Monogame
Hi there I am currently programming a 2D game with monogame and have a camera class which looks as follows:
class Camera
{
private Matrix transform;
private Vector2 centre;
private ...
Score of 1
0 answers
89 views
Issue on drawing object on top of moving platform
I'm developing a 2D game and I ran into a problem implementing the logic for a movable platform. These are the ones where the player stands on top of the platform, and the platforms move, and the ...
Score of 1
0 answers
116 views
Fake Road 3D Effect in C# Monogame
currently I'm trying to achieve a fake road 3D effect in monogame. I used this tutorial so far:
https://www.youtube.com/watch?v=xTyURl8qjZw
I successfully translated the first part where the road goes ...
Score of 0
0 answers
63 views
Slowdown in 2D tile based platformer
I'm trying to make a 2D tile based platformer in monogame. In fulscreen mode, when too many tiles are on screen the frame rate goes down and the game is moving slow. I don't know what causes these ...
Score of 0
1 answer
225 views
Game States in MonoGame
I'm a beginner to Monogame and I'm trying to find an efficient way to change game states. For example, when the player dies, the screen changes to the menu screen. When the player clicks a button, the ...
Score of 0
1 answer
125 views
MonoGame - trouble switching between scenes without creating useless windows
I'm solo working on a video game as a hobby and decided to give MonoGame a try. I'm a beginner so I'm not very knowledgeable. Everything works fine for now, except the game creating a totally useless ...
Score of 1
1 answer
134 views
Repeating portion of a Texture2D in a single SpriteBatch.Draw call
I have a large Texture2D with many sprites and I want to draw one of these sprites repeatedly. I'm currently making a for loop to do this and a trim logic to get the exact desired length and not only ...
Score of 1
1 answer
158 views
(XNA/MonoGame) Implementing the screen dragging camera movement
I'm making a strategy with top-down 2D graphics. I implemented the way to move the view by holding LMB and then "dragging" the screen. It works fine with the exception of the movement being ...
Score of 2
1 answer
132 views
Rotating a Camera in Microsoft XNA Framework (MonoGame)
I'm trying to create a First Person Controller in XNA (MonoGame). However, I'm unsure on how I can rotate my 3D Camera
I've been told to make a Rotation Matrix but I'm unsure on how I can implement ...
Score of 1
1 answer
72 views
XNA Dispose function causes visual error when switching render targets
Currently working on a game using XNA with MonoGame but have run into a visual error while trying to render the background where it'll appear above sprites when it should always appear behind.
The ...
Score of 0
1 answer
108 views
How can I fix the normals in this instanced lighting example? (Monogame/XNA)
The models in my game are instanced to reduce draw calls, which basically means I'm passing in a 4x4 transform as part of a custom vertex definition. I am trying to get basic lighting working but can'...
Score of 0
1 answer
337 views
Monogame : Which case would run faster? Texture2D.SetData()
I'm writing a Falling Sand Simulator and I'm trying to determine the best way to draw on the screen.
I noticed Texture2D.SetData is pretty slow but Im not sure what is making it slow.
I trying to ...
Score of 0
1 answer
135 views
How can I transform billboarded sprites into y-axis aligned billboarded sprites?
I'm looking at Shawn Hargreave's old xna tutorials about billboarding 2D sprites, and in the last example he shows how its possible to use spritebatch to draw all of the billboarded sprites within a ...
Score of 0
1 answer
235 views
Why is my .txt file not being read in my monogame game?
I am trying to read a highscore .txt file that is located in my debug folder for my monogame game. The directory is also there. I am using System.IO's read function to read the file and it keeps ...
Score of 0
2 answers
392 views
Is there a way to dynamically create a generic Texture2D?
I am currently developing an ECS within Monogame as a personal project and I want to set a default Sprite for my Sprite Components. However, I do not want to load in a file from the ContentManager, I ...