I recently made the switch over to using MonoGame for 2D projects. I’ve been building up a framework on top of MonoGame to cover all the most commonly used things to speed up development and avoid having to recreate the wheel for every project. This framework is called Nez and it is officially available on GitHub.
Some of the features included:
- Scene/Entity/Component system with Component render layer tracking and optional entity systems (an implementation that operates on a group of entities that share a specific set of components)
- SpatialHash for super fast broadphase physics lookups (note that Nez does not provide any physics engine. It provides collision data that you can do whatever you want to with.)
- AABB, polygon and circle collision/trigger detection and resolution
- linecasts, boxcasts, circlecasts (coming soon) against the SpatialHash for super fast lookups
- efficient coroutines for breaking up large tasks across multiple frames or animation timing
- in-game debug console with a bunch of included commands that is extendable by just adding an attribute to any static method
- extensible rendering system. Add/remove renderers and post processors as needed. Fully control over render order, render texture size, scaling, etc
- tween system. Tween any int/float/Vector/quaternion/color/rectangle field or property
- sprites with sprite animations, scrolling sprites and repeating sprites
- kick-ass particle system with added support for importing Particle Designer files. It even has particle collision detection and resolution.
- optimized event emitter for core events that you can also add to any class of your own
- scheduler for delayed and repeating tasks
- synchronous or asynchronous asset loading
- too much to list everything
Lots of Pipeline Tool importers are also included:
- Texture Atlas Generator: give it a directory or a list of files and it will combine them all into a single atlas and provide easy access to the source UVs of each image. Also includes a per-folder sprite animation generation. The atlas generator uses an XML file as input with an Asset Type of System.String. The string array should specify the folder or folders where the source images are located.
- Tiled Map Editor: import Tiled maps. Covers tile, image and object layers and rendering with full culling support built-in along with optimized collider generation.
- Bitmap Fonts: imports BMFont files (from programs like Glyph Designer, Littera, etc). Outputs a single xnb file and includes SpriteBatch extension methods to display text the directly match the SpriteFont methods.
- Texture Packer: imports a TexturePacker atlas and JSON file
- Particle Designer Importer: imports Particle Designer particle systems for use with the Nez particle system
- XMLTemplateMaker: this isn’t so much an imoporter as a helper to make your own importer. Pass it a class and it spits out an XML template that you can use for your own custom XML-to-object importers.
- LibGdxAtlases: imports libGDX texture atlases
- Overlap2D: imports Overlap2D projects. Imports almost all of the data but currently only offers renderers for the basics (no fancy stuff like Spriter animations, lights, etc).
If you are interested here is some light reading to learn a bit more about Nez:
You can find Nez on GitHub.