* Add WorldPosition & rename ParentTransform -> Transform * doc fix * WorldRotation, WorldScale * Fix scale & doc * Update SceneNode to use Transform2D * Update SceneGraph demo * forgot to add drawable position, rotation, scale * Transform2D strongly typed parent * Revert "SceneNode & Transform2D" * fixed a failing unit test * Fix * Transform updates. * Matrix2D updates. * negated the roation when calculating the local matrix so that it's consistent with sprite batch rotation * updated Entity to inherit from Transform2D * working on the ecs * Graphics branch; sprites. * rename to `GeometryBatch2D` * remove SpriteOptions; use SpriteEffects even though the name is confusing * update project * update demo game * doc EnqueueSprite * doc PrimitiveTypeExtensions * doc fix PrimitiveBatch * remove technique name * update Demo.Batching project name and namespaces * doc fix * doc fix * doc fix * update demo * optimization * change to IDrawContext api * Bug Fixes & API Update & Documentation Fixes * using collision rectangles created in tiled * working on jumping * tweaking jumping * tightened up the controls so the feel pretty good * Monogame.Extended.SizeF class: Added implicit operator which casts Vector2 to SizeF * Removed unnecessary constructor from SizeF * Added another test to RectangleF * Added test which check if RectangleF can be constructed with Point instead of SizeF * simplified the component system interface * making the entity components more generic * made the collision system more generic ready to add in more entity types * created player death using a particle emitter component * Objectgroups for Tiles! Those changes make the "per tile ObjectGroups" available. They are used by Tiled for tile collision using Objects. * fix FramesPerSecondCounter * remove average * forgot to remove unused property * use int instead of float * fix demo * Revert "Objectgroups for Tiles!" * added the ability to destroy entities after a delay * Fixing all the things! So now I tested things and it works! Objectgroups are now available in TileSetTiles as seen here (http://screencast.com/t/YvdCmQoUcd) * fix to never lose time * Fixing the Objectgroups So this time, everything is fixed and actually tested: The tilemap demo works just fine (apart from Game.Exit() being obsolete). Those objectgroups are now available in their respective TileSetTiles as seen in this screenshot: http://screencast.com/t/YvdCmQoUcd * fixed a minor issue with the fps counter in the batching demo * Blame me... Seems like this got discarded while merging the remote tracking branch, so here it is. * Added a new constructor and documentation to TextureAtlas class (#250) * Added a new constructor to TextureAtlas. Also documented TextureAtlas class. * Update TextureAtlas.cs * fixed a minor bug in the player movement system * DynamicBatch2D - SpriteBatch API (#251) * Matrix2D ToMatrix * Merge draw calls when enqueueing. * progress * Batch2D sort modes * SpriteBatch API for Batch2D * doc fix * doc fix * DynamicBatch2D drawing API matches SpriteBatch * Make End() protected * Match SpriteBatch.Begin API * DynamicBatch2D DrawSprite by destination rectangle * GetPrimitiveCount -> GetPrimitivesCount * doc fix * fixed a couple of merge issues * fixed some broken unit tests * player sprite sheet animations are working * tweaked player animation again * player respawn * Added additional overloads to the BitmapFont DrawString methods to support the same functions the SpriteBatch.DrawString have. Also updated the demo to showcase all of these. (#253) * started working in introducing an enemy * implemented super quick and dirty enemy ai * enemies can kill you * weird rules around death * tweaking * refactored the game code into a screen * Fix typo (#258) Fix a typo in the Readme.txt * Add Nez mention (#261) * Fixed the layers offset (#264) * Some Basic Primitives. (#266) * Primitives. * Fix unit tests. * removed the build status from the readme * replaced GetBoundingRectangle methods with properties * fixed a bug in rectangle GetCorners * Fixed scale for BitmapFont draws (#269) * Removed the X and Y properties keeping Position (#272) I removed the X and Y properties keeping Position property to make things less redundant. I also added another constructor that takes a Vector2 position directly. * slight tweak on thickness parsing * fixed the color json converter * Add support for Multiple Tilesets per TiledTileLayer in Tiled Map Renderer. (#278) * Tiled Map rendering now supports multiple tilesets. Previously there was a bug where tiles made with alternate tilesets would draw undefined images. TiledTileLayer holds an array of tiles to draw. This was based on their order from left to right/top to bottom in the grid. The new ordering is based on each TiledTileset to allow tiles with the same TiledTileset to be placed next to each other in memory. This is to support the best choice for map rendering optimization available at this time. The old code would draw the map with 1 call per TiledTileLayer. This new code has 1 draw code per Tileset, per TiledTileLayer. (The re-ordering of tiles described in the above paragraph is neccesary to prevent 1 draw call per TiledTile per TiledTileset.) * Revert a change that I didn't mean to make; AddObjectGroup was change din between me starting the TiledTileLayer change and now. * -Added tiny-grey-cloud.png, Updated level-1.tmx to include 2 tilesets (tiny-tiles and tiny-grey-cloud) and used both tilesets in creating the map. And of course had to update Content.mgcb which also changed Demo.Platformer.csproj. * BoundingRectangle (#279) * Primitives. * Fix unit tests. * BoundingBox2D -> BoundingRectangle * reduced the tolerence on conversion unit tests * BitmapFonts now returning a "rectangle" size. (#281) * BitmapFonts correct height and width "rectangle" measuring string. * BitmapFonts correct height and width "rectangle" measuring string. * MeasureString now returns "rectangle" size. BitmapFont MeasureString() now returns the proper "rectangle" size as expected. Fixed up LetterSpacing issue if line ends with line char. * Renamed variables and added null check. * no idea why that test is failing * Changed obsolete demo code (#283) * Changed obsolete code in the demos * Unit Test commit was a mistake * Extra tab was added by mistake * added a ToString to BitmapFontRegion * Set baseVertex properly in call to DrawIndexedPrimitives when vertex buffer is larger than ushort.MaxValue (#285) * Precalculate tilecount per tileset when TiledTileLayer is created (#287) * Set baseVertex properly in call to DrawIndexedPrimitives when vertex buffer is larger than ushort.MaxValue * Precalculate tilecount per tileset when TiledTileLayer is created to save time while rendering the map later. * Update variable name to match MGE style * BoundingRectangle Radii (#286) * Primitives. * Fix unit tests. * BoundingBox2D -> BoundingRectangle * BoundingRectangle Radii * Changing TileSet instances to Tileset (#289) * Changed obsolete code in the demos * Unit Test commit was a mistake * Extra tab was added by mistake * renamed TileSet to Tileset for file names and csproj * Rename TiledTileSet to TiledTileset in github * Rename TiledTileSet to TiledTileset in github * Rename TiledTileSet to TiledTileset in github * renamed variables containing tileSet to tileset * Changed GetTileSetTileById to GetTilesetTileById * Fix BoundingRect unit tests. (#288) * Only draw tiles that actually exist for each tileset/layer combination (#290) * Only draw tiles that actually exist for each tileset/layer combination * Set baseVertex and startIndex based on the number of draw calls and tiles per call * the delta on the angle tests was way too sensitive * hopefully that fixes the build * added the build status icon back into the readme * Separate out the Tiled rendering code (#292) * Only draw tiles that actually exist for each tileset/layer combination * Set baseVertex and startIndex based on the number of draw calls and tiles per call * First commit of separate map renderer code * Only override on mono (linux)... not sure why this is needed, will look into later * Updated test data for unittest * Fixed layer transparency not working * Couple of small changes * Initial commit of separate Tiled rendering code * Fixed bug causing last tile of each group not to draw * Adding unit tests for FullMapRenderer and TiledTileset * Fixed depth calculation bug when a map consists of only one layer * Added level05.tmx to test isometric left-up rendering * Minor bugs in TextureAtlases (#293) * Print region name in exception * Don't remove the path, only the extension * Removed PathHelper * rejiggled the tiled demo slightly * Made BitmapFont ctr public (#300) I'm not using the MonoGame content pipeline, so i need the contructor to be public to be able to manually load a BitmapFont from file * Nuclex GUI (#299) * Added a new constructor to TextureAtlas. Also documented TextureAtlas class. * Update TextureAtlas.cs * Adapting Nuclex GUI to MonoGame.Extended. Still incomplete. * Ported Nuclex GUI; errors persist * Fixed { } * Started moving from XML skins to JSON skins * Framework compiles * Removed unnecessary item * Nuclex Gui compiling completely. Demo project started. Cleaning out errors required. * "Save" point before massive input changes * Dealing with Input on Nuclex * Added missing files * Nuclex works! * Cleanup started * Removed plugin mechanic * Nuclex finally finished. Mostly. * Commented demo project * Modified input to deal with issue #171 * Added remark to MouseListener * Renamed skin converter to better reflect its function * decoupled the nuclex gui code from the input listeners and other code cleanup * moved the nuclex gui demo into the demos folder * a couple of minor tweaks in the nuclex code * Implemented object layer rendering and tileset transparency color (#301) * Render tile objects in object layers and obey tileset transparency color * Added alpha color tileset to level04.tmx * Fixed unit test and added missing test * Made drawing of object layers configurable * Fixed references to missing files after merge * Fixed another duplicate file reference * Replacing everything with var * fixed a minor bug in the tiled demo * removed unused reference to PCL storage * Implemented animated tiles (#302) * Implemented animated tiles * Only update animated tiles. * massive refactor and partial implementation of animated object tiles * Include IShapeF object as part of the TiledObject (#304) * gui control collection * split collisions into a separate project (#308) * split the old gui code out into it's own project * started refactoring the old gui code * refactored nine patches to derive from texture reigons * fixed some reference issues in the gui demo * rendering nested gui controls * using a smaller font * started fixiing the bitmap font issues * Fixed calculation of x and y radius for ellipse (#311) * Fixed calculation of x and y radius for ellipse and removing TiledObject.Points in favor of using TiledObject.Shape * Don't try to rebuild dynamic details when a map isn't loaded * partially fixed the bitmap font issue, ignored a broken unit test to avoid confusion * Updated the readme * setup a bitmapfont to spritefont comparison * basic text rendering with new lines looks identical to sprite font * perfectly matching measure string methods * perfect bitmap font rotation * perfect rotation and scaling parity between bitmapfont and spritefont * wrote a failing circle interests test * [Shapes] CircleF.Intersects(Rectangle) fix (#315) * Added a new constructor to TextureAtlas. Also documented TextureAtlas class. * Update TextureAtlas.cs * Adapting Nuclex GUI to MonoGame.Extended. Still incomplete. * Ported Nuclex GUI; errors persist * Fixed { } * Started moving from XML skins to JSON skins * Framework compiles * Removed unnecessary item * Nuclex Gui compiling completely. Demo project started. Cleaning out errors required. * "Save" point before massive input changes * Dealing with Input on Nuclex * Added missing files * Nuclex works! * Cleanup started * Removed plugin mechanic * Nuclex finally finished. Mostly. * Commented demo project * Modified input to deal with issue #171 * Added remark to MouseListener * Renamed skin converter to better reflect its function * CircleF + some other things * Fixed demo * Cleanup * cleaned up the demo and removed text wrapping * setup a demo to show that measure string is still not quite working correctly * perfect measure string * added a GetStringRectangle overload for backwards compatibility and to fix a compile error on the build * Create Graphics library. (#316) * Fix BoundingRect unit tests. * Create `graphics` library. * fixed a minor project dependency issue * first bitmap font measure string unit test * added more bitmap font unit tests * DynamicBatch rework (#317) * Fix BoundingRect unit tests. * Create `graphics` library. * DynamicBatchRenderer2D * remove sprite * remove shipbuilder artifact * Create CONTRIBUTING.md (#319) * removed texture atlas from raw xml * a little resharper code cleanup * Tiled library (#322) * Tiled library * remove test project * minor project reference tweak * removed the old gui code and slowly started replacing it with the new * removed broken tests * tweak to gui skin * Fix minor typo in README (#328) * JSON.NET & .nuspecs (#330) * JSON.NET & .nuspecs * fix dependencies for Tiled lib * add xml comments * Add nuget files to solution * fixed some project depenency issues * finally getting back to working on the new gui system * working gui buttons * minor code cleanup * labels and checkboxes * fixed broken hint paths after upgrading to VS 2017 * gui button demo * Tiled Rework (#331) * Tiled Rework * fix failing tests * really fix failing tests * cleaned up some project dependency issues * minor api refactor on the tiled map renderer * Fix Tiled Problems (#332) * Add Tiled Content Pipeline library to NuGet * Update Tiled NuGet package elements. * Remove dependency on Graphics * Update csproj for removal of Graphics dependency * Fix build errors * Fix problems * creating gui skins in code * testing inset panels * partial gui skin serializing * removed sprite font because it doesn't seem to work with latest monogame * moved the demo project template to reduce confusion * working through loading gui skins from a file * Graphics refactor (#340) * Graphics refactor * fix * working on loading gui skins from a file * loading gui skins from a file with the exception of 9 patches * almost there with nine patch regions in the gui skin * rendering nine patches from the gui skin * code cleanup mostly in the gui and serialization namespaces * big code cleanup * mucking around with gui control factory * working on nested gui controls * in the middle of loading gui screens from a file * loading panels and buttons from skin files * nested gui controls * gui control visibility * added a gui cursor and image control * enforce c# 6.0 language version at least until VS2017 comes out of RC * minor code cleanup * started working on editable textbox * renamed GuiCheckBox properly this time * refactored the gui renderer * working gui text box * cleaned up and fixed some issues with keyboard focus * basic working checkboxes * a few tweaks to the gui skinning system * sprite batch clipping rectangles extension method * changed the clipping source rectangle code to account for sprite scaling * allow clipping rectangles on nine patch regions * extended the clipping code to cover bitmap fonts and all overloads of texture region draw methods * added clipping rectangles to gui controls so that text is clipped inside the bounds of textbox * clipping text inside a textbox is a little harder than I expected * basic gui progress bars * TiledMapRenderer allow custom effect (#345) * renamed texture region to background region * minor code cleanup * hacked together a working android project from one of the monogame samples * renamed some stuff and cleaned up namespaces * slightly hacked gui demo rendering on android * gui touch input mostly working * minor tweak to gui button behaviour * Tiled Fix (#349) * Tiled fix. * Remove bat file. * upgraded the demos to match the monogame 3.6 desktop GL template * fixed a mistake in the readme * gah, fixed another issue in the bitmap fonts demo * split nuclex gui out of the core library and added some new nuspec files * fixing nuget dependency version issue hopefully * moved the particle system and the entity component system into their own nuget packages * fixed unsafe code flag in release mode and some minor code cleanup * moved the scene graphs code into it's own nuget package * reorganized the graphics project to be consistent with everything else * changed the tools versions in the project files to be compatible with xamrain studio * Geometric Primitives Cleanup (#346) * CircleF and RectangleF * Fix build errors * Fix iteration memory leaks. (#350) * fixed some merge conflicts * moved the input listeners to thier own nuget package * split the animations namespace into two nuget packages * split the animations content pipeline code out into it's own content pipeline dll
MonoGame.Extended
It makes MonoGame more awesome.
MonoGame.Extended is an open source extension library for MonoGame. A collection of classes and extensions to make it easier to make games with MonoGame.
Patreon Supporters
Thanks to all those that support the project on Patreon! Running an open source project can be done on a shoe string budget, but it's certainly not free. A little funding goes a long way. It keeps the build server up and running and let's me devote more of my time to the project. Even just a few supporters really helps.
What happens to MonoGame.Extended if we don't get the funding? Never fear. The project won't die. The code will always be safely open sourced on github.
Special thanks to the top supporters
- Ben
- Patrick (PRT Studios)
- Benny
- Walter
- Marcel
- Nathanial (optimuspi)
- Austin
If you're not on the list and you should be please let me know! Managing Patreon is a job in itself.
We're working towards the v0.6 release
There's a lot going on in the develop branch right now. We're working towards the next official release (v0.6.xxx). If you want to keep up with the latest and greatest it's recommended that you:
Version 0.5 is available on NuGet
MonoGame.Extended v0.5 was published on 8th April 2016 as a NuGet package. Please read the install guide to setup the Pipeline tool.
Install-Package MonoGame.Extended
This release is compatible with MonoGame 3.5!
Note: If you're still using MonoGame 3.4 you must upgrade to 3.5 for everything to work.
Forums
Our forum is part of the MonoGame community. Please ask any questions or post about problems or bugs that you have found there. Let us know if you're making a game with MonoGame.Extended!
Development status
MonoGame.Extended has a growing community of contributors adding to the project all the time. We also have Nuget packages of published releases and of course you can build from source to get the latest and greatest.
Please keep in mind that the project is still evolving. Some breaking API changes are likely to occur as we progress.
Usage
MonoGame.Extended is a portable class library that sits on top of MonoGame. It's designed to work on all supported platforms using a single portable DLL. At runtime, the portable library will call into the platform specific MonoGame DLL referenced in your project. If you do use it on another platform please let us know!
Documentation
We've got several feature demos in this repository and we're building up the wiki. You can also pop into the forums, check out my blog, ask a question on gamedev stack overflow or use our live chat.
How to install
See the How to install MonoGame.Extended guide. Here's the TL;DR version:
The library is distributed as a NuGet package. Add a reference to your project using the following command:
Install-Package MonoGame.Extended
The package comes with 2 DLLs:
- MonoGame.Extended.dll
- MonoGame.Extended.Content.Pipeline.dll
The MonoGame.Extended.Content.Pipeline.dll needs to be referenced by the Pipeline tool. To reference the DLL in the Pipeline tool you'll need to edit your Content.mgcb file.
Roadmap / Features
Animations
- Tweening**
- Sprite Sheets
- Game Component**
Content
- Texture Atlases
- Bitmap Fonts
- Tiled Maps
Collision Detection
- Bounding Shapes
- Intersection and overlap testing
Input Management
- Event based input (input listeners)
- Gesture detection (taps, panning, flinging and pinch zooming)
- Button Mapping (W=Up, A=Left, Space=Jump, etc)
- Game components**
Graphics and Scenes
- Sprites
- Scene Graphs
- Camera
- Simple shape rendering
- Screen Management
GUI System
- Controls
- Label**
- Button (Text or Image)**
- Toggle Button (Checkbox)**
- Progress Bar
- Text Box**
- Image
- Slider
- Layout
- Canvas
- Stack Panel
- Wrap Panel
- Dock Panel
- Grid
- Dialog
- Window
- Skinning
- Events
- Drag and Drop
Particle System
- Emitters
- Modifiers (age, drag, gravity, rotation, velocity, vortex)
- Profiles (box, circle, line, point, ring, spray)
- Sprite Batch Renderer
- Game Component**
Math and Utilities
- Timers
- Virtual Screens (viewport adapters)
- Bounding Shapes
- Collections
- FPS Counter
- Random Numbers
Platforms
- Windows
- Linux
- Mac
- Android^^
- iOS^^
** Work in progress
^^ Not officially tested but should work
Contributing
If you would like to contribute start with one of the following:
- Please post your thoughts on our forum.
- Join the discussion on one of the issues. We often use github issues to discuss new features as well.
- Talk about it on your blog or twitter.
- and of course, you can fork the project.
Design goals
- The primary goal is to make it easier to make games.
- Choose the features you like and the rest stays out of your way.
- A clean and consistent API familiar to MonoGame developers.
- It's not a game engine, but extends the framework.
- Follows C# coding guidelines.
License
MonoGame.Extended is released under the The MIT License (MIT).
Special Thanks
- Matthew-Davey for letting us use the Mercury Particle Engine.
- John McDonald for 2D XNA Primitives
- LibGDX for a whole lot of inspiration.
- @prime31 for Nez, which ideas and code bounce back and forth.
- All of our contributors!

