0
votes
0answers
26 views

MonoGame hosted in a control/form

I would very much like to host my monogame window inside a Form so that I can take advantage of the nice gui elements in the C# framework when creating a simple level editor. I have looked online, but ...
0
votes
1answer
32 views

Is there a build-in function to count the amount of sprites drawn by SpriteBatch per frame?

I'm hoping to find out how many sprites are on the screen at any given time. In other words, is it possible to find out how many times spriteBatch.Draw(); is called between spriteBatch.Begin(); and ...
1
vote
0answers
30 views

Monogame render between constraints

I have, in MonoGame, a project for which I require the game to not use the full screen depending on the resolution. The game elements etc all behave as they should (So they bounce off for example ...
1
vote
1answer
92 views

Loading a stream/asset on Android MonoGame without ContentManager

In the game I am developing, I have created a serializable class that generates a .map file for saving and loading levels. In XNA, this works great using the following code: FileStream fileStream = ...
0
votes
0answers
101 views

Zelda-style Top-down RPG. Storing data for each tile type

I'm creating a Zelda-style RPG using Tiled, C#, and MonoGame. When my code parses the .tmx file, it will get a number to associate with each tile type based off of their position in the tile sheet. If ...
0
votes
0answers
52 views

How can I port a MonoGame Windows Phone 8 game to iOS?

I downloaded the trial version of Xamarin Studio and installed it on my iMac. In addition, I installed Xcode on my iMac so that I can use the iPhone emulators in Xamarin Studio. But I don't know how ...
2
votes
1answer
58 views

MonoGame not all letters being drawn with DrawString

I'm currently making a dynamic user interface for my game and are setting up having text on my buttons. I'm having an odd issue where, when i use a specific piece of code to determine the text ...
1
vote
2answers
80 views

How can I use voice commands to control my game?

Is it possible to use simple voice commands like "run right", "run left", "jump", "stop", "attack", "defend", "finish" to control the player in a Windows Phone 8 game? How can I implement voice ...
2
votes
2answers
350 views

Zelda-style top-down RPG. How to store tile and collision data?

I'm looking to build a Zelda: LTTP style top-down RPG. I've read a lot on the subject and am currently going back and forth on a few solutions. I'm using C#, MonoGame, and Tiled. For my tile maps, ...
1
vote
1answer
70 views

How can I scale Farseer bodies so that they work on different screen resolutions?

I created a little Windows Phone 8 game that supports multiple resolutions. If the resolution of the device is less than 720p, then the sprites and their corresponding Farseer bodies need to be scaled ...
2
votes
1answer
104 views

Does every Windows Phone 8 device have one of a fixed set of resolutions?

Does every Windows Phone have one of the following 4 resolutions? 800x480, 1280x768, 1280x720, 1920x1080 pixels Or is it possible that some devices only have a resolution of 1280x719 or 1279x720 ...
1
vote
0answers
50 views

How can I detect the screen resolution of a Windows Phone device?

I want to detect if a device uses WVGA, WXGA, 720p or 1080p resolution. In addition, I want to store the resolution of the device in a variable. For example, if the resolution is 800x480 pixel, then ...
3
votes
1answer
89 views

Obfuscating Monogame assets

I'm obfuscating spritesheets. I've already encrypted the .txt file dictionaries. Now I'd like to perform binary serialization on the image files. Texture2D does not allow for this though, probably ...
1
vote
1answer
298 views

How can I create a resizeable 2D camera with parallax scrolling?

I want to create a Windows Phone jump-and-run game with parallax scrolling. The character should always be in centered in the viewport. I use the following camera so that the viewport looks on every ...
3
votes
1answer
106 views

How should I draw the GUI if I use a 2D camera?

I have a camera in my 2D side scrolling game and I want to implement the GUI. How can I do that? For the moment, I draw everything like this: spriteBatch.Begin(SpriteSortMode.Deferred, ...
2
votes
0answers
143 views

Controlled rotation on 3D object with mouse movement

I've a scene with a cube that I can rotate around yaw, pitch and roll. I do this by click the circles and drag the mouse on x/y-axis. I want similar functionality as the Unity rotation tool in editor ...
1
vote
1answer
101 views

MonoGame ArgumentNullException in Spritebatch.End()

I switched my Project from XNA 4 to MonoGame 2.5.1. The port went somewhat unproblematic but I am stumpled across a problem i can't resolve. For your interest, the code worked on XNA: When I am ...
3
votes
1answer
70 views

Why is my cursor not working if I add a scaling matrix?

After moving the camera to any direction, my cursor isn't getting drawn on the correct position. For example: I move my camera to the right, after that I click on the screen, but the cursor isn't ...
2
votes
1answer
111 views

2D physics rotation w/ XNA

I'm creating a simple game with space ships made of blocks that are all the same size. After having looked at this: Calculating the rotational force of a 2D sprite I have created the following code ...
1
vote
1answer
124 views

How can I use a camera matrix with different resolutions?

I created a little jump'n'run game. The character(Mario) is always the center of the viewport. The game is running correctly if I use the resolution 800x480 pixel. But when I use another ...
1
vote
0answers
146 views

How can I use custom shaders in Monogame?

I wrote a shader in XNA and I want to use it in a Monogame Windows Phone 8 project. I converted my Effect1.fx file to Effect1.mgfxo. But the program doesn't work correctly. The screen of my emulator ...
1
vote
0answers
105 views

Could not load sound (MonoGame) [closed]

I am using the Window Project (in MonoGame 3.2) which is uisng DirectX instead OpenGL. If I run a game, so its show me: "Could not load wind asset as a non-content file" I think, that is no ...
0
votes
0answers
67 views

Matrix Translate Camera has some sort of spiky movement

public class Camera2D { private Vector2 _position; protected float _viewportHeight; protected float _viewportWidth; public Vector2 ScreenCenter; protected Being _unit; // the sprite camera is ...
1
vote
2answers
98 views

MonoGame - 2x2 texture scaling issue

I've just recently switched from XNA to MonoGame and now I've run into something that has never happened to me in XNA before. I've created a 2x2 texture and filled it with a color by doing this: ...
0
votes
1answer
127 views

How can I scroll my tile maps?

I've been trying to understand how I can use matrix to implement a smooth tile scrolling system but I fail miserably. So I have a pretty big world stored in a multi-dimensional array which is ...
1
vote
2answers
176 views

Adding 'xna content project' reference to monogame project(visual studio 2013 pro)?

I want to add reference to an xna content project. Which should be like the content project reference we have in an xna windows game. I am on visual studio 2013. I got the xna extensions to work by ...
2
votes
2answers
119 views

XNA: Non-overlapping shadows

I want to create an effect similar to the following in XNA / MonoGame: There's a background and a semi-transparent shadow consisting of several objects (two circles in this example). However, the ...
1
vote
1answer
102 views

Scale adaption based on distance to object

I have situation illustrated on image above, name displayed over the player. Text is rendered as 3d rectangle and rotated to face camera as billboard. (I am using this article ...
0
votes
1answer
249 views

Monogame: Why is my sprite looking the same on every resolution?

I want that my sprite(Mario) don't look the same on every Windows Phone resolution. If I use this code, the sprite is on every resolution on the right position but it also has the same size on every ...
-1
votes
1answer
119 views

Why are the coordinates interchanged in Monogame?

If I use XNA Gamestudio, I can draw a sprite on a specific position like this: spriteBatch.Draw(Texture2D, new Vector2(PositionX, PositionY), Color.White); But in Monogame, I must change the ...
0
votes
1answer
151 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
269 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 ...
2
votes
1answer
301 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
3answers
220 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
1answer
98 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
0answers
301 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 ...
1
vote
0answers
84 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 ...
0
votes
2answers
303 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
420 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.
1
vote
1answer
190 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
370 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 ...
2
votes
2answers
169 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
0answers
84 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; ...
1
vote
1answer
402 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
212 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
153 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 ...
2
votes
1answer
102 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
votes
1answer
743 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
226 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
0answers
106 views

Monogame Font Problems in Windows Metro

Last week, I decided to see if I could develop a Windows 8 game for Metro using Monogame. I got the app to load, run and quit properly, but I cannot get fonts to render no matter what I try. When I ...