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

learn more… | top users | synonyms

1
vote
5answers
85 views

Advice on how to store level design info?

I'm building a 2D tile-based puzzle game in C#, using Monogame. The game board is an 8x6 grid of tiles, each of which can contain a number of objects. Conveniently, the number of possibilities for ...
0
votes
0answers
27 views

Pass-through pixel shader not displaying properly

I'm new to shaders, HLSL and XNA in general. I'm trying to write a pass-through pixel shader but I'm experiencing some odd behaviour. I created a simple texture, shown below: Here's what I see when ...
0
votes
1answer
24 views

Problem disposing content from a screen's content manager

I have a problem with my game. I am using multiple classes for different screens, for exemple: Main Menu is one screen, When playing is another, and so on... I decided to use multiple ...
0
votes
0answers
25 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
55 views

Is Update called based on screens refresh rate? MonoGame

My game is running 60fps (Because I'm using a 60hz monitor) but if I would use a 85hz monitor it would be running 85fps. My question is if update is called based on the screens refresh rate or if its ...
1
vote
1answer
95 views

Vertex Color won't pass to HLSL shader to be rendered

I should start his question off by saying that i am a begginer in HLSL. I've borrowed some shader code for flat shading from a website i've long since lost. It's works brilliantly for textured models ...
1
vote
0answers
29 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 ...
3
votes
1answer
45 views

How can I make a scrollable text view?

I am trying to do an appication in monogame windows. I have a long text to be displayed on screen. I tried to render it on screen using spriteBatch.Drawstring, was succesful to an extent. But, the ...
2
votes
1answer
76 views

Change in direction should slow down object and accelerate in new heading

I'm trying to implement some sort of faux space physics in my 2D game. I have a top down view of my space ship. You can change direction and set a speed up to a maximum which then accelerates the ship ...
2
votes
1answer
36 views

Monogame - Not enough storage is available to complete this operation, on backgrounds

I am making a level selector, which works like a web slider. I am showing 12 levels per page, and I have a total number of 60, which means 5 pages of 12 levels. Each level has his on background ...
1
vote
1answer
39 views

Using Farseer Physics, how can I get objects to bounce at the correct angle

I am using the Farseer Physics engine in my MonoGame project. I have static walls which have "body" friction 0 and "body" restitution 1. I have dynamic objects, which are circles, with "body" friction ...
1
vote
1answer
36 views

Adding shadow and other effects on a spritefont Monogame

Is there a way that I can add shadow effect on text drawn in monogame? Because you cannot add shadow effect when creating a new spritefont file in Monogame Content Pipeline. Thanks.
0
votes
1answer
58 views

Monogame / XNA - Multple 2D Cameras (Rectangle) on screen

I recently started building a simple 2D roguelike game using Monogame 3.4. I was keen on building the game "engine" myself as I saw it as a fun learning curve. Monogame was pretty much the best option ...
1
vote
1answer
38 views

Rotation before scaling image/Lower resolution rotation? (XNA/C#)

Currently, when I rotate the image using SpriteBatch.Draw() the image is rotated after it is scaled. Resulting in: Which is using the code public override void Draw(GameTime gameTime) { ...
0
votes
0answers
39 views

How to get plausible platformer physics with Farseer on MonoGame/XNA?

I am creating a 2D Vectorial (made of polygons, not tiles !) platformer using MonoGame and Farseer Physics Engine. Everything works perfectly, except the movement of the character which doesn't feels ...
0
votes
1answer
50 views

Circle Depth Penetration

I'm resolving some collision between circles and I keep getting this problem. Note: The rectangles are perfect squares fitting the circles so when I type rect.Width I mean the radius of the circle. ...
1
vote
2answers
44 views

Best practice for scrollable viewport rendering

I am working on a tile based game that renders the playing surface in a viewport. I am struggling with getting my head around the mechanics and best practices of rendering a viewport, specifically a ...
0
votes
1answer
38 views

Enemy Follow Player Orthogonal Movement

I have a Enemy class that Seeks a player if he is in his field of view. Problem is i want the enemy only to move up/down/right/left, not like for example up and left at the same time (diagonal ...
0
votes
0answers
17 views

How to Dispose SharpDX resources?

I have made two different posts the last couple of days about we going from XNA to MonoGame and how the application increase in memory and no input from keyboard is detected after the first time it ...
0
votes
0answers
26 views

MonoGame disable spritefont anti-alising?

Ive got a pixel art font and when I draw it theres a lot of antialiasing going on which totally ruins the point of making the font pixel art? How can I disable this? My SamplerState is set to ...
1
vote
1answer
103 views

Keyboard.GetState() only work first time, and Memory increase (not Disposing) [closed]

EDIT UPDATE 3 I been searching the web for a solution and found several people struggling with Memoryleak using MonoGame while trying to dispose objects. It could be the case that MonoGame should be ...
3
votes
1answer
99 views

In MonoGame, how can I disable font anti-aliasing?

I am building a game with a "low resolution" aesthetic, so I would like to disable the default font anti-aliasing. The text is drawn using the built-in SpriteFont and SpriteBatch classes. Here is ...
1
vote
1answer
44 views

MonoGame deltaTime isn't the same in Draw function as in Update function

In the Update function gameTime.elapsedGameTime.TotalSeconds always gives me 0.01666666667 which is the deltaTime value for 60 FPS, no matter if the FPS is 30 it always shows me 0.01666666667 but the ...
-1
votes
1answer
89 views

How to optimize my movement & collision code?

I am trying to implement movement & collision the simplest way possible. public void MovePlayer() { KeyboardState keyState = Keyboard.GetState(); Vector2 checkVec = ...
1
vote
1answer
195 views

Word in different color in middle of string XNA

Is it possible to use different font colors for the same string, for example, when buying a weapon in CoD AW Exo Zombies: How do I do this? Thanks.
0
votes
1answer
89 views

AABB collision resolution issues

I'm trying to make a character collide with some tiled terrain. I have an issue with the collision resolution, and after days of shooting in the dark ant not finding any relevant help online, I'm no ...
3
votes
2answers
62 views

Managing cross-platform targets/compatibility with Monogame

I recently started using Monogame for the first time because of it's cross platform compatibilities and heavily active development. The first thing I did is installing the whole framework using their ...
1
vote
1answer
52 views

Black Rectangle instead of texture

I am trying to draw a textured ractangle like in this example. But instead of a texture the rectangle is just black. Draw method: protected override void Draw(GameTime gameTime) { ...
1
vote
0answers
64 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: ...
1
vote
0answers
71 views

How do I distribute MonoGame games in Windows?

I'm using VS2013 and MonoGame to create a simple game. The things is I can't make it run on others PCs. I've tried to copy Content to the Release folder using the "always copy" option in VS2013; ...
1
vote
1answer
41 views

User extendable content with Contentmanager

I developed a towerdefense game that uses xml-Files for almost everything, (creeps, levels, towers, upgrades). Those Xml-files define properties like textures, sounds and values like hitpoints. My ...
2
votes
0answers
66 views

Read custom content in MONO-GAME in a cross-platform way

using Mono-Game, i have some custom content files in some binary format (not .xnb) in run-time i need to read the content of those files. i prefer to get a stream, but if something will give me a ...
1
vote
1answer
28 views

6DOF camera: inverted yaw and roll when orientation changes

Whenever I change the orientation of the camera, yaw and roll become inverted (or correct); the strafing, movement and pitch do remain correct however. Can you tell what is causing this and how to ...
1
vote
0answers
61 views

How do I port a simple 2D Monogame to MacOSX

I have made a simple Windows Monogame project (using the DirectX template). What are the steps to port my game over to MacOSX? If I need to change my Monogame project so that it uses a OpenGL ...
1
vote
0answers
66 views

Monogame 3.3 SoundEffect play Freezes

After using Monogame 3.3 with Xamarin Android, SoundEffect.Play method freezes the game. I try to convert wav files 8bit mono, 16bit mono no changes. This error on Samsung T101 android 4.0.3 but ...
1
vote
0answers
97 views

tex2Dlod to limit max mip level to use for a texture (atlas)

I'm developing a 3D multitexturing terrain engine in C# on Monogame (XNA) plateform. I would like my engine works on Windows XP or upper, so on DirectX 9c minimum. Monogame allow me to build a DirectX ...
1
vote
1answer
51 views

XNA/MonoGame RenderTargets not working

I'm having a problem with drawing 2 RenderTargets to the screen. using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework; using ...
1
vote
2answers
97 views

How to draw to a surface, then draw that surface to the screen

i have a 2D MonoGame Game (using DirectX), that was originally an XNA game. It involves prerendered shadows (they are Texture2Ds drawn with SpriteBatch.draw). Right now the shadows are being drawn ...
2
votes
1answer
755 views

What is AABBvsAABB Collision detection?

Currently studying Game Engineering at university and my lecturer has asked us to implement a collision manager. He asks us to use AABBvsAABB to build it, so then we can add the physics. My question ...
1
vote
1answer
62 views

Monogame - stopping a custom shader (drawable game component) when inside another drawable game component [closed]

I have run into a bit of trouble when using a custom shader (gaussian effect) within another drawable game component, as I cant figure out how to break out of the draw method, so the effect is applied ...
0
votes
1answer
66 views

how to stop camera at the end of world map when zoomed in

Im building a tile-based game, and Im trying to implement zooming in on the center of the screen. My problem is, when I get to the edge of the map and im zoomed in, Im noticing that my camera doesn't ...
1
vote
1answer
98 views

FPS issue between computers results in slow down of animations and moving

I have been developing my game on two computers. I recently got a new computer and have noticed an issue that seems to be happening in my game. When computer 1 runs the game at 60 FPS everything ...
0
votes
0answers
95 views

MonoGame Shader - 2MGFX cant compile in SM4

am trying to compile three .fx custom shader files from a monogame sample project, i am tryting to get running for windows phone. The GaussianBlur.fx file is: // Pixel shader applies a one ...
0
votes
1answer
29 views

Question about segment of code in XNA [closed]

Basically when the code says public static Camera Instance { // Code and something with get statement } Is it declaring a method? I don't think it is a method because there is no parenthesis to ...
0
votes
1answer
396 views

How to get the MonoGame Templates working with Visual Studio C# 2013 Express?

I've been looking around forever, and I can't seem to find a way to install the MonoGame C# Templates for Visual Studio 2013 Express. These include things like "SpriteFont", etc. that pop up in the ...
1
vote
1answer
86 views

Overlapping Vertex in DynamicVertexBuffer draw priority?

I am creating a voxel game, and I have recently run into an issue. My world is drawn by a DynamicVertexBuffer, which just consists of vertices for the blocks themselves. On top of that, I switch ...
2
votes
3answers
339 views

MonoGame 3.3 Font loading

Is there any way to have fonts in game without making a separate Content Project and adding a .spritefont file in the new 3.3 Monogame? You can now load other resources directly from the Content ...
0
votes
1answer
73 views

MonoGame Point filtering movement appears Choppy/Jerky

When you move a sprite that is drawn using point filtering with a decimal number, example : 0.1 pixel or 100 * deltaTime (1.6) the movement appear choppy/jerky because it jumps from pixel to pixel. ...
1
vote
1answer
37 views

Problem restoring the game preffered buffer size after navigating from a XAML page. Monogame

I have implemented to my game a simple leaderboard and submit score pages, which are pages in XAML. I used PreferredBackBufferHeight/Width to set the buffer to be equaly on all devices, whether their ...
1
vote
1answer
46 views

Issue with rotating particle effects with DrawUserPrimitves

I am creating a voxel-like game in XNA/Monogame. I am trying to create particle effect of which I create by making a list that is populated every frame. My issue is here: I am using a WorldMatrix to ...