Adding FlatRedBall to a MonoGame/XNA Project

Introduction

FlatRedBall can be added to any MonoGame/XNA project with only three lines of code. This tutorial describes the process of adding FlatRedBall to a project created from a MonoGame/XNA template.

Downloading .dll Files

First we’ll download the FlatRedBall .dll files, depending on which platform you are working on. All prebuilt .dll files can be found in the this location.

Referencing Files

Most FlatRedBall platforms only require a single – the engine .dll.  Add this file to your existing game project’s references.

Adding Code

Now that your project is referencing FlatRedBall, add the following code:

In Game1.Initialize:

In Game1.Update:

In Game1.Draw:

Note about Clearing Screen

The default template includes code for clearing the screen in the Draw method. FlatRedBall automatically clears the screen for you, so having the call outside of FlatRedBall is redundant. Therefore, the following line of code can be removed after FlatRedBall is added: