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

learn more… | top users | synonyms

1
vote
0answers
18 views

SoundEffect.Play and SoundEffectInstance.Play do not work

I am having issues playing a music file in MonoGame. The problem is, an old version worked fine, but I lost it to corruption. Basically, I create an instance, call instance.Play, and hear nothing. I ...
0
votes
2answers
33 views

Why does my MonoGame mesh throw an unhandled exception when trying to draw?

I am using the '3D Models' chapter of Learning XNA 4.0 to further understand 3D implementation in XNA, but I am running into an unhandled exception, when I try to draw each mesh. Here is my basic ...
0
votes
0answers
4 views

Monogame and winforms - drag and drop images

So I managed to create the form design of my level editor and I embedded Monogame in it using the GraphicsDevice sample. Then I used the PrimitiveBatch sample to draw a black grid 32x32 pixels. Here's ...
0
votes
0answers
21 views

XNA4\ Monogame 3d Collision detection Help please

i have been trying to get 3d collision working for a while and i think(hope) you people can help me so for my project i have created a 'sprite3d' kinda class which is called ModelEntity and there ...
1
vote
1answer
30 views

Monogame / XNA - Is there a limit when drawing at far position (> 1 billion ? = strange behavior)

So I'm making an "unlimited" 2D Tile-Engine with procedural generation (simple noise based) in Monogame, and I'm loading/unloading Chunck by Chunck as you go along. It's working pretty well now. ...
0
votes
1answer
25 views

Can I export a model and texture from a terrain file built in Unity3D?

I am mostly familiar with building my level maps within unity, and have become quite use to its inbuilt terrain creator, in both generating my terrain, and spraying a texture on to it. I am making a ...
1
vote
1answer
79 views

How to avoid lots of ugly math code and constants-hoarding?

In a lot of the games I've (tried) making in the past, I often run into the problem of the code getting really heavy on ugly mathematical code. This happens especially frequently in setting up ...
2
votes
0answers
38 views

Monogame Startup Memory Spike

I am currently porting a game from WP7 using XNA to WP8.1 using MonoGame. I have been putting considerable effort into optimizing my game to be under the 185MB memory limit for low-memory phones. I ...
0
votes
1answer
30 views

MonoGame - Left/Right Sided Collision Not Working

I'm working on a platformer as part of my course, the problem I have come across is Left/Right sided collision is not working very well. I already have bottom & top collision working. Here is an ...
0
votes
1answer
54 views

Monogame/XNA Making animations play once per click

I'm currently making a #gbjam entry and everything has been going smoothly up to this point. My issue being that I've implemented a shooting mechanic and along with it an animation to play as a shot ...
0
votes
1answer
47 views

Applying texture to a 3D object

I am trying to draw a 3D cube on the screen, using MonoGame. The cube was created in Blender and exported as an fbx file. The following is what the cube looks like in VS when opened in the editor: ...
0
votes
1answer
33 views

Sound Effects on Monogame delay

I have recently added some Sound Effects to my game, but the problem that I am dealing with now, is that they have for a half of second delay, or more sometimes. Also, if I press repeatedly on that ...
1
vote
4answers
63 views

MonoGame/XNA 3D fbx model produces strange rendering output

The Problem: I have been making a model of a Steampunk-themed street light in Blender for use in my MonoGame/XNA Game. To test it I exported it to the *.fbx file format using the fbx export plugin ...
4
votes
3answers
196 views

3D Object not drawing in Monogame

I'm quite new to working with 3D objects. I'm currently trying to get one to load in Monogame. The object itself was imported into Blender and exported as an fbx file (which was the only file type I ...
3
votes
2answers
202 views

How can I implement screen transitions like in the 2D Zelda games?

I want to implement a screen transition in the style of the 2D Legend of Zelda games (like this). That is, I'd the screen to remain static until the player moves to an exit, at which point the next ...
3
votes
1answer
180 views

Monogame fails to load Effect

I'm currently porting an old XNA game over to MonoGame and everything (including custom shaders) build fine. However when i try to load the xnb file using content.Load<Effect>("BaseDraw"); I ...
1
vote
5answers
123 views

Advice on how to store level design info? [closed]

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
1answer
51 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
31 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
1answer
37 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
66 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
105 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
32 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
63 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
2answers
105 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
41 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
51 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
45 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
66 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
2answers
48 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
57 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
52 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
46 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
41 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
18 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
33 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
105 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
129 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
50 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
92 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
203 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
104 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
70 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
55 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
86 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
112 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
44 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
72 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
67 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 ...