Questions tagged [monogame]

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

127 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
2answers
520 views

How to display unicode text in monogame?

I'm looking for ways to draw any characters that may be entered in any language, on any keyboard, so that I don't have any trouble with limited language support in a monogame project. So far I've ...
5
votes
2answers
751 views

Snake movement in monogame

Noobie here... I've started learning monogame development and currently working on a simple snake game. I'm having trouble with the snake's movement, I figured I could make it tile-based movement but ...
5
votes
2answers
411 views

Collision detection problem in XNA4/Monogame

I have been trying to get 3D collision detection working for a while and I think (hope) you people can help me. For my project I have created a 'sprite3d' kinda class which is called ...
5
votes
2answers
528 views

Touch taps only on very short flicks on Win7 with Monogame

I have an application on win7 which needs to support touch and mouse input using monogame. But reading touch taps proves to be a very hard thing. The TouchPanel is initialized like this: ...
3
votes
1answer
38 views

MonoGame: Music does not stop playing upon exit of game

I use MediaPlayer to play the background music. Sometimes, the music does not stop playing when I exit the game. This is even though I use the following code: ...
3
votes
0answers
104 views

Trying to get Vertexshader to work Monogame 2D

If I don't use the vertex shader, it gives me white textures which is what the default color is. Once I add the vertex shader, the screen is black. I figure it is something wrong with the Matrices I ...
3
votes
0answers
189 views

Viewport not matching Window size when fullscreen

I am using: GraphicsDevice.Viewport.Bounds to determine the size of the canvas / stage for my window. This works well if I am in Windowed mode, but if I launched ...
3
votes
0answers
111 views

Monogame resizing GraphicsDeviceControl in WindowsForms?

I'm currently working on a custom Map editor using Windows Forms. I have a class inheriting from GraphicsDeviceControl (called MapDisplay) that I'm using so that I may use spritebatch to draw the ...
3
votes
0answers
205 views

How to serialize an XNA Rectangle

I'm serializing a data structure to XML using the IntermediateSerializer class. This data structure has an XNA Rectangle in it. ...
3
votes
1answer
704 views

How to handle collision detection

So the way that I am doing the movement for my game is that you can left click a unit (which is just a rectangle object), and then it is selected. While it is selected, you can right click and that ...
2
votes
0answers
82 views

Camera that follows a target with sub-pixel movement

As the title says, I have a character that moves at sub pixel movement (no, I can't change this, because this sub pixel movement happens when I normalize the vector during diagonal movements, ...
2
votes
0answers
98 views

No collision with CompoundPolygon Monogame/Farseer

I want to create a body based on its texture. But the body I created just falls through the floor instead of colliding and resting on it. My Code: ...
2
votes
0answers
140 views

Mouse Interaction in 3D space (ray)

I use this code ...
2
votes
0answers
217 views

Multimonitor Support in MonoGame

How can I support multiple monitors in mono game ? As far as I know I can not override OnPreparingDeviceSettings and in ...
2
votes
0answers
97 views

Texture shader using model's texture

I'm trying to get a model rendered in monogame using a texture shader. I'm using the code from this tutorial project: http://kgiannakakis.github.io/MonoGameEffects/ I created a simple textured cube ...
2
votes
0answers
244 views

How does one integrate Game Center leaderboards in Monogame?

Do anyone know how to integrate a Game Center leaderboards for an iOS game using MonoGame framework? I have searched high and low yet I haven't gotten any luck of finding articles or tutorials that ...
2
votes
0answers
652 views

Monogame working with Krypton

I am trying to make a simple 2D game engine using Monogame and the Krypton 2.0 lighting engine. So far I have succeeded in rendering a light but I am unable to generate any shadows from any hull's. ...
2
votes
1answer
359 views

How to fix my camera collision, C# XNA

I am having some weird issues with my camera. I am trying to make it so it is a first person camera, that when the user presses the W or Up key, it moves towards where the camera is looking. My issue ...
2
votes
1answer
461 views

Supported Orientation, Monogame, Windows Phone 8

I am developing a game in which I need to rotate the screen on Landscape mode or Portrait, and lock it that way. In Monogame, targeting Windows Phone 8.1 adding this code: ...
2
votes
1answer
1k views

Xbox Controller Not Connecting in Monogame Project

I have recently been playing around with the support of the wired XBox 360 controller in Windows development. I am developing in C# in Visual Studio 2012. I have created 2 projects. The first (...
2
votes
1answer
1k views

Has anyone got the Krypton Lighting Engine working in MonoGame for Windows 8?

I've converted the core of the Krypton Lighting Engine so that it's compatible with Windows 8. The trouble I'm having when actually using it is that it can't load the ...
1
vote
1answer
42 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
0answers
18 views

Monogame - How to correct “brightness-additivity” while using Alpha-Blend-State

When using GraphicsDevice.BlendState = BlendState.AlphaBlend; in monogame following happens: Is there any avaible method to keep the color brightness ...
1
vote
1answer
48 views

Rendering colors from a texcoord output

I'm trying to implement a faster alternative to super-sampling for my isometric 2d monogame game (for when the view is zoomed out). The idea was that I would render the texture coordinates to the ...
1
vote
0answers
57 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
92 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 ...
1
vote
0answers
89 views

C# 2D game collision detection huge problem

I'm making my first game using C# and Monogame and I have a huge problem with collision detection. The entire code is in a link below: My game code So, I use Vector2 to keep position and dimensions ...
1
vote
1answer
85 views

Collision detection problem in monogame C#

...
1
vote
0answers
28 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
0answers
35 views

Load/generate new resources on start up in MonoGame

I've a question about loading resources at the beginning of my game written in MonoGame. I've several spritesheets which I'm loading at the beginning of the game. This take about 5-10 seconds on my ...
1
vote
0answers
23 views

Reflection shader (orginated from XNA 10 years ago) doesn't work - Model is just black?

can anyone help me with this one. I'm creating a 3D game. For my game, i have created a lot of 3D objects. Im everything works as intended so far, but I'm trying to implement a "Chrome Reflection" ...
1
vote
2answers
105 views

How should I be loading a player's content and its bullets content later in the game

I'm trying out Monogame because my course has a simple game programming class in it which is just going over basics. The final project will be using Monogame so I've been getting ahead and making my ...
1
vote
0answers
98 views

How to use Monogame (nez) pipeline extensions / importers on linux

I use Monogame together with the NEZ framework. NEZ proviedes some custom Content Processors. However I do not manage to get them working on Linux (works perfectly on Windows) as it seems like the ...
1
vote
0answers
63 views

Monogame Per Pixel Collision scale texture

I have a problem: I am learning the Per Pixel Collision, because I am very new to Monogame. Everything works thine, but my texture (image) is too big, so I scaled it down to 0.5f. Now it doesn't work ...
1
vote
1answer
131 views

2D Per Pixel Collision Detection using Animated Sprite

I am using MonoGame 3.6 and Visual Studio 2017. I have been trying to find a solution online to do per pixel collision detection using an animated sprite that I am drawing from a sprite sheet. Using ...
1
vote
0answers
46 views

Built in windows font wont load correctly in MonoGame

I am currently attempting to load this font in the MonoGame pipeline: I set the .spriteFont file to this: <?xml version="1.0" encoding="utf-8"?> ...
1
vote
0answers
36 views

Effective way of transferring data to HLSL shader in MonoGame and storing it

I'm toying around with HLSL shaders in monogame. Lets say I want to use a structure in my shader which is like this: ...
1
vote
0answers
23 views

MonoGame minimises when I click on second game window

I've problem with my MonoGame project. I have one full-screen game window and one window form with some info (part of the game too). And the problem lies in when I click on the window form, the main ...
1
vote
0answers
49 views

Export baked lightmaps from Unity to Monogame

I'm trying to bake lightmaps in Unity, export as textures and apply the textures in Monogame. Is this the right path to go? If so, how it should be done? Thank you.
1
vote
0answers
79 views

XNA / Monogame Camera flickering on collision

I have my camera follow my player and it works perfectly, I had some issues with collision and managed to get it working, but now my camera follows my player when it gets pushed back so the camera ...
1
vote
0answers
90 views

Changing Spritefont Sizes Without Anti-Aliasing in MonoGame

I'm using a custom font for a small game in MonoGame, and it is made on an 8x8 grid, so I have to scale it to make it bigger. Currently I am scaling the scale in the spriteBatch.Begin() method, but ...
1
vote
0answers
75 views

What is a good way to load and provide graphics to classes and subclasses in monogame?

First of all: I'm not sure if my question is worded well, I just can't think of any better way. I'm also a beginner both at Monogame and programming in general, so my question might miss the actual ...
1
vote
0answers
471 views

MonoGame - NoSuitableGraphicsDeviceException

I'm trying to create a cross-platform MonoGame project on Linux. However, the application fails to run - it throws a NoSuitableGraphicsDeviceException. I have no clue as to what causes this. Does it ...
1
vote
0answers
622 views

Monogame Orthographic Isometric camera

Some time ago decided to make an "2,5d" isometric strategy game. I decided ill go with a 3d engine with a locked orthographic camera for the benefit of easier collision detection, easier depth sorting ...
1
vote
0answers
83 views

Pixel-perfect collision appear to have random behaviour

So I was sitting with my programming teacher with this issue for about two hours and we couldn't figure out anything specific that could possibly be the issue. Therefore I'm taking some measures and I'...
1
vote
0answers
69 views

Weird Error Building TMX Maps

I'm getting an error while build a tmx map using MonoGame Extended (see picture). By the looks of it, the importer can't find the tileset, which is weird. In my Map.tmx file the source for the ...
1
vote
0answers
174 views

Stuck at tile seams using 2D collision

I'm making a little top down 2D dungeon crawler, and have pretty much fallen over at collision detection with my dungeon walls. I have figured out how to stop my player sprite at the walls, but I'm ...
1
vote
0answers
89 views

sprite jitter when max acceleration reached at camera

Camera seems making sprite jitter when max acceleration is reached : Thats my camera code : ...
1
vote
0answers
142 views

Monogame: Texture anti-aliasing result in transparent edges

This is a follow-up question on a previous issue I faced with a game I'm trying to make. It's in a 2D isometric perspective and the levels are created from individual tiles. A simple 3x3 map can be ...
1
vote
0answers
81 views

My Character objects are complex, how should I organize their structure?

I'm using Monogame to make a fighter. I have created an abstract Character class that has basic character functionality such as HP, meter, update boilerplate and such, and will be overridden as each ...