FlatRedBall Source

The FlatRedBall Game Engine and Tools are all open source. All code is conveniently located in one repository:

FlatRedBall on Github

Building the FlatRedBall Engine

To build the FlatRedBall Engine, follow these steps:

  1. Download the FlatRedBall repository (either clone it or download the .zip file from Github)
  2. Open the file <FlatRedBall Root>\Engines\FlatRedBallXNA\FlatRedBall\FlatRedBallXna4.sln
  3. Verify that your build configuration is Debug, x86
  4. Build the project

Adding FlatRedBall Source to a Game Project

If you would like to use the engine source in your game project:

  1. Open your game project in Visual Studio
  2. Expand the game project in the solution explorer
  3. Expand the References item
  4. Find the FlatRedBall entry. This is the reference to the prebuilt-dll

  5. Press the Delete key to remove this reference
  6. Right-click on the solution
  7. Select Add -> Existing Project…
  8. Navigate to the location of the FlatRedBall .csproj file for your given platform. For example, for PC, add FlatRedBallXna4.csproj

  9. Click Open to add the project to your game’s solution
  10. Right-click on your game’s References item and select Add Reference…
  11. Click the “Projects” category
  12. Check the FlatRedBallXna4 project (or whichever FlatRedBall project used for the given platform)
  13. Click OK

  14. Build and run your project

Building Glue

The Glue solutions (.sln files) reference the FlatRedBall engine, so you do not have to open the FlatRedBall engine .sln files first. To build Glue, follow these steps:

  1. Download the FlatRedBall repository (either clone it or download the .zip file from Github)
  2. Download the Gum repository. Make sure to download it to the same folder where you downloaded the FlatRedBall repository, and name the folder Gum. See below for an example.

  3. Open the file <FlatRedBall Root>\FRBDK\Glue\Glue.sln

  4. Verify that your build configuration is Debug, x86
  5. Build the project

It’s important that Gum and FlatRedBall are checked out to the same folder. For example, you may have:

  • c:/MyDocuments/FlatRedBall
  • c:/MyDocuments/Gum

GlueView.sln (aka Glue Preview Window)

GlueView, which is also referred to as the Glue preview window, must be built separately. To do this:

  1. Open the GlueView solution located at <FlatRedBall Root>\FRBDK\GlueView\GlueView\GlueView.sln
  2. Verify your build configuration is Debug, x86
  3. Make sure Glue is not running (otherwise the GlueView files will be in use so the build won’t be able to overwrite them)
  4. Build your project. The project will automatically be built to Glue’s bin folder, based on GlueView’s project settings.

NewProjectCreator

Glue relies on a project called NewProjectCreator for creating new projects. You may need to build and run this to create new projects with Glue. If the NewProjectCreator is missing, you will see the following error when creating a new project in Glue:

To build the NewProjectCreator:

  1. Open the NewProjectCreator solution
  2. Verify your build configuration is Debug, x86
  3. Build the project. It should automatically be built to a location that Glue will find.

GlueWithTiled.sln

The “GlueWithTiled.sln” solution includes Glue and the Tiled plugin. To build this plugin, you must also have the TMX converters. To build GlueWithTiled.sln:

 

  1. Download the TiledMap FlatRedBall Conversion library to MyDocuments, which can be found here: https://github.com/kainazzzo/TiledMap-FlatRedBall-Conversion. This repository should be downloaded or unzipped to the same folder as FlatRedBall, and the folder must be named TiledMap-FlatRedBall-Conversion, or else “Glue with Tiled.sln” will not be able to find the necessary projects.
  2. Open GlueWithTiled.sln
  3. Verify that your build configuration is Debug, x86
  4. Build the project

GlueWithGum.sln

The “GlueWithGum.sln” solution includes Glue and the Gum plugin. If you run Glue from Visual Studio, you must first “Build Solution” so that the Gum plugin gets built. Simply debugging (pressing F5) does not build the Gum plugin.

Troubleshooting

Microsoft.Windows.UI.Xaml.CSharp.targets was not found…

When opening the project, you may get a message which states:

For information on how to solve this problem, see the following link:

http://www.c-sharpcorner.com/UploadFile/8a67c0/visual-studio-2015-feature-shared-project-part-2/