Nez Setup
Last updated
Was this helpful?
Last updated
Was this helpful?
create a Monogame Cross Platform Desktop Project
add the Nez.Portable/Nez.csproj
project to your solution and add a reference to it in your main project
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.
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()
.
. Here is what you need to do to get up and running with Nez + FNA:
clone this repo recursively
open the Nez solution (Nez/Nez.sln) and build it. This will cause the NuGet packages to refresh.
download/clone FNA
open your game's project and add a reference to FNA and Nez.FNA
(optionally) add references to Nez.FNA.ImGui or Nez.FNA.FarseerPhysics if you need them
The folder structure the cscproj files expect is something like this:
TopLevelFolderHousingEverything
FNA
YourGameProject
Nez
clone or download the repository
make your main Game class (Game1.cs
in a default project) subclass
If you intend to use any of the built in Effects or PostProcessors you should also copy or link the folder into your projects folder and the 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.
Add to your project's NuGet packages. Optionally add the and NuGet packages.
Installing through , the contents of the content folder is also included in the package. You will find them under packages/Nez.{VERSION}/tools
.
You can find the samples repo . It contains a variety of sample scenes that demonstrate the basics of getting stuff done with Nez. also contains a few short examples. also has a few relevant videos.
To make getting up and running with FNA easier there are separate csproj files (*.FNA.csproj). Note that you still have to install the required FNA native libs per the . The is included as well and consists of a few extension methods that implmement some commonly used method that are in MonoGame but not in FNA.