Questions tagged [monogame]
Open-source implementation of Microsoft's XNA 4, for Windows, Mac, Linux, Android, and iOS, among others.
791
questions
1
vote
0
answers
50
views
MonoGame minimises when I click on second game window
I've problem with my MonoGame project. I have one full-screen game window and one window form with some info (part of the game too). And the problem lies in when I click on the window form, the main ...
0
votes
1
answer
262
views
Difficulty with Texture Alphas - HLSL
UPDATE 3:
I have fixed the issue by reordering my effects (see my answer for details.) Anyone who wants to post more information based on that answer (either in an answer or in the comments) would be ...
0
votes
1
answer
236
views
Monogame - All effects in one file?
I am successfully drawing all of my geometry with an AlphaTestEffect and would like to apply shaders. I've built a shader Effect from a tutorial and can't seem to find anything on the web that answers ...
1
vote
2
answers
80
views
Should tiles be referenced statically when making a map or some other way?
I'm trying to think of a way to manage tiles in my game, so far I have a Tile class that has characteristics about the tile in question, a ...
0
votes
1
answer
365
views
Circular Particle Effect in Monogame
I'm new to C# and Monogame, and I'm trying to create an effect of a 'psychic' ability, the user will press a key and a circular aura blast will emit from their position. I'm just trying to get the ...
1
vote
1
answer
93
views
Destroying a ship removes both the ship and the bullets it has fired
So I'm making a game where you fire bullets at enemy ships which are flying past you. The enemy ships are also firing at a straight line in front of them. The bullets are made into a list of another ...
0
votes
2
answers
219
views
Tile slopes and jittery movement
I'm trying to handle slopes in a tiles based world. I'm using basic linear interpolation to find the Y coordinate of the character based on his X position. But i have a problem, when the character ...
3
votes
1
answer
440
views
MonoGame window is huge although it should be small
I'm using Monogame to create a simple game.
In my Game1 class initializer I set this:
...
0
votes
2
answers
2k
views
Monogame - SpriteBatch.DrawString() won't work
Here is my Game1.Draw() method (Constants.HeroLayerDepth is equal to 1):
...
0
votes
2
answers
654
views
Monogame Move objects while having a moving 2D camera
I am writing my first game. In this game, I have a heroEntity object, which has fields:
...
0
votes
2
answers
219
views
Alpha Blending older Images
I am working on re-writing an old game, and have faced some issues with the older images that were used, the first thing we done was convert all the old images and set the alpha channel on black ...
0
votes
1
answer
68
views
Camera not in sync with player
I am currently working on a game in XNA and MonoGame. This game is supposed to be a port of KidsCanCode's tutorial series of creating tile-based games in Python. Here is a link to one of the videos in ...
0
votes
1
answer
302
views
How to get tile rotation from TiledSharp and convert it to XNA/MonoGame
I am currently working on a game using XNA and Tiled. I use Tiled to create my maps and load them using TiledSharp. Some of my maps have tiles that are rotated by using one or more of the left rotate, ...
1
vote
1
answer
81
views
Efficient way to avoid shadow "streaks" beyond bounds of shadow map
BACKGROUND INFO:
Using MonoGame.
To maximize shadow resolution, I've got a shadow map that covers only the area closest to the camera. (I am aware of Cascading shadow maps, but for now, I am ...
1
vote
1
answer
1k
views
System.Windows.Form.Control.FromHandle returns null for current window
I was following the book "XNA 4.0 Game Development By Example" and in the eighth chapter, the author adds windows form to an XNA game. I was following the book for a MonoGame project, but I get null ...
1
vote
0
answers
125
views
Export baked lightmaps from Unity to Monogame
I'm trying to bake lightmaps in Unity, export as textures and apply the textures in Monogame. Is this the right path to go? If so, how it should be done?
Thank you.
2
votes
2
answers
420
views
How to draw a string to the screen by fading in one letter at a time?
I'm making a text adventure-style game with MonoGame. I have created a TextBox class which prints text onto the screen one letter at a time (like it's being typed). It does this by storing received ...
0
votes
1
answer
682
views
How could I implement collision resolution with MonoGame
I'm building a game engine (for learning and self-development purpose), and I'm starting implementing collision resolution, I already have the collision detection part but I cant' find any good ...
0
votes
2
answers
4k
views
Monogame Drawing Text [closed]
I'm really new at XNA. I've been following some tutorials at gameprogrammingadventures.org but when it comes to conversations I don't really like how the author does it so I've been trying to ...
0
votes
1
answer
1k
views
How do I prevent tile tearing effects when using pixel art in XNA/MonoGame while keeping the low velocity of the player?
Most of my Texture2D are pixel art, meaning they're rather small, so my player/character's position has to change using decimal points to keep a realistic movement that matches its walking animation.
...
1
vote
2
answers
1k
views
How to render many tiles fast if zoomed out? (Monogame/xna)
I'm currently trying to optimize my tile engine. I used monogame with the spritebatch first, but that doesn’t works well. I have read many articles how I could optimize my rendering code.
I moved ...
1
vote
1
answer
2k
views
Unity or Monogame or Gamemaker 2 for an experienced application developer? [closed]
So i know this question has been hammered down several times but please bear with me.
I used to be a C# .Net application developer but i am no longer employed, i am pretty good at C#.
I want to get ...
0
votes
1
answer
155
views
Monogame Effect World Translation Z and alpha in objects not visible behind
I have an effect in each triangle and rectangle:
In the triangle class I have:
...
0
votes
2
answers
294
views
Xna/Monogame How to get an object to decelerate
So I've written a statement for releasing the ball based on a certain speed and for it to move in the direction of the mouse, like so:
...
2
votes
1
answer
2k
views
How to convert png images to True Type Font?
I'm doing a clone of Colonization and I'm trying to use the same font type as the original game. I'm able to get the pixels from the original font files (.ff) using the application from this thread ...
1
vote
2
answers
606
views
How would I go about implementing a collision avoidance check, avoiding moving objects from multiple directions?
So I'm making a testbed for an AI actor(ship). It's a simple asteroids game using an AI controlled actor.
I'm doing this using VS, monogame.
I have implemented a simple steering behaviour using a ...
0
votes
1
answer
307
views
XNA triangle grid not drawn using DrawIndexedPrimitives
I have just recently started working with Monogame (XNA). Now I had code that was drawing a grid using DrawUserIndexedPrimitives. However I read that it reloads the vertices in the GPU each draw, and ...
1
vote
1
answer
157
views
Questions about “minecraft” game optimisation [duplicate]
I'm currently trying to do a basic "minecraft style" game. I know how difficult it is to create a game like this, that's why I juste want to do the base of a game like this. I did a class which ...
1
vote
1
answer
442
views
How to create enemy "flash-light" for 2D game? [duplicate]
I'm developing a 2D stealth game but I cannot figure out how to create something like a torch (flashlight) that the enemies hold and look around with.Any help?
Also, if relevant, I'm using MonoGame.
0
votes
1
answer
110
views
What are width and height supposed to be in Nez TiledTileLayer?
The constructor of TiledTileLayer.cs takes 4 simply-named arguments. I'm assuming name is the layer's name but I can't figure out what ...
1
vote
1
answer
4k
views
How to draw a circle with MonoGame Extended?
I can not figure this out and have basically no idea. I have already installed MonoGame.Extended through NuGet. I have heard you can draw basic shapes like circles with it, but where can I find the ...
1
vote
1
answer
156
views
Monogame drawing lines above map cells
I'm trying to draw 4 lines above map cells as cells access level using this code
...
2
votes
1
answer
1k
views
Tilemap Collision w/ different height levels and directions
I've been programming a final fantasy 6 clone in C# using Monogame and Monogame Extended, and have met on a few interesting challenges regarding tilemap collision.
The game seems to have different ...
0
votes
2
answers
909
views
Separating Axis Theorem is inconsistent
I recently implemented the SAT algorithm into my 2D game and at first it appeared to be working fine. However, when I move around and rotate the character in and out of the wall tiles, there are some ...
0
votes
3
answers
430
views
Using gametime.ElapsedGameTime to trigger an event
I have a splashscreen object that waits for a user input before loading the next screen, but I would also like the next screen to load after a certain amount of time has passed. I tried adding a check ...
1
vote
1
answer
813
views
Memory accumulation in monogame. ‘Dispose’ and ‘Unload’ aren’t working
I'm having a huge problem with memory accumulation in all my games.
This happened after switching from monogame 3.4 to 3.5 so I switched back.
Then recently I went to 3.6(latest release) and started ...
2
votes
2
answers
315
views
Monogame pipeline tool: "Build failed: 1 is not a supported code page."
I've previously done some coding with Monogame 3.6 in VS 2015 on Windows 10 without any problems, including using the pipeline tool. Last week I was forced to reinstall my whole system and now have VS ...
3
votes
1
answer
2k
views
3D objects with animated bones Monogame in the year 2017, is it possible?
I've been working on a game for quite some time now and suddenly it seems that I've hit the great wall of..
In the earlier XNA there were possibilities to use animation exported with the 3D object ....
0
votes
1
answer
208
views
Moving 3D object over Spherical terrain
I'm trying to control a 3D object (just a box for the moment) moving over a spherical 3D planet, I'm using a Ray to find the triangle in the sphere under the object.
I'm calculating the surface normal ...
2
votes
1
answer
532
views
How can I process extra mouse buttons using Monogame?
I use Monogame for game development. For processing mouse input, I can use the Mouse class to query basic information like left click state, right click state, and ...
0
votes
2
answers
872
views
Why doesn't my simple HLSL shader work?
I'm using Monogame to draw 2D primitives to the screen. To do that, rather than use included structures like VertexPositionColor, I wrote my own vertex class for 2D....
0
votes
1
answer
1k
views
Changing the color data of an instance of a shared texture? MonoGame
I want to load multiple instances of a texture on the screen and be able to change the color of each one individually by clicking on it. I've tried many different ways and currently I'm creating two ...
0
votes
1
answer
178
views
MonoGame ortho projection axis direction
I have perfect square screen and I want to capture everything between -1000.0f and 1000.0f, so I create projection matrix like that:
...
1
vote
1
answer
847
views
How do I write to a 16-bit depth buffer using Monogame and HLSL?
I'm working on shadow mapping. Part of the implementation involves drawing 3D models to a depth buffer with recommended 16-bit depth. To that end, I'm first creating a render target as follows:
...
3
votes
1
answer
427
views
Why are .xnb files used rather than source files?
XNA and Monogame are built using a content pipeline, which takes source files (images, sound effects, 3D models, etc.) and converts them to proprietary .xnb files. What's the benefit of doing this as ...
0
votes
1
answer
311
views
Why are Monogame models tied to effects?
When I load a model in Monogame using ContentManager, the model contains effects on each mesh (mesh.Effects). This is confusing ...
0
votes
1
answer
270
views
Monogame - Problem with lighting 3d mesh
I am having an issue with lighting my 3d icosphere. For some reason,the lighting appears to be coming from the correct direction (+X, -Y, -Z) but it also appears to be coming from (-X,+Y,+Z) and I ...
0
votes
2
answers
748
views
Is there a way to force a resolution on Android when using Monogame?
I think I looked everywhere but I couldn't find a way.
My phone has a native resolution of 1920x1080 and I would like to run my game at 1280x720.
I tried by changing PreferredBackBufferWidth and ...
0
votes
1
answer
274
views
Monogame problem with flat shading low poly terrain
I have been dabbling in 3d rendering recently and I am having a problem with the shading on the mesh I am using.
The code I am using to calculate the normals for all the triangles is as follows.
<...
1
vote
0
answers
146
views
XNA / Monogame Camera flickering on collision
I have my camera follow my player and it works perfectly, I had some issues with collision and managed to get it working, but now my camera follows my player when it gets pushed back so the camera ...