Home

Awesome

Nez

Build status NuGet version NuGet downloads Join the chat Website

See partial zh-cn translation at README.cn.md 部分中文翻译见 README.cn.md

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:

Nez Systems

Setup

Install as a submodule:

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.

Install through NuGet:

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 Input.Touch.EnableTouchSupport().

Samples Repository

You can find the samples repo here. It contains a variety of sample scenes that demonstrate the basics of getting stuff done with Nez. This YouTube playlist also has a few relevant videos.

For reference, you can also access Nez's documentation here.

Using Nez with FNA

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.

Acknowledgements/Attributions

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

Dylan Wilson's excellent MonoGame.Extended and his initial work on converted Farseer Physics Engine to a Portable Class Library. Farseer is Microsoft Permissive v1.1 licensed.

Nathan Sweet's libGDX Scene2D UI libGDX. Nez UI is based on libGDX Scene2D which is Apache licensed.