Questions tagged [monogame]

MonoGame is an OpenSource implementation of Microsoft's XNA 4 APIs that allows developers to build games that run on Android, iPhone, iPad, Mac OS, Linux, PlayStation Mobile (2D only), Windows 8 Store, Windows Phone 8, and OUYA, while reusing their existing XNA code that runs on Windows, Xbox 360, or Windows Phone 7. It supports both OpenGL and DirectX rendering.

MonoGame is an OpenSource implementation of Microsoft's XNA 4 APIs that allows developers to build games that run on Android, iPhone, iPad, Mac OS, Linux, PlayStation Mobile (2D only), Windows 8 Store, Windows Phone 8, Windows 10, and OUYA, while reusing their existing XNA code that runs on Windows, Xbox 360, or Windows Phone 7. It supports both OpenGL and DirectX rendering.

Recent versions of MonoGame includes a bundled content pipeline. This eliminates the need to use the XNA 4 Content Pipeline, which is not available for all platforms. The new MonoGame pipeline allows for management of assets completely independent of XNA.

Information:

Code:

Questions or Problems:

1862 questions
0
votes
0 answers

How to get Position of my clicked Object(XNA)

First of all we are in XNA/Monogame :) Hey guys, I have classes like DebugWindow, GameObject, Player(Child from GO),DebugItemSlot and my question is how to get the position of the gameobject that I just clicked? I already got a click Event so I just…
Juri.B
  • 28
  • 2
  • 9
0
votes
0 answers

Error while importing Farseer Physics Engine

When I import Farseer Physics Monogame to my project and add the dependency then I am getting this error as mentioned below. I would appreciate any help. Also is there any other Physics engine which is a better alternative and have well…
Gaurav A Dubey
  • 641
  • 1
  • 6
  • 19
0
votes
2 answers

Set shader's texture filter from C# in MonoGame

Say I have these two variables in my shader: HLSL texture ModelTexture; sampler2D TextureSampler And this is how I would set the texture: C# myEffect.Parameters["ModelTexture"].SetValue(woodTexture); What do about the sampler? There's no…
matt-pielat
  • 1,659
  • 3
  • 20
  • 33
0
votes
1 answer

MonoGame use types from the same project in XML

I'm working with MonoGame and I want to use XMLs to attach some metadata for some of my textures. I created the following class: public class TextureData { public float FrameWidth; public float FrameHeight; } And now I'm…
Ronen Ness
  • 9,923
  • 4
  • 33
  • 50
0
votes
1 answer

MonoGame thinks shorter file directories are longer

Whenever I try importing an FBX file into the MonoGame Pipeline, it tells me that my FBX has a file path that is too long. While I would normally shorten it, I've found that other resources have longer file names and import just fine. Here's the…
0
votes
1 answer

Spritebatch drawing in wrong position

Why is my sprite drawing to the top left corner when my wizardPos variable clearly puts it at the middle of the screen? //in load content wizardPos = new Vector2(graphics.PreferredBackBufferWidth /2, 700); wizardChar = new Characters.Wizard(this,…
D_Wagner
  • 87
  • 1
  • 1
  • 9
0
votes
1 answer

How to add a "Click Event" to a class? in C#

So this is how far I got. (not that much I know) but I have something like this: A class called "SplashScreen" private DynamicButton dynButton; public override void Init(ContentManager Content) { base.Init(Content); dynButton =…
Juri.B
  • 28
  • 2
  • 9
0
votes
1 answer

Can't use Monogame.Framework.Graphics

I'm porting my XNA game to Mono. I've installed the Monogame Windows NuGet package and ran the installer provided at monogame.net, but I still don't have access to the majority of the Monogame framework, like Monogame.Framework.Graphics, Vector2,…
GameKyuubi
  • 681
  • 1
  • 10
  • 25
0
votes
1 answer

Why does my mouse position not update when the left button is pressed?

I am using MonoGame 3.6.0.906 on MacOS. I am trying to get some mouse input code working, but I have found some strange behaviour. It appears that the mouse position does not update when the left button is pressed. This makes it impossible to…
sdgfsdh
  • 33,689
  • 26
  • 132
  • 245
0
votes
1 answer

Restarting a SpriteBatch with the same parameters it started with

Is it possible to receive a passed in SpriteBatch that already has had Begin() called, call End() on it because you want to change the RenderTarget, then call Begin() on it again with the same parameters that were passed in initially?
GameKyuubi
  • 681
  • 1
  • 10
  • 25
0
votes
1 answer

SpriteBatch draws to backbuffer instead of RenderTarget?

Here's a draw block: graphicsDevice.Clear(Color.CornFlowerBlue); spriteBatch.Begin(); graphicsDevice.SetRenderTarget(renderTarget); spriteBatch.Draw(texture2D, position,…
GameKyuubi
  • 681
  • 1
  • 10
  • 25
0
votes
0 answers

MonoGame Project Templates: "Windows 10 UAP" vs "Windows 10 Universal Project"?

I want to create a new monogame project for Windows 10 development. When I go to create the project, I see that there are two Windows 10 Project Templates: "Windows 10 UAP Project" and "Windows 10 Universal Project". Is one better than the other?…
Jared
  • 23
  • 5
0
votes
1 answer

Monogame UWP - Including a DLL library causes error

I'm creating a Monogame UWP Project and whenever I make a call to an included very basic compiled DLL .NET Core library within the project it throws the Error: Could not load file or assembly System.Runtime 4.1.0.0 Here is the project…
Langerz
  • 71
  • 1
  • 5
0
votes
1 answer

Drawing a circular magnifying lens showing scaled underlying content in XNA/Monogame (in 2D)

I have a 2D scene in Monogame with some primitives and sprites (i.e. in PrimitiveBatches and SpriteBatches) and I would like to create a magnifying glass effect with a circular lens showing a zoomed view of the content under it. How do I do…
Tamori
  • 97
  • 9
0
votes
0 answers

Monogame shader doesn't draw anything

I'm brand new to working with shaders and I'm trying to learn how to use them with Monogame. I've been reading a few tutorials online about them and I'm already running into problems. It may be that the tutorials are outdated? When I apply the…
bwoogie
  • 4,339
  • 12
  • 39
  • 72