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
6 views

XNA/MonoGame screen scale and keeping aspect

My aim is to make a simple 2D platformer, the idea is that it will be a base resolution of 480x270 (16:9) which can scale x2, x4(1920x1080) or go full screen. I basically do: ...
0
votes
0answers
13 views

Resolution-Independent Rendering squishes view field

For the last couple of days, I've been trying to get a resolution-independent renderer going on an XNA game. I have a camera and a renderer class that I added, based on this tutorial Here's the ...
0
votes
0answers
26 views

How to silence the Windows Asterisk sound?

When pressing keys while my game is running, Windows makes the "Asterisk" or "Exclamation" sound that you hear while trying to use the keyboard on a window that doesn't have focus on an input control. ...
0
votes
1answer
62 views

How to combat exponential growth in sprite messaging?

In my 2D platformer game, I have a number of sprites moving around the world. When two sprites collide with each other, I calculate how deep the collision is and then call a virtual method on both ...
0
votes
0answers
78 views

I want to sell my game ideas [closed]

I have multiple ideas for video games that will alter today's thinking, and i want to sell my ideas. Or in better approach i would like to partner up with a company and make my vision a reality. How ...
0
votes
0answers
19 views

Stack, list or array for screen/state management. (XNA/MonoGame) [closed]

I am wondering the best approach to manage game state in monogame. My first thought is have a screen class and keep them in a collection with either isFocused properties or use like a stack and the ...
0
votes
0answers
19 views

Mobile game development [closed]

I am new here and dont know much. I would like some advice, from experienced people, about where to begin to start developing mobile games, like which languages to learn, books, resources etc. I am a ...
0
votes
0answers
20 views

Mesh Collider in Monogame

I try to implement a few complex objects and want to achieve that they collide based on everything the player is able to see. Therefore I am not able to use the basic BoundingSpheres. Has anybody an ...
1
vote
2answers
78 views

Get the difference between 2 matrices

Hi I'm using C# and MonoGame, and have the world matrices of 2 objects. I need to get the difference between them, so I can effectively parent the second object onto the first. The aim is to get to a ...
0
votes
1answer
28 views

Don't understand how paddle location is tracked; using XNA tutorial

Wanting to learn how to make games, decided to use Monogame. Have pretty light programming knowledge, so I apologize beforehand for my ignorance to this surely obvious oversight. Following a ...
1
vote
1answer
48 views

Rendering issues in Monogame when using shaders

I am currently fiddling with Monogame, trying to work with Shaders and I have encountered a really weird issue. If the first ever draw in the application's lifetime is with a custom shader all further ...
0
votes
0answers
20 views

HLSL texture not reading from register S1

I made a simple post processing shader, that draws scanlines. This all works perfectly. I wanted to make it a bit more interesting by applying a shadowmask instead so I wanted to pass a texture to the ...
0
votes
1answer
24 views

Monogame movement Handling

I was curious if anyone could explain how I would be able to create simple movement handling in monogame. So far I have a red block which I tried to move by using a loop but that didn't take any ...
0
votes
2answers
51 views

How can I use an HLSL pixel shader to peek at other pixels?

I think this is like a pixilation shader but I had a hard time trying to find one online, and one that I could manipulate specifically. I want to create a pixel shader for my monogame project that ...
0
votes
0answers
16 views

SharpDX.SharpDXException error when using vector as parameter

I placed a GraphicsDevice and width/height into the new RenderTarget2D parameters as it ask for but it keeps throwing an error. Does any one know why? Error: Additional information: HRESULT: ...
0
votes
1answer
58 views

Code for inventory function not working

I'm working on an inventory, and I've ran into some problems. Some code in my CollisionDetection class doesn't work properly. My CollisionDetection class contains functions that involve mouse and ...
0
votes
1answer
19 views

XNA/MonoGame Collisions between two boxes don't work as expected

I have the following problem: I have two GameObjects (one is static, the other is the player). Both of them have one BoundingBox that surrounds them, and a List that contains more BoundingBoxes for a ...
2
votes
1answer
26 views

MonoGame renders texture in an almost compressed looking way

I was working on a game in MonoGame, which I have been doing for quite some time now. As I was implementing UI, I was noticing some sort of weird scanlines. Investigating further, to my surprise my ...
1
vote
1answer
82 views

Fade to first level, on click

Good evening all, about to pull my hair out because I cant figure out why I keep getting this error. The problem is this, I need the player to click on the start button, then, the screen will fade to ...
1
vote
0answers
28 views

Monogame + Render Target + antialiasing doesn't work

Is there any proper way to use antialiasing, while rendering to a RenderTarget2D and using Monogame? I do this: renderTarget = new RenderTarget2D(GameData.GraphicsDevice, pp.BackBufferWidth, ...
4
votes
1answer
108 views

Can I use xna tutorials to learn monogame?

Can I use xna tutorials to learn monogame? I can't find any good monogame tutorials but there are tons of xna tutorials available and from what I have seen they are pretty much the same thing.
0
votes
0answers
21 views

Clip on model XNA

I'm currently doing my water plane system (with waves etc...). Actually, I have a heightmap with a waterplane on it; refraction and reflection working perfectly, but now I want to add objects. So ...
0
votes
0answers
56 views

Side-Collision for Breakout game where ball moves fast

So I've been trying to make a breakout clone, which is my first attempt at a graphical game, I ran into some problems, and was hoping that this community could help me. I've got most of the mechanics ...
0
votes
1answer
84 views

How to handle collision detection

So the way that I am doing the movement for my game is that you can left click a unit (which is just a rectangle object), and then it is selected. While it is selected, you can right click and that ...
0
votes
1answer
124 views

Monogame - Sprite sheet animation

I have a sprite sheet that contains a character walk cycle, and I have made a player class that allows the player to move and cycle through the walk animation, however the animation only works whilst ...
0
votes
2answers
23 views

Combe Rectangle and Vector movement

I'm completely fresh to game development and came up to a problem which I'm not sure how to solve. I have textures which are quite too big for screen. So i used SpriteBatch.Method which uses rectangle ...
0
votes
0answers
14 views

How to do an xBR or hqx filter in MonoGame?

I have been trying to implement an HD filter (xBR or HQX) in my MonoGame game project but so far got no success. I have checked out this question, but the shaders provided in the answers don't seem to ...
0
votes
1answer
27 views

Collectiion was modified(monogame) [closed]

I did use this...and when i changed Screens it gave me this error : Collection was modified; enumeration operation may not execute. foreach(var screen in ScreenList) Inside Base Screen public ...
0
votes
0answers
52 views

Game crashes when sound is finished

I'm trying to code a simple audio playback test game (which will be used in my actual project), and everything works fine, except for the fact that after the audio has finished playing, the game will ...
0
votes
0answers
57 views

Water reflection xna

I'm actually trying to do the reflection map for my water component, but even following the riemer's tutorial about reflection map the formulas provided doens't work. ...
0
votes
1answer
37 views

How to limit resolutions display in monogame

I can Add resolutions to the list. Here is part of code. List<Vector2> resolutions = new List<Vector2>(); foreach (var item in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes) { ...
1
vote
1answer
83 views

Drawing textures in 3D/2.5D at an angle using spriteBatch in Monogame

for a university project we are creating a small "2d" game. Im writing 2D in "" because we would like to achieve a look similiar to the one in games like Don't Starve (so more like 2.5D). As you ...
0
votes
0answers
74 views

How to convert a mouse's “On screen” position to “World” position C# Monogame

So the problem is this... I have a top down game, where you click on the screen to select which unit you want to control. You left click to select, and right click somewhere else to tell it where to ...
0
votes
1answer
33 views

Following waypoints, condition is never fulfilled

Given a 2D-grid which is defined like below and is used to draw a grid consisting of cells: int[,] grid; //filled with 0 (blocked) and 1 (walkable); I also have a A*-algorithm implemented which ...
0
votes
0answers
20 views

Trigonometric movement cause problem when holding player inside bounds

In my game I have a Player class. Here is what it looks like. public void Update(GameTime gameTime) { // Controls kb = Keyboard.GetState(); if (kb.IsKeyDown(Keys.W)) ...
0
votes
0answers
33 views

Shader questions with regards to the SpriteBatch in XNA/MonoGame

So I've finally decided to create my very own GUI system. And I'd like it to use shaders for pretty much all rendering. Think "WPF/Direct2D Brushes". Except to my knowledge, using shaders with the ...
0
votes
3answers
83 views

How do I draw non-smoothed fonts in MonoGame 3.5?

I don't want to smooth the tiny fonts I'm building but even disabling ClearType system wide doesn't let me create SpriteFont files with sharp characters. There doesn't seem to be an option for ...
0
votes
1answer
66 views

Boolean change when clicking the left mouse button (not working)

I want to change a boolean when I click the left mouse button, but it doesn't work as expected. I use this method: if (m.LeftButton == ButtonState.Released && m_Old.LeftButton == ...
3
votes
0answers
52 views

(Monogame) Camera does not travel the way it is rotated

I've implemented camera control with mouse and keyboard. My problem is that camera goes crazy when I'm using mouse and camera does not travel the way it is rotated. Could you explain me why and how to ...
0
votes
0answers
23 views

(Monogame) Camera does not travel the way it is rotated [duplicate]

I've implemented camera control with mouse and keyboard. My problem is that camera goes crazy when I'm using mouse and camera does not travel the way it is rotated. Could you explain me why and how to ...
0
votes
0answers
39 views

Rendering water with Hardware Instancing xna/MonoGame

I was wondering if rendering in XNA/MonoGame will be better using Hardware Instancing. For example, I have my editor and when I click anywhere on my map, i'll add a plane with a water texture. If I ...
0
votes
2answers
92 views

XNA/MonoGame creating a player

After some fine-tuning on my game's GUI I am finally ready to begin with the gameplay. But that's a tall order. My game will be something like a 2D platformer with RPG elements like collecting armor, ...
0
votes
1answer
39 views

MonoGame creates a copy of song files in XNBs location

I'm having a problem. I've been adding .wma files to the Content Pipeline app to be used as my game's background music. But today when I opened the solution/project/content/bin/music folder I spotted ...
0
votes
1answer
66 views

Monogame - how to make a smooth color transition with Color.Lerp()?

I would like to know how to dynamically change a color. My code: Color myColor; Color startColor = new Color(255, 255, 255); Color finalColor = new Color(231, 214, 90); myColor = ...
1
vote
1answer
80 views

Loading font in Monogame

This question is probably a duplicate but I'm still asking it since it's all yesterday that I'm trying to get this done without any success. I followed many solutions and tried even more libraries ...
0
votes
0answers
15 views

Farseer 3.5 RevoluteJoint Breaking

I think I'm missing something completely and the solution is unbelievably simple, but I'm at a loss at the moment. I'm trying to build a stylized car, with a rectangle as car body with two circles as ...
0
votes
1answer
66 views

How to have separate UI section in Monogame?

So I have a game, and you can move and attack and move the camera around, etc...but I want to have a section of the screen dedicated to Character info like health, etc. How do I make a fixed section ...
1
vote
2answers
45 views

Shader models, when to use “ps_4_0_level_9_x” instead of “ps_4_0”

I've made a very simple post processing shader for my 2D game. It produces scanlines by dimming every other line. For this I use the position of the pixel on the screen. When using ps_4_0_level_9_3, ...
0
votes
1answer
46 views

Draw a Texture to fit a rectangle

I would like to draw a texture in a rectangle that is smaller than the texture, normaly the texture will be scaled to fill the rectangle, which results in a squished image. I want to draw it to fit. ...
0
votes
0answers
61 views

MonoGame RenderTarget2D mipmapping fades textures when zooming out

I recently ported my XNA game to MonoGame. Unfortunately, some of the textures are being faded when: They are scaled-down from 32*32 to 16*16 When the camera zooms out, the texture fades from ...