Questions tagged [monogame]

MonoGame is an OpenSource implementation of Microsoft's XNA 4 APIs that allows developers to build games that run on Android, iPhone, iPad, Mac OS, Linux, PlayStation Mobile (2D only), Windows 8 Store, Windows Phone 8, and OUYA, while reusing their existing XNA code that runs on Windows, Xbox 360, or Windows Phone 7. It supports both OpenGL and DirectX rendering.

monogame
Filter by
Sorted by
Tagged with
0 votes
0 answers
76 views

Flickering cursor after resizing the window ( Monogame )

I implemented custom resizing to an app ( to fix the no rendering while resizing thing ), and sometimes after resizing the cursor starts flickering. The cursor is set this way: public enum ...
0 votes
1 answer
226 views

Unable to build project after new windows install

I recently bought a new computer. After getting everything setup, I installed visual studio community 2019 and gitkraken and cloned down my project(which was building and running fine prior to ...
-1 votes
3 answers
7k views

What is the value of gameTime.ElapsedGameTime.TotalSeconds? [closed]

I was wondering what is exactly the value of gameTime.ElapsedGameTime.TotalSeconds in a second?
0 votes
1 answer
51 views

Collision Detection, Player with tiles of the map

How do I to make a collision with a tile from the map with my player? Animation class: public class Animation { public float speed = 2.5f; protected string currentAnimatie; public ...
6 votes
2 answers
24k views

How to get display resolution (screen size)?

How to get display resolution in XNA/Monogame ? I tried these on my monitor (1600x900): The below give me 800,600 //1. GraphicsDevice.DisplayMode.Width GraphicsDevice.DisplayMode.Height //2. ...
0 votes
1 answer
1k views

Does Visual Studio for Mac 2019 not work with mono-game along with pipeline?

I'm starting to use MonoGame and use a MacOS Mojave. I downloaded version 3.7.1 from the official website along with the standalone pipeline(THOUGH I DOWNLOADED PIPELINE ONLY FOR ADDITIONAL TOOLS). ...
0 votes
1 answer
78 views

Monogame program keeps randomly dropping a ton of frames

I'm working with 3D graphics in Monogame and I'm creating 100 instances of a Rectangle class I made: using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace ...
9 votes
4 answers
22k views

Debugging in monogame

How do you print or output text in Monogame? I googled how to display text in monogame and was led to this: Debug.WriteLine Which says: "By default, the output is written to an instance of ...
0 votes
1 answer
168 views

How to Create a List of Vectors Using the Curve Class Traveling from A to B?

I'm trying to create a path for an object to travel by. I want the path to use a curve that goes upwards from the start(A) to then fall down to the bottom(B). Like this : I've looked at different ...
0 votes
1 answer
233 views

Problem installing monogame.extended package

I am having a problem installing monogame extended while running Install-Package MonoGame.Extended at nuget console. I get this error : unable to find package "Monogame.Extended" I am using visual ...
1 vote
5 answers
3k views

Monogame C# Timer (do something for 15 seconds every 3 seconds)

I am trying to create a timer, which, for example, every 3 seconds during eg 15 seconds will perform an action. I tried to use gameTime.ElapsedGameTime.TotalSeconds and loop, but unfortunately it ...
1 vote
1 answer
221 views

How to add a animation to a Player?

I'm currently making a shoot em up in monogame. I've managed to make a constantly looping animation with my sprite but the problem is that I now don't know how to insert my animated sprite to ...
0 votes
1 answer
269 views

How can I convert this Unity code to MonoGame code?

I don't know how to use PlayFab in a MonoGame project. I have read some PlayFab tutorials, but they are all for Unity and I think that it's not possible to use the Unity code samples with MonoGame, ...
0 votes
1 answer
406 views

How can I create a text box on iOS/Android and handle the input in MonoGame?

I want that people can create a new account in my MonoGame iOS and Android application. I need a text box for username, password and recovery e-mail address (if someone forgot his password). How can ...
0 votes
2 answers
471 views

Custom Default Effect in Monogame Content Pipeline

So I ended up writing my first HLSL Shader for MonoGame, and managed to somehow connect it to a Model I want to draw. So far so good. However the "somehow managed to do it code" is in my opinion ugly, ...
0 votes
1 answer
195 views

Get input from Android EditText without changing the content view

I am using Monogame and Xamarin to create a game for android. A major problem I face is accurately getting keyboard input from the soft keyboard. I am attempting to put text into an EditText and then ...
0 votes
2 answers
294 views

Mouse button keeps being pressed instead of clicking

I'm currently working on a game in monogame. The game is heavily based on clicking buttons and this is where the problem occurs. Whenever I hold down the left mouse button and then move it over a ...
0 votes
0 answers
369 views

How can I use a wrapper in my Visual Studio project?

I want to use this wrapper in MonoGame but I get an error message if I use the code from the wrapper website. Wrapper StatsIO I downloaded the wrapper project and added the project to my solution in ...
0 votes
1 answer
274 views

XNA images appear clippy/blurry?

this is somewhat of a simple question, but I have a pretty high-quality image sprite. However, when I load it into a SpriteBatch, it appears like this: When it should look like this: What is going ...
0 votes
1 answer
617 views

Writing Grid 2d array to file using XML in C#

I have got a huge 2d array which looks like Map grid = new int[,] { {1,1,1,1,1,1},{0,0,0,0,0,0},{2,2,2,2,2,2}}; i use it do describe a grid for a monogame project. I am creating a level editor for ...
1 vote
1 answer
422 views

How to scan all XNB files in Content Manager?

So I'm building a game with MonoGame in VS. I'm using the Content Pipeline from MonoGame (that generates XNB files). The thing is that my game is expansible (it is a rhytim game that user can ...
0 votes
2 answers
438 views

How to call a method from WindowsForms in Monogame?

Hi im currently working on a project. My main form is a form and whenever i click on a button the monogame program starts. This works. Now i made a method in the main form and i want to pass the bool ...
-2 votes
1 answer
550 views

How to read touch screen input on android

I'm trying to port a one-click game to Android, using monogame but as my first time doing this I'm struggling to figure out how I can read if the user has pressed the screen or not. I'm also unsure ...
0 votes
0 answers
2k views

How can I enable or disable push notifications in my Xamarin application?

I know that the user can enable or disable push notifications in the iOS/Android settings for my application. I have tried it with my application and it works. But my question is, would it be ...
2 votes
1 answer
1k views

XNA , Monogame ; Is there an alternative to XACT?

I'm making a game in XNA... I havent looked at monogame yet but I'm conscious that I probably will be looking at it in the future.. I havent implemented sounds in my game yet.. Atmosphere is very ...
4 votes
1 answer
6k views

MonoGame / XNA Draw Polygon in Spritebatch

i am currently writing a game with MonoGame and I need to draw textured shapes. I want to draw polygons with 4 corners. All my renderstuff is done with the spritebatch. I tried to use TriangleStripes, ...
1 vote
1 answer
269 views

Error when loading XML with MonoGame's Content Manager

I'm trying to try out GeonBit.UI and when I go to build the project the ContentManager gives me this error for every XML file: [PROJECT DIRECTORY]/Content/GeonBit.UI/themes/lowres/textures/...
0 votes
3 answers
341 views

Improper SpriteBatch Rotation

I'm trying to get a rotated Texture2D to properly fit within/fill the bounds of a rotated Polygon (my own class), but it refuses to work properly. The SpriteBatch method I am using is: spriteBatch....
1 vote
1 answer
925 views

Application Lifecycle for Xamarin.iOS

I'm porting a XNA game to iOS using MonoGame and VisualStudio for Mac. In the original source code I used PhoneApplicationService to manage the application lifecycle: PhoneApplicationService.Current....
1 vote
1 answer
4k views

MonoGame - Load JSON Through the content pipeline

I'm creating an RPG game and I need to load maps with Tiled. I have the Tiled part down (I'm using MonoGame.Extended). But I need extra data about the map. My plan is to use a JSON file that holds the ...
0 votes
1 answer
92 views

VisualStudio 2017 for Mac - iOS Simulator Starts but Does Not Run the App

I have a MonoGame application for iOS and I want to try it with the iPhone Simulator. When I run the application from Visual Studio for Mac 2017 (I've also tried Visual Studio for Mac 2019... but the ...
0 votes
1 answer
267 views

Why does my mouse position not update when the left button is pressed?

I am using MonoGame 3.6.0.906 on MacOS. I am trying to get some mouse input code working, but I have found some strange behaviour. It appears that the mouse position does not update when the left ...
1 vote
0 answers
285 views

How to understand Exponential Shadow Mapping in HLSL with Directional Light?

I've tried to understand how ESM is working - I have regular Shadow Mapping in Place (occluded/not occluded) in a deferred rendering pipeline and are trying to use ESM instead. I've tried to adapt ...
0 votes
0 answers
38 views

What Replaces Microsoft.Phone.Shell in Xamarin

I'm porting a XNA Game to iOS using VisualStudio for Mac and MonoGame... and I'm wondering what actually replaces Microsoft.Phone.Shell. I need to subscribe to the following events: ...
0 votes
1 answer
894 views

monogame sprite movement not smooth using delta

I am new to monogame and c# I was updating a sprite X for movement however is it not smooth, so i have tried using delta gametime, however it does not seem any better, I am making a noob mistake no ...
0 votes
2 answers
205 views

Issue getting txt file from folder not in the debug

I'm working on a Monogame game with a group of classmates and we ran into a problem. We're trying to load in a .txt file that is placed in the folder below our solution file which is located here in ...
0 votes
2 answers
1k views

Monogame: Render only inside specified area

This may be a strange question, but I'm trying to find a way to render sprites only inside a specific allowed area rather then the entire buffer/texture. Like so: Basically allowing me to draw to ...
1 vote
3 answers
671 views

Monogame C#: Assigning images to a 2D Array?

So I'm trying to create a grid using a 2D array, I need to assign images to each point of the 2D array but can't find a way with the knowledge I currently have. I have no issue creating the actual ...
2 votes
1 answer
609 views

C# - Monogame.Forms: Question about getting mouse coordinates

I'm having a problem getting the correct mouse position on the control when moving the camera around. The controler has 800px width and 600px height. Lets only look at drawing method: In here, the ...
0 votes
0 answers
370 views

System.Drawing on iOS

I'm trying to port a Windows Phone game written in C# using XNA to iOS with MonoGame. The game plays an animation using MJPEG (Motion Jpeg) and it uses class Image to process the frames. I've ...
1 vote
1 answer
646 views

How is KeyboardState.GetPressedKeys() organised?

I've looked around, does anyone know if KeyboardState.GetPressedKeys() (in Microsoft.Xna.Framework.Input) returns the keys in an organised collection (most recent first or last in the list) or some ...
0 votes
1 answer
3k views

FFmpeg.swr_convert: audio to raw 16 bit pcm, to be used with xna SoundEffect. Audio cuts out when i convert

I want to resample mkv(vp8/ogg) and also raw 4 bit adpcm to raw 16bit pcm byte[] to be loaded into SoundEffect from xna library. So I can play it out while I'm using other code to display the frames (...
1 vote
2 answers
361 views

Visual Studio App Center: The 'await' operator can only be used within an async method

I need help with App Center push notifications. I want to find out if the user has enabled or disabled push notifications on his iOS/Android device. This task should be done when the application ...
2 votes
1 answer
920 views

Monogame and HLSL - Point Light Shadow Mapping artifacts

I am making a game in Monogame. I am using a forward rendering and I've decided to write a shader that will callculate lightning using Blinn-phong shading model. I have implemented this model to work ...
0 votes
1 answer
351 views

How to check for tap in monogame?

I want to check that Rectangle was tapped. This mehod does the job and it works almost how I want: private bool CheckRectangleTouch(Rectangle target) { var touchCollection = TouchPanel.GetState();...
0 votes
1 answer
180 views

monogame.extended.entities no world in namespace`

VS 2017, monogame project, pulled in the MonoGame.Extended.Entities dependency. I went to the class browser and I don't see the world object. I can see it's apart of the code on github and should be ...
0 votes
1 answer
877 views

Can't access System.Console in Monogame app C#

I cloned a Monogame app which I am testing out. I have included using System; at the top of my file. Visual Studio shows that it's not being used. When I try to type Console.WriteLine(""); in my code, ...
0 votes
1 answer
188 views

XNA: unknown loading music error appeared

I'm currently going through a book which teaches XNA. I have followed all the instructions to add background music but for some reason I keep getting this error: An unhandled exception of type '...
0 votes
1 answer
361 views

XNA/Monogame 3D Stretching and Aspect Ratios

I'm trying to properly draw a few 3D models to the screen using a movable camera, but I'm encountering two problems. The first problem is immediately visible: the models are supposed to be cubes, but ...
0 votes
3 answers
871 views

Visual studio cannot start debugging - Monogame

Visual Studio 2013 Community Edition seems to be giving me the error: Picture of the error. Now, I am aware others have had this problem. Sites I have looked at that did not help: Cannot start ...

1
8 9
10
11 12
38