Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
1: Download and Update FNA
We strongly recommend using Git to download and update FNA. This tutorial will guide you through this process.
If you are using an official zipped release of FNA, you only need to worry about step 2.
1. Clone FNA
FNA uses several Git submodules to access the source to additional libraries, such as SDL2# and FAudio. To fully download FNA, add the
--recursive parameter to your
git clone command:
git clone --recursive git://github.com/FNA-XNA/FNA.git
This will clone FNA, then clone all of the submodules into the appropriate locations.
2. Download Native Libraries
FNA uses several native libraries for various pieces of functionality, such as window management, input, and audio output.
Here's what we use and why:
- SDL2: Used for window management, input, image I/O, etc.
- FAudio: Only required if you use the Audio or Media namespaces.
- MojoShader: Only required if you use the Graphics namespace.
- SDL2_image: Only required under the following conditions:
- Your game uses Texture2D.FromStream(), SaveAsPng(), or SaveAsJpeg().
- Your game uses raw images (rather than XNB) for Texture2D content.
- You wish to use a PNG rather than a BMP file for your window icon.
- Theorafile: Only required if you use VideoPlayer.
Currently, you can find the libraries precompiled here:
This archive contains all of the native libraries for Windows, macOS, and Linux.
3. Update FNA
To update FNA, simply enter the FNA directory and run
git pull. This will update to the latest FNA version, assuming you have not made local changes that conflict with the upstream changes. If you do have local changes, store them elsewhere and update, or revert your changes. (By the way, if you really do have local changes, please let us know! We want working code in upstream, and it will make your life easier, we promise!)
Sometimes, FNA will update one of its submodules. When this occurs, simply run
git submodule update and the submodules will fully update. Again, this assumes that you have not made local changes to the submodules.
4. Template Projects
If you are creating new content instead of porting existing content, have a look at Andrew Russell's FNA Template. This template is a quick way to have a basic project running from scratch.
5. Read FNA News Posts
Aside from the commit log, a good place to keep an eye on major FNA changes is to follow Ethan Lee on Google+:
When major updates occur, he'll write a post explaining what you need to do to get updated, assuming there is anything special needed to update.