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

learn more… | top users | synonyms

0
votes
1answer
267 views

How can I support different resolutions with Monogame? [duplicate]

I want to support the following 4 resolutions in my Windows Phone 8 game: 480 × 800, 768 × 1280, 720 × 1280, 1080 x 1920. How can I do that with Monogame? If I draw a sprite with Monogame, the sprite ...
1
vote
2answers
156 views

How do I hide the console window for my released MonoGame game?

I am just finishing up my first game for the One Game A Month challenge which I wrote with the current MonoGame framework in Xamarin for Windows. I built the program in release mode, but running the ...
0
votes
3answers
190 views

How can I properly rotate a 2D vector in the “flipped” XNA client space?

In my 2d XNA game, because SpriteBatch treats world space as client space and has positive Y axis down and negative up, I've built my game's world space with that coordinate system too. However, I've ...
1
vote
3answers
540 views

How can I fix this error about loading .wav assets in MonoGame 3.2?

I'm trying to add a music file to my project, but I get the error "Could not load EpicScores.wav asset!" I load the music file like this: Song sound1 = ...
1
vote
2answers
498 views

2D AABBs and resolving multiple collisions

Okay, so this is a problem I've been trying to figure out for quite some time. Mine is a 2D platformer game with a world made up of (usually) immobile tiles and mobile sprites, both of which use AABBs ...
0
votes
0answers
55 views

Need Help with the Syntax for a Simple 3D Effect to Manipulate Quad Points/Vertices for PSM

I have been porting a game made in XNA, a 2D RPG, to PSM using Monogame. Unfortunately, I use a simple 3D effect that cannot be translated because Monogame did not write translation code for the ...
3
votes
2answers
537 views

Issue with Monogame resizing

I've converted my XNA project into a MonoGame one. Whenever I start the application and resize the game manually (ie - dragging the window)... this.Window.AllowUserResizing = true; ...the game ...
1
vote
0answers
129 views

Using obj file in an XNA game [closed]

Sorry if this is a bit novice but I am far more into engineering than game development but I just want to make a small 3D game for fun with XNA (well actually MonoGame). The thing is that I don't have ...
0
votes
0answers
103 views

Farseer for platformer - (Almost) constant velocity

I am building the prototype for a platformer and would like to use farseer physics engine. I got the feedback that it might not be a good idea to use physics engine, but I would like to have elements ...
1
vote
3answers
283 views

Code to generate a color gradient within a texture using a diagonal line

I want to generate a color gradient between two colors from x1,y1 to x2,y2. I'm unsure how to do this though. I can use Color.Lerp to get all of the color steps, but the problem is that I don't ...
1
vote
2answers
283 views

Anti-aliasing a sphere

I render everything in my game in 2D with SpriteBatch with the exception of a spherical entity (orb) that I render as a spinning and dynamically lit (custom effect) sphere in 3D. I capture the sphere ...
5
votes
4answers
2k views

How can I develop in MonoGame without relying on .xnb files?

I'm new to game development, and MonoGame seems like a beginner-friendly framework, so thought I'd start with that. However, as I started reading tutorials on it, I noticed a common theme: That at its ...
1
vote
1answer
240 views

Is setting the render target back to backbuffer supposed to take long?

I am creating a game in Monogame (XNA extension). I draw to a render target to display menu items for my game. Everything works fine, however... Whenever I set the render target back to the back ...
1
vote
1answer
111 views

Better way to handle ordering and visibility of renderable objects?

I'm just wondering whether there is a more effective way to handle the ordering and visibility of renderable components that fits into the design of my already existing engine. How I do it now: In ...
0
votes
1answer
205 views

What is the value of gameTime.ElapsedGameTime.TotalSeconds?

I was wondering what is exactly the value of gameTime.ElapsedGameTime.TotalSeconds in a second? Please explain it to me completely and as great as you can.
2
votes
1answer
228 views

What can I safely do with the MonoGame GraphicsDevice on multiple threads?

I'm working on a UI system that does it's processing on a separate thread. However, the results of this processing must end up on the GPU eventually. A simplified overview of the system boils down to ...
0
votes
0answers
405 views

Use opentk window handle to host wpf control - Monogame

well my boss asked me to try and get wpf controls rendered in Monogame. From what I understand this was easly doable in Xna, however in monogame it fails. Is there any way to make the window hadle ...
3
votes
1answer
397 views

Spritebatch Vertex shader world matrix change after each draw

I have a spritebatch where I draw some textures transformed in 3d space. The easy way was just Begin with the transformation matrix, draw, and end it right after. But that is silly, so I'm trying ...
1
vote
0answers
107 views

SpriteFont not found in Nuclex Framework

I am using MonoGame to port my XNA Windows Phone app to iPhone. All is well except that my fonts look distorted/smudged on the iPhone. Turns out this is due to the way that MonoGame builds the ...
1
vote
2answers
484 views

Get current window position with Monogame

I'm looking for some help figuring out the current position of the Monogame windowed form. My ultimate goal is to figure out when the user is clicking inside of the game window and where they're ...
0
votes
2answers
618 views

Where is MonoGame's API reference?

I wanted to pick up Monogame, but I can't find documentation. All I see on GitHub is some tutorials. I'm looking for class reference like this from XNA.
2
votes
2answers
1k views

How to work with delta time?

I've just started using MonoGame (which pretty much seems to be an open implementation of XNA) and I'm trying to figure out on how to work with framerate independant calculations. Usually what I found ...
1
vote
1answer
224 views

XNA Monogame GameState Management not deserilaizing

I am having some trouble serializing/deserializing in a little game I am doing to teach myself monogame. Basically, I am using the gamestatemnanagement resources common to monogame (screen manager ...
1
vote
1answer
542 views

MonoGame - when/how to save data

I am making a simple 2d game for WP in monogame/xna and am at a point where I want to save data. I have created a method to serialize the data (index, counter and percentage counter) to an isolated ...
5
votes
2answers
320 views

How can I optimize a parallax effect consisting of multiple transparent layers?

I have a parallax effect in MonoGame consisting of multiple semi-transparent layers of textures. The effect is simple, but rendering multiple transparent layers on top of each other is rather slow. ...
2
votes
2answers
239 views

Workaround for Texture2D.GetData

I’m converting a game from XNA to iOS with Monogame. In the code snippet below, smallDeform is a Texture2D on which I call the GetData method. smallDeform = ...
0
votes
3answers
376 views

Encode two integers into colour values and compare them in a HLSL shader

I am writing a 2D point and click adventure game in Monogame, and I'd like to be able to create an image mask for every room which defines which parts of the background a character can walk behind, ...
0
votes
1answer
145 views

Programming and drawing to deal with different screen sizes and resolutions

I started making an XNA game years ago and picked it up recently. I'm looking later to convert it to use Monogame so that it can be deployed on various mobile devices and OS, though I have a sinking ...
0
votes
0answers
93 views

Create random level platforms on screen

I'm trying to create random level platforms like this: public Level(int platfromsInLevel, Texture2D sprite, int screenWidth) { rnd = new Random(); this.screenWidth = screenWidth; ...
3
votes
1answer
267 views

Is multipass rendering possible with SpriteBatch?

I'm trying to implement a bloom effect. This requires three shader passes: a brightness threshold, a horizontal blur, and a vertical blur. It also requires resizes, but these are irrelevant to the ...
1
vote
1answer
599 views

Drawing sprites to a permanent Texture2d using Monogame / XNA

I'm working with Monogame to do a 2d sprite engine. I've gotten it work pretty well where I can move lots of sprites around the screen with the effects and positions that I want. Last night I tried ...
1
vote
0answers
246 views

Monogame is not using GPU? [closed]

I have the following code in Draw loop: for (int i = 0; i < 512; i++) { for (int j = 0; j < 512; j++) { spriteBatch.Draw(Textures.Grass, ...
1
vote
1answer
250 views

Why isn't this UIButton visible in Xamarin.iOS?

I'm trying to implement buttons into my game. I noticed iOS has the UIButton class, which I tried, but upon drawing it nothing is shown. The asset image is properly loaded, I've checked this. The ...
0
votes
0answers
71 views

DispatcherTimer throws UnauthorizedAccessException

I am currently porting my XNA project to MonoGame. When running the XNA Project, there are no errors with DispatcherTimers. But in the current MonoGame port, initializing a DispatcherTimer throws the ...
2
votes
1answer
174 views

XNA calculate normals for linesegment

I am quite new to 3D graphical programming and thus far only understand that normal somehow define the direction in which a vertex faces and therefore the direction in which light is reflected. I have ...
1
vote
2answers
175 views

Input of mouseclick not always registered in XNA Update method

I have a problem that not all inputs of my mouse events seem to be registered. The update logic is checking a 2 dimensional array of 10x10 . It's logic for a jewel matching game. So when i switch my ...
0
votes
0answers
204 views

Best way to go about sorting 2D sprites in a “RPG Maker” styled RPG

I am trying to come up with the best way to create overlapping sprites without having any issues. I was thinking of having a SortedDictionary and setting the Entity's key to it's Y position relative ...
2
votes
1answer
422 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 ...
0
votes
1answer
180 views

C# Collision Math Help

I am making my own collision detection in MonoGame. I have a PolyLine class That has a property to return the normal of that PolyLine instance. I have a ConvexPolySprite class that has a List ...
0
votes
1answer
88 views

IOS monogame 17 seconds debug timeout

I'm trying to debug a monogame application using xamarin studio and breakpoint. Is it possible to disable the 17 seconds timeout on the FinishedLaunching function?
-1
votes
1answer
1k views

How do I make a health bar that drains when the player takes damage? C#/XNA

I've drawn a Health Bar before and had it drain/refill on a button press using if statements and rectangles. First I loaded the image, then I set a new rectangle to be equal to the image's height and ...
1
vote
1answer
322 views

XNA - Where should I start playing a song?

I am just wondering where is the best place to start playing the background song for a game. In the loadContent() method, Draw(), or Update() methods or when I initialize it? I am trying to make it ...
0
votes
1answer
647 views

Loading sound file into monogame

I'm trying to load sound into my game. I downloaded an .mp3 sound (a second long) and tried to load it both as Song and as SoundEffect, but it didn't work, so I tried loading the same sound but as ...
1
vote
2answers
135 views

XNA Calculate two points of triangle with given Z

I want to calculate the two points of a 3D triangle that have a specified Z coordinate. I guess the way to do this would be to somehow create a plane which is perfectly flat with my given Z coordinate ...
0
votes
0answers
59 views

XNA inverted matrix acting strange

First of all, I am trying to calculate the two points of a triangle that have a given z position. I have figured out what I think to be quite a good method. First of all I move the triangle to be ...
0
votes
1answer
153 views

Port a WP7 game to WP8 with Monogame

I have a full working game for WP7, I want to port it to WP8 with Monogame. I have installed Monogame and I have done all tests to see that it is working inside Visual Studio Express 2012 for Windows ...
4
votes
1answer
173 views

GetData() error creating framebuffer [closed]

I'm currently porting a game written in C# with XNA library to Android with Monogame. I have a Texture2D and i'm trying to get an array of uint in this way: Texture2d textureDeform = ...
0
votes
1answer
254 views

MonoGame crash trying to load font from .xnb file

My MonoGame project uses a pre-compiled .xnb file to load a sprite font, and it works fine on Windows XP. The .xnb file is marked as content and copied to the output directory. I've copied the ...
11
votes
4answers
1k views

Monogame minimum hardware requirements?

What are the minimum hardware / driver requirements for running a Monogame 3.x game, on each of the various Operating Systems?
7
votes
3answers
714 views

Reusable top-down collision class

I've recently picked up monogame and am working on a simple top down game to get me started and learn the basics. I've got the movement and the rotation to follow the mouse sorted out but I'm stuck ...