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

learn more… | top users | synonyms

1
vote
1answer
39 views

Collision box to slow

I've made the collision box for my player (and other blocks) and I'm now testing gravity and collision on the player. What I saw was that my collisionbox is updating slower than my player is moving. ...
0
votes
1answer
54 views

Rotation Continuity help

First the issue im having: Basically its the fact that the angles of a circle aren't continuous, they rise from 0 to 2pi then immediately fall back to 0. I want to make a game where the player ...
1
vote
0answers
39 views

How to create offsetting lines that draw across the screen in Monogame?

I'm trying to create an effect on the screen like the gif below. Basically lines that are offset by 1 pixel draw across the screen from either side which then eventually creates a solid color. I'm ...
0
votes
2answers
49 views

Using Content.Load<>() in a class that is not derived from Game

I have a class (SpriteManager) that is not derived from Game || DrawableGameComponent || GameComponent so I use my custom methods. When my game starts, it runs that class. My question is, how to use ...
3
votes
1answer
83 views

Adding class to Game

I work on a little project, and in the past, I used SpriteManager : DrawableGameComponent as my SpriteManager class. I have been told that DrawableGameComponent is not so recommended to use, so I ...
3
votes
3answers
139 views

How to create a delay/timer and fire an action once it expires in C# Monogame? [duplicate]

First off I'm somewhat new to C# but I'm working on a game in C# Monogame and I'm trying to get timers working. There was a similar question answered around here a while back but I found that the ...
2
votes
1answer
76 views

In unity 5 export package is not working correctly

I am using unity 5. I Created an objects with layer names. I tried to export a package. After Exporting, i import the package in new project and ran the project its not working. observed that objects ...
1
vote
0answers
58 views

Cant load model from Content in latest Monogame version

Using MonoGame 3.4, I'm trying to display a simple textured basketball. Within the Game1 class, I've created Model mModel. My Initialize function contains all the proper Matrix information. When I ...
2
votes
1answer
70 views

Collision detection

So I've made my collision boxes visual (Draw method) and I saw that there were some problems with the boxes and I fixed them (x, y, length, width). They are now big enough. This is the collision box ...
3
votes
1answer
125 views

new graphicsdevice returning null

I tried to make a collision box visible (for testing) with spriteBatch.Draw(with a blank texture) in my TileSprite class. I needed a GraphicsDevice for this so these are my variables: Texture2D ...
2
votes
1answer
70 views

Replace black color by transparent color XNA

I'm actually trying to replace black color of my texture by a transparent one. How can I do to remove the black pixels, should I use a AlphaTestEffect, or can I use the BasicEffect? Thank you.
3
votes
1answer
52 views

Drawing collision detection boxes

So I have a TileSprite class that makes a TileSpriteobject with a collision box in it named bCollisionRect: public TileSprite(Texture2D textureImage, Vector2 position, Point frameSize, Point ...
2
votes
2answers
93 views

Draw 3D ellipse in monogame/xna

I am programming a 3d solar system (simulator). To describe the path of a planet I wanted to add 3D rectangles.. and draw them. But this ; no surprise; decreased the frame rate extremly. Also it does ...
2
votes
0answers
50 views

Mouse Interaction in 3D space (ray)

I use this code public static Ray CalculateRay(Vector2 mouseLocation, Matrix view, Matrix projection, Viewport viewport) { Vector3 nearPoint = viewport.Unproject(new ...
1
vote
0answers
39 views

Textured trapezoid in Monogame DirectX

I'm working on a 2D game, so most of the graphics are sprites. However, some elements are drawn using trianglestrips in Orthographic projection. The thing is that I can't do a 3D projection because ...
3
votes
1answer
63 views

How can i convert non-canvas mesh collider object as canvas mesh collider object

I am new to unity i created a character object in Maya and stored it as char.obj, then i import the object in unity. the char1 object is not colliding with any other unity objects like cube, plane, ...
1
vote
2answers
79 views

WP 8.1 XNA custom game loop (render when dirty?)

I need to know whether it's possible to create a XNA game for Windows Phone 8.1 (which I've already) using monogame with a custom game loop. OpenGL ES has this possibility (GL_RENDERMODE_WHENDIRTY or ...
2
votes
1answer
28 views

Windows Phone 8.1 Monogame Content.Load<Effect> exception

need some help, just trying to load compiled .fx (.xnb) file by monogame (version 3.4.0.456) in Windows Phone 8.1 enviroment by this code MainEffect = Game.Content.Load<Effect>("chessboard"); ...
2
votes
0answers
25 views

Multimonitor Support in MonoGame

How can I support multiple monitors in mono game ? As far as I know I can not override OnPreparingDeviceSettings and in GraphicsDeviceInformation class there is no DeviceName property in Adapter. ...
1
vote
1answer
36 views

Extrapolating performance on cheaper devices

I am in the final stages of developing a game with XNA and MonoGame and am planning to release it on Windows Phone and Android. I personally have a Blu Win HD LTE and my father and sister have a Nexus ...
0
votes
1answer
56 views

Fixing strange artifacts in an HQX shader

I'm having an issue implementing an HQX filter that I found in the LibRetro GitHub repository. LUT texture was obtained here Shader file was obtained here (I converted it to compile in MonoGame with ...
1
vote
1answer
58 views

Find x and y position with angles in 3D world

I'm actually creating a Tracking Camera (or 3rd person camera), and to do so, I used two angles (X and Y) for the rotation of the camera and an other floating value for the distance between the target ...
0
votes
1answer
200 views

Monogame shader not working

I'm trying to use this this tutorial in monogame, but the effect does not work, only renders a black screen. Everyhing by itself renders just fine, I looked at the render targets if they get drawn to, ...
12
votes
2answers
2k views

Will unlocking the framerate in XNA/MonoGame tell me how efficient my code is?

I have been unlocking the framerate in MonoGame via: this.graphics.SynchronizeWithVerticalRetrace = false; base.IsFixedTimeStep = false; And using it as a basis for how efficient I am updating and ...
1
vote
1answer
48 views

Per pixel collision for scaled textures in Monogame Windows Phone 8

I have some serious trouble with pixel-collision in my game. I am using the Matrix Scale parameter in Spritebatch.Begin method, to scale the content for each device's resolution correctly. ...
0
votes
2answers
248 views

Textures rendering upside down and small with Pixel Shader in Mono Game but not XNA

I'm new to HLSL, attempting to use MonoGame to do some simple post processing effects. Here is my HLSL file, taken from one of rbwhitaker's xna tutorials (I would post the link, but can't post more ...
2
votes
2answers
311 views

MonoGame 3.4 Content Pipeline Extension missing reference

I'm pretty new to MonoGame and XNA in general. So was wondering how I could import custom content and make it work on any platform. So I came across Content Pipeline Extensions wanted to do it like ...
0
votes
3answers
155 views

Game Slowed by Particles in XNA

I am developing an XNA game and am trying to improve the performance of the game by hiding objects that are not visible to the user. My first thought was to use a BoundingFrustum based on the ...
0
votes
1answer
113 views

Monogame - Screen transition with fading

I'm trying to create a fade logic with Monogame for my screen transitions. I've read tutorials online but I'd like to work with Premultiplied Alpha for the fading. I've seen people add 1x1 pixels ...
1
vote
1answer
150 views

Modularization in a project

I'm writing a C# game in Mono, and I want the game to be as modular as possible. I've started by writing the whole Item (inventory) System of the game in a seperate .dll library But I've hit a ...
0
votes
2answers
38 views

Transparency temporarily lost from a rendertarget when drawn to for one frame

I have a transparent RenderTarget2D that I draw every frame. Before the first frame is drawn to the screen, an image is drawn to the render target. The image also contains some transparent pixels. ...
1
vote
1answer
39 views

Rotation of rectangles offsets render position

I have an unknown number "Bricks" that must follow a straight, but not always level, path. Each brick is rotated around one central point properly to form a shape of intersecting paths. My problem ...
0
votes
0answers
122 views

Error on MonoGame Content Pipeline: Texture Importer Error

I just encountered this kind of error when using the MonoGame Content Pipeline and it's my first time to use it to convert png to xnb files (I use a stand alone app for converting files to xnb in the ...
0
votes
1answer
61 views

Different game resolutions on emulator and on a real device (which has the same resolution) on Windows Phone 8

I have a big problem with game resolution, when I'm running my game on emulator (which theoretically has the same resolution as my real windows phone device: 800 x 480). I'm making the game with ...
1
vote
1answer
50 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
194 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
146 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 ...
1
vote
0answers
61 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
129 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. ...
1
vote
1answer
191 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 ...
2
votes
1answer
128 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 ...
4
votes
1answer
90 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
70 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
104 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
155 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
64 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
222 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 ...
5
votes
3answers
351 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
253 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
247 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 ...