Implementation of Microsoft's XNA 4 APIS for Android, iOS, MacOS and Linux.

learn more… | top users | synonyms

0
votes
0answers
11 views

Monogame - how to switch backend on Windows (VS2013 Express)

I'm using MonoGame with Visual Studio 2013 Express. I'd like to switch from SharpDX backend to OpenGL/OpenAL. How do I achieve that? People on the Internet usually say that they can switch backends ...
0
votes
1answer
18 views

Adding SpriteFont in Monogame

My question is probably something you guys have heard before - "How do you add SpriteFont's in Monogame's content manager?" The simple answer to this is, right click the 'Content' folder, go on 'Add ...
3
votes
0answers
14 views

Monogame [Linux] cannot resize screen

While working on a Monogame project on Linux (Arch to be exact), I found that I could not change the screen height away from the default 800 px, while I could easily, perfectly change the width to ...
0
votes
1answer
16 views

Saving Scores on iOS and Android devices using Monogame

Quick question. What is the best way to save a game score in a mobile device (iOS and Android) using Monogame (example game Flappy Bird score)? You can also list ways and approaches of saving scores ...
0
votes
0answers
11 views

MonoGame iOS .m4a song files load exception

On previous MonoGame iOS projects I have successfully loaded songs as raw .m4a files without using the content pipeline since .mp3 has a hefty license cost. A few days ago I updated to the latest ...
1
vote
1answer
28 views

How to detect when a moving rectangle (sprite) is tapped

I am new to Monogame. I am currently developing a simple game, just to learn some basics of Monogame development. The idea here is to detect whether or not the user has tapped on a a rectangle ...
0
votes
0answers
29 views

Monogame: Unsupported Landscape Screen Orientation on iOS 8.0

Did anyone have a fix on the landscape orientation problem that monogame has or is it the iOS 8.0 that has a bug? I have visited the github of monogame and tried to compile the latest developer ...
1
vote
1answer
42 views

Monogame on GitHub

I've been searching for hours but I cannot find "How to compile the latest monogame source code from github"? I have tried cloning the github project (develop) and ive been looking for the solution ...
0
votes
1answer
53 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. ...
1
vote
2answers
58 views

Better way to position objects in a Matrix/Grid shape

I am working on space a invader game and I'm trying to build levels such that in each of them, the aliens are positioned in a different shape. I have a rectangle shape, circle shape, and a grid-like ...
2
votes
1answer
40 views

Alternative Font loaders in Monogame Framework

While working on projects of mine, I have been finding that it is a huge pain to switch operating systems just to create a simple spritefont when using Monogame. I saw that the Nuclex Framework can ...
0
votes
0answers
19 views

TouchCollection positon not matching button position

I am using a TouchCollection of touchlocations to determine if a button has been pressed, However the touchlocation position does not correspond with the button location as I would expect, the touch ...
0
votes
1answer
26 views

Drawing in a static location when using a camara transform

I'm using a matrix transform to move a 2d camera in Monogame, and I was wondering: How, if I initiated my spritebatch with a matrix transform, can I draw something in a static (non-moving) position? ...
0
votes
0answers
81 views

C# Monogame & Farseer Physics: Collisions [closed]

I am a begginer. I am using Monogame and Farseer Physics Library in C#. (latest versions) In my game, whenever my ball (circle) hits the corner of a rectangle, (or even another circle), it is ...
0
votes
0answers
30 views

How set window position?

How set window position? Monogame version: https://www.nuget.org/packages/MonoGame.Binaries/3.2.2-alpha This dont work because OpenTKGameWindow is internal: ...
0
votes
1answer
62 views

Loading Song in MonoGame Windows

I cannot load the song into my game. I got error in both templates WindowsDX and WindowsGL. Monogame Develop Build 1252 Both files .wma and .xnb are exist in Content folder and Build Actions are sets ...
0
votes
0answers
26 views

Monogame. Xml files not included on deployment

We are making a XNA game and porting it with MonoGame. The game works fine on deployment, it finds without a hitch the xml files we need for the content. On publishing however, the files are never ...
1
vote
1answer
43 views

TypeLoadException when running a Monogame Windows Phone 8 game

Using Monogame, I'm trying to port a game to Windows Phone 8, but I'm having issues getting a basic example to run. When I create a basic Mono project and run it on my phone (to check everything's ...
1
vote
1answer
91 views

Monogame Windows Phone 8

I want to port a WP7 XNA game to WP8 using MonoGame. The thing is that I have Windows 7. So here's the questions (if some sound dumb, please bare with me). Do I need to have Windows 8? Do I need to ...
0
votes
1answer
128 views

How do I get the mouse coordinates relative to my whole scene with Monogame? [duplicate]

I am making a topdown isometric real time game using Monogame. I know how to get the mouse position for my camera view. How do I get the mouse coordinates relative to the entire scene? My game's ...
0
votes
1answer
55 views

Varying spritefont quality depending on string

I'm using Kleymissky font size 26 made via Nuclex font renderer (Hinting Method: AutoHinter) - download Why the thickness of the font drawn on screen depends on the string itself? What can I do to ...
2
votes
1answer
54 views

How can I tint a Texture2D with a gradient?

I am working on a lighting system for my game. Instead of lighting each tile completely with only one color, I want to create a gradient on that tile so to make the lighting look more dynamic and ...
1
vote
1answer
53 views

XNA Texture.GetData “Size of the data passed in is too large or too small for this resource.”

I am attempting to retrieve the color data for a given sprite located on a texture atlas by creating a new color and passing a source rectangle width and height for the given sprite. I am then passing ...
1
vote
1answer
56 views

How to handle input in Monogame

I've just switched over to MonoGame from XNA. Since MonoGame is supposed to have the same API (implying that any copied code should work as usual), I've run into a strange issue- input doesn't seem to ...
1
vote
1answer
53 views

Use of SpriteFonts without installing on host machine

I am working on a Windows game for my university project. In this project I am using a custom TrueType font which is not installed on any university computers. For submission my game is required to ...
1
vote
1answer
101 views

How to draw a diagonal fade-in and fade-out?

How to draw a diagonal fade-in/fade-out in 2D using MonoGame draw API? For a simple (non-directional) fade-in/out drawing the background with alpha variation do the tricks, but what is the standard ...
1
vote
1answer
55 views

RenderTarget2D moves with scene

I encountered a strange RenderTarget issue, in XNA/Monogame. I am currently updating my render target at every frame, just to test to see what is happening. When I move the camera around, the ...
0
votes
0answers
35 views

HLSL Shader Relative Positioning

I've got a shader that does the texturing, lighting, etc. for my game engine (written on top of MonoGame, in case that's relevant) for my block-terrain-based game (everything is rendered as triangles ...
1
vote
1answer
70 views

How to deform 2D tileable texture in XNA/MonoGame

I'm looking for a way to deform tillable texture in a 2D game I'm building using MonoGame but I'm not sure how this effect is called and searching the internet for "deforming textures" gives me mostly ...
3
votes
1answer
79 views

How do I edit a Texture2D at run-time to visually indicate connected tiles?

I'm making a 2D sandbox game in C# and MonoGame, and I have a couple of tile sprites. These tile are loaded in-game as Texture2Ds. I want to have blocks visually connect to adjacent blocks. An ...
2
votes
1answer
138 views

XNA/MonoGame/SharpDX: Pixel shader with sprite sheet

I've searched around for two days now on the internet but cannot find a solution. I've also read up on Pixel Shaders on MSDN with no luck. I'm trying to apply a simple pixel shader to a sprite batch ...
3
votes
1answer
96 views

Deploying MonoGame on Android

I've developed a game using MonoGame for Android (with Xamarin). When deploying to my Android device (via the Xamarin Studio IDE) it installs 3 apps - Monogame-Android-8-support, ...
0
votes
0answers
60 views

SetRenderTarget(null) clearing previous draw calls

I'm not sure if everything's working as it should be or whether I'm just not doing something properly, but I couldn't find anything that discussed this so I thought I'd ask here. I'm using Monogame ...
2
votes
2answers
231 views

Processing periodical operations on the database [duplicate]

I program MMO strategy game (C# monogame) like Goodgame Empire or Travian for Windows Phone. The server part of the game will run on Windows Server and MS SQL database. I'm trying to figure out a ...
1
vote
1answer
50 views

Trying to implement bounding box collision

I've been trying to do collision detection using the Intersects() function with two rectangles. I've got a player and multiple enemy's. When the player intersects with an enemy a bool var is set to ...
2
votes
1answer
286 views

Handling game-state updates in an MMO while the player is logged out

I have a plan to build MMO strategy game like Goodgame Empire or Travian for windows phone. I want program it in C# Monogame (because I have some good experiance with it). But I still can't figure ...
1
vote
1answer
146 views

MonoGame SharpDX Error 'The Parameter is Incorrect' when using graphics.DrawUserPrimitives [closed]

Below is a small section of code that is meant to draw a multicolored triangle to the middle of the screen in a MonoGame game. This uses the basic function DrawUserPrimitives to draw the triangle. ...
0
votes
2answers
73 views

HLSL Shadow Mapping occurs only around player

I've recently begun playing around with Monogame (OpenSource "remake" of XNA). My current task is to write a simple shadow mapping shader. After following Riemer's XNA Tutorial I got the shadows to ...
2
votes
2answers
101 views

Multi-colored text and kerning

Drawing multi-colored text or highlighted text in XNA/MonoGame is pretty annoying, and the standard way I've seen to do it is to just to make multiple SpriteBatch.DrawString calls, and place them ...
0
votes
2answers
100 views

Depth of overlap between circle and rectangle

I have a circle and a rectangle one of the two objects is moving the other is static. How can I prevent them from overlapping each other? For now there is only one thing that I don't know how to ...
1
vote
1answer
84 views

Inventory management syncronized network

I'm implementing an inventory system with items in 1x1 slots in a open-world multiplayer game. But I can't decide how I want to synchronize the item management with the server. I see two options here. ...
4
votes
1answer
124 views

How do I letterbox a C#/Monogame viewport within a resizeable window?

I am making a 2d game with xna/monogame. I want the main view area to always show 15x15 tiles, or 480x480px. I've got something that sort of works, following this guide. It expands the view range ...
2
votes
2answers
102 views

MonoGame - Get the 2D area of a 3D object

I'm writing a 2d game, but decided to make some 3d objects that my 2d character can pick up. I've got them displaying on the screen - but can't work out how to get the 2d area that the 3d object is ...
0
votes
1answer
167 views

Multiple tile drawing in monogame is slow

So I have this drawing function (which is by the way recomended as an solution here). It draws tiles on the whole window with no problem but my game slows down to ~30fps after maximizing it to ...
0
votes
1answer
121 views

How do you create a .XNB Font file for use with CocosSharp?

I know the .XNB file format is an XNA thing and that CocosSharp inherits this from its MonoGame roots. However there doesn't seem to be any information on how to create your own .XNB fonts to use with ...
0
votes
0answers
101 views

graphics.IsFullScreen resetting to false after game constructor and graphics.ApplyChanges()

This is a MonoGame 3.2 Windows (DirectX) Project. I've tried setting graphics.IsFullScreen to true in the game's constructor and in the game's initialize function, both times running ...
0
votes
1answer
219 views

How to have an event occur after x seconds?

I want a method to run after every 10 or 15 seconds. My timer is set to: timer = (double) gameTime.ElapsedGameTime.TotalSeconds; What would be the logic to check for every 10 or 15 seconds?
1
vote
1answer
55 views

How do I measure a string that will be drawn with SpriteBatch?

Is there a way to measure width and height of an ever-changing string (a player's score, specifically)?
0
votes
1answer
89 views

Find world matrix

I'm making my first 3D-game with XNA (MonoGame) and have come to a point where I wish to add a crosshair for the player. To do this I need the on-screen coordinates of the location where my fighter ...
0
votes
1answer
156 views

Save Texture2D to file in Monogame

I'm working on a tilesheet builder tool for my game to speed up tile creation, and I need to save a generated texture2D as a png. I've tried using the .SaveAsPng function but it isn't implemented in ...