Implementation of Microsoft's XNA 4 APIS for Android, iOS, MacOS and Linux.

learn more… | top users | synonyms

11
votes
2answers
5k views

XNA 2d Camera Scrolling - why use matrix transform?

I am making a test game where I want the level to be constantly scrolling. To create this effect I have established a camera class which simply stores a vector2 position and an enum direction. It also ...
11
votes
4answers
1k views

Monogame minimum hardware requirements?

What are the minimum hardware / driver requirements for running a Monogame 3.x game, on each of the various Operating Systems?
10
votes
3answers
411 views

What problems could occur if you make use of both the Monogame API and the underlying graphics API?

What kinds of problems could one run into if they were making a game with Monogame and started making calls to the underlying graphics API as well? For example, if I wanted to do something in a ...
10
votes
2answers
739 views

Portable buffered keyboard input for XNA / MonoGame?

As a preliminary solution, I am currently using the Nuclex framework in an C#/XNA game project for buffered keyboard input. Sadly, nuclex relies on SlimDX.Directinput.dll and therefore to my knowledge ...
8
votes
4answers
5k views

GUI Library for MonoGame [closed]

Is there any GuiLibrary available, which works with MonoGame? I know there are some GUI Libraries for XNA but I assume most will not work with MonoGame. Even simple stuff like Buttons and Inputfields ...
8
votes
4answers
999 views

Detecting “Any Button Press”

I'm trying to allow the player to press any button to continue from the main page. I was able to do this by making a List of Buttons and looping through these and checking for one of them being down; ...
8
votes
7answers
13k views

How to generate Spritefonts for monogame

I just want to render some text to the screen using: monogame 3.0 MS Visual Studio 2010 C# Express In XNA, you were able to add fonts to the content pipeline quite easily. But this doesn't seem to ...
7
votes
3answers
735 views

Reusable top-down collision class

I've recently picked up monogame and am working on a simple top down game to get me started and learn the basics. I've got the movement and the rotation to follow the mouse sorted out but I'm stuck ...
7
votes
5answers
829 views

Sprites rendering blurry with velocity

After adding velocity to my game, I feel like my textures are twitching. I thought it was just my eyes, until I finally captured it in a screenshot: The one on the left is what renders in my game; ...
6
votes
4answers
3k views

The right way to add images to Monogame/Windows

I'm starting out with MonoGame. For now, I'm only targeting Windows (desktop -- not Windows 8 specifically). I've used a couple of XNA products in the past (raw XNA, FlatRedBall, SilverSprite), so I ...
6
votes
1answer
750 views

Do I need to rewrite my HLSL shaders when porting from XNA to MonoGame?

I'm looking at porting an XNA project I have to monogame, but I have a fair number of HLSL shaders. It seems that Monogame for PC uses OpenGL as the rendering backend, and I'd rather not have to ...
6
votes
1answer
227 views

Measuring GPU time from managed code

To measure CPU code, I use a Stopwatch. Using a Stopwatch in the Draw method is meaningless for the GPU side of things since the CPU and the GPU run asynchronously. The questions is simple: Is it ...
5
votes
1answer
633 views

How can I render an .stl file in XNA or Monogame?

How should I go about rendering a .stl file as a 3d model in XNA? The .stl file contains a bunch of triangles that add up to a solid mesh. I have already figured out how to read the contained data. ...
5
votes
4answers
2k views

How can I develop in MonoGame without relying on .xnb files?

I'm new to game development, and MonoGame seems like a beginner-friendly framework, so thought I'd start with that. However, as I started reading tutorials on it, I noticed a common theme: That at its ...
5
votes
2answers
328 views

How can I optimize a parallax effect consisting of multiple transparent layers?

I have a parallax effect in MonoGame consisting of multiple semi-transparent layers of textures. The effect is simple, but rendering multiple transparent layers on top of each other is rather slow. ...
5
votes
1answer
1k views

Compiling a Monogame Game into a single .exe [closed]

Is it possible to compile a monogame game into a single .exe? I know if you go in the debug or release bin, there is in fact a .exe your game, except you move this .exe's file location or try to run ...
5
votes
1answer
405 views

Performance of pixel shaders vs. SpriteBatch: XNA

Precondition: I read this question/answer about using shaders, or spritebatch, to render and mark a sprite. I need to do something like that. I also have a 2D lighting PoC which I need to write. The ...
4
votes
1answer
691 views

Playing Video In MonoGame

I'm trying to play a video in a monogame project. I've done this in XNA in the past by including the Framework.Video directory and it's very simple. This cannot be done in monogame as Visual Studio ...
4
votes
2answers
302 views

Conditional Defines and HLSL

Is it possible to use project level conditional defines in hlsl code? I'm trying to conditionaly compile a shader using MonoGame Content Procesor. Depending on project type (ie. Windows, Windows8...) ...
4
votes
1answer
207 views

How do I load a model through AssimpNet into Monogame?

I am new to MonoGame and to 3d and I'm stuck on how to import a model. It seems the best way to import a mesh model and 3d animations in Monogame in Windows 8 is through AssimpNet. I can't find a ...
4
votes
1answer
181 views

GetData() error creating framebuffer [closed]

I'm currently porting a game written in C# with XNA library to Android with Monogame. I have a Texture2D and i'm trying to get an array of uint in this way: Texture2d textureDeform = ...
4
votes
1answer
981 views

Sound not playing on Windows XP - SoundEffect or Song: Monogame

*Solution:* I have a RealTek ALC888. I solved this (OpenAL) by disabling hardware acceleration on my sound (Control Panel > Sound > Advanced, disable acceleration). I'm trying to integrate sound into ...
4
votes
1answer
124 views

How do I letterbox a C#/Monogame viewport within a resizeable window?

I am making a 2d game with xna/monogame. I want the main view area to always show 15x15 tiles, or 480x480px. I've got something that sort of works, following this guide. It expands the view range ...
3
votes
2answers
2k views

Does Monogame on Windows Desktop use OpenGL or DirectX by default?

if i use monogame 3.0 beta on windows desktop, does it use the directx renderer (sharpdx) or the opengl renderer by default? if it uses directx is there away to make sharpdx call directly? thanks!
3
votes
1answer
169 views

Learning Web Development and Game Development at the same time? [closed]

I'm a junior-level developer, currently working full time and trying to get experience with working with ASP.NET MVC. I love web development, and want to continue to pursue it as my career, but I also ...
3
votes
3answers
480 views

8 directional movement - Maintain vertical position

I have a top-down game that has 8 directions of movement (top/down/left/right/topright/topleft/bottomright/bottomleft). There are sprites for each direction of movement. This is just an example ...
3
votes
2answers
582 views

Issue with Monogame resizing

I've converted my XNA project into a MonoGame one. Whenever I start the application and resize the game manually (ie - dragging the window)... this.Window.AllowUserResizing = true; ...the game ...
3
votes
1answer
192 views

Platform independent replacement for LuaInterface

I'm currently working on a project in C#/XNA, however I'm planning to migrate this to MonoGame so that it can go onto more platforms. The problem is that I am currently using a lot of Lua, and for ...
3
votes
1answer
79 views

How do I edit a Texture2D at run-time to visually indicate connected tiles?

I'm making a 2D sandbox game in C# and MonoGame, and I have a couple of tile sprites. These tile are loaded in-game as Texture2Ds. I want to have blocks visually connect to adjacent blocks. An ...
3
votes
1answer
119 views

Obfuscating Monogame assets

I'm obfuscating spritesheets. I've already encrypted the .txt file dictionaries. Now I'd like to perform binary serialization on the image files. Texture2D does not allow for this though, probably ...
3
votes
1answer
146 views

How should I draw the GUI if I use a 2D camera?

I have a camera in my 2D side scrolling game and I want to implement the GUI. How can I do that? For the moment, I draw everything like this: spriteBatch.Begin(SpriteSortMode.Deferred, ...
3
votes
1answer
760 views

Monogame/SharpDX - Shader parameters missing

I am currently working on a simple game that I am building in Windows 8 using MonoGame (develop3d). I am using some shader code from a tutorial (made by Charles Humphrey) and having an issue ...
3
votes
2answers
214 views

Tons of stuttering in XNA?

As stated in the title, my program stutters like crazy, even though my program for the most part runs for 60 fps. During the moments it stutters, FPS momentarily drops down to 59(stats from FRAPS). ...
3
votes
1answer
277 views

Is multipass rendering possible with SpriteBatch?

I'm trying to implement a bloom effect. This requires three shader passes: a brightness threshold, a horizontal blur, and a vertical blur. It also requires resizes, but these are irrelevant to the ...
3
votes
2answers
284 views

Where i must put .xnb files in mono game project using VS2010?

Hello there my problem was describe below In the "The Content Pipeline" paragraph ...
3
votes
3answers
1k views

MonoGame for iOS - getting started [closed]

I can't find any clear directions on how to get started. I only see a Windows installer for MonoGame but what little documentation I've found seems to say you install it on the Mac and do the work ...
3
votes
2answers
1k views

Is there an easy and automatic way of converting a Windows XNA project into a Monotouch Monogame project?

I have just started with XNA development on Windows. But as I'm a fan of iOS I had to try porting my test code over to Monotouch on the Mac. I used these instructions: ...
3
votes
1answer
417 views

Controlled rotation on 3D object with mouse movement

I've a scene with a cube that I can rotate around yaw, pitch and roll. I do this by click the circles and drag the mouse on x/y-axis. I want similar functionality as the Unity rotation tool in editor ...
3
votes
1answer
75 views

Why is my cursor not working if I add a scaling matrix?

After moving the camera to any direction, my cursor isn't getting drawn on the correct position. For example: I move my camera to the right, after that I click on the screen, but the cursor isn't ...
3
votes
1answer
422 views

Spritebatch Vertex shader world matrix change after each draw

I have a spritebatch where I draw some textures transformed in 3d space. The easy way was just Begin with the transformation matrix, draw, and end it right after. But that is silly, so I'm trying ...
3
votes
0answers
814 views

Loading custom shader in Monogame [closed]

I have been trying to load this custom FX file into a Monogame project, and everything I try fails. (code taken from http://www.david-gouveia.com/scrolling-textures-with-zoom-and-rotation/) sampler ...
2
votes
2answers
1k views

Deploying MonoGame without OpenAL or Installer

I just shipped my first working MonoGame in-development game to one of my friends. He got some OpenAL DLL crashes, until he installed OpenAL. Is there a way to include the OpenAL dependencies somehow ...
2
votes
1answer
283 views

Handling game-state updates in an MMO while the player is logged out

I have a plan to build MMO strategy game like Goodgame Empire or Travian for windows phone. I want program it in C# Monogame (because I have some good experiance with it). But I still can't figure ...
2
votes
2answers
91 views

How to mimic the same fixed-size horizon as in this racing game?

I am trying to replicate the same horizon (buildings and sky) as in the image below: As you can see, the player has advanced in a straight line, yet the horizon has still the same size: This is ...
2
votes
2answers
1k views

How to work with delta time?

I've just started using MonoGame (which pretty much seems to be an open implementation of XNA) and I'm trying to figure out on how to work with framerate independant calculations. Usually what I found ...
2
votes
1answer
555 views

Multiply mode in SpriteBatch

I have a "lighting" texture (black background with white or colours for lights) that I want to draw as a multiplcation operation. SpriteBatch.Begin can specify BlendState.Additive, but there's no ...
2
votes
3answers
671 views

Minimum Hardware for iPhone Dev

So I'm planning to get into iPhone dev (2D games). I understand that my only real option is to get a Mac. I'll probably go the MonoTouch route. I'm not sure what hardware to buy; I just want the ...
2
votes
2answers
230 views

Processing periodical operations on the database [duplicate]

I program MMO strategy game (C# monogame) like Goodgame Empire or Travian for Windows Phone. The server part of the game will run on Windows Server and MS SQL database. I'm trying to figure out a ...
2
votes
1answer
242 views

What can I safely do with the MonoGame GraphicsDevice on multiple threads?

I'm working on a UI system that does it's processing on a separate thread. However, the results of this processing must end up on the GPU eventually. A simplified overview of the system boils down to ...
2
votes
2answers
313 views

Ambiguation between multitouch geistures tap and free drag in Windows Phone 8 Emulator (Monogame)

I am making a 2d tile based tactic game. I want the map to be slided around (because it's bigger than the screen) with FreeDrag (It's perfectly done, the map can moved around, that's not the problem). ...