Nez aims to be a feature-rich 2D framework that sits on top of MonoGame/FNA. It provides a solid base for you to build a 2D game on. Some of the many features it includes are:
inspect ENTITY_NAMEto display and edit fields/properties and call methods with a button click.
Emitterclass) for core events that you can also add to any class of your own
Monogame Cross Platform Desktop Project
Nez.Portable/Nez.csprojproject to your solution and add a reference to it in your main project
Game1.csin a default project) subclass
If you intend to use any of the built in Effects or PostProcessors you should also copy or link the
DefaultContent/effects folder into your projects
Content/nez/effects folder and the
DefaultContent/textures folder into
Content/nez/textures. Be sure to set the Build Action to Content and enable the "Copy to output directory" property so they get copied into your compiled game. See the Nez.Samples csproj for an example on how to do this.
Note: if you get compile errors referencing a missing
project.assets.json file run
msbuild Nez.sln /t:restore in the root Nez folder to restore them.
The NuGet packages are long since deprecated. The source code has been carefully commented and contains a wealth of useful information. Use the source.
All Nez shaders are compiled for OpenGL so be sure to use the DesktopGL template, not DirectX! Nez only supports OpenGL out of the box to keep things compatible across Android/iOS/Mac/Linux/Windows.
If you are developing a mobile application you will need to enable touch input by calling
Note that you have to install the required FNA native libs per the FNA documentation. Here is what you need to do to get up and running with Nez + FNA:
The folder structure the cscproj files expect is something like this:
Alternatively, you can use the Nez + FNA template which works for Visual Studio and VS Code available here.
Bits and pieces of Nez were cherry-picked from various places around the internet. If you see something in Nez that looks familiar open an issue with the details so that we can properly attribute the code.
I want to extend a special thanks to three people and their repos listed below. The Monocle Engine and MonoGame.Extended allowed me to get up and running with MonoGame nearly instantly when I was first evaluating if it would be a good alternative to use for making games. libGDX scene2D UI was ported over to Nez to get a jump start on a UI as well. Nez uses a bunch of concepts and code from all three of these repos.
Maddy Thorson's fantastic Monocle Engine