This tutorial will introduce the FlatRedBall engine, and Glue – a program which helps with the creation and organization of game projects. We’ll be exploring Glue’s features by creating a game called Beefball – a multiplayer competitive game similar to air hockey.
When finished our game will have two circles, each movable with either the keyboard or an Xbox controller, and a smaller circle which each player can use to earn points.
The first step in any game project is to open up Glue. If you’ve run the FlatRedBall installer, then you should have a shortcut to Glue in your Start menu under Start->”All Programs”->FlatRedBall->Glue. This will launch Glue. Now you can make a new project. If you haven’t yet, you will need to install FlatRedBall from the Download page.
Creating a new project
To create a new Project:
- Select File->New Project
- The New Project Creator should open. Select the Empty Projects category.
- Select “Windows Desktop” as the platform. Our game will target the Windows Desktop platform because it is easy to debug. Creating the project for a desktop platform is recommended even if the game is intended to run on non-desktop platforms (such as Android). Additional platforms can be added at any time.
- Enter Beefball for the Project Name.
- (Optional) Change the location of the project. By default the project will be created in Documents\FlatRedBallProjects.
- Click the Make my project! button to create the project.
The latest FlatRedBall template will be downloaded, so your project will be running against the newest version available.
Now that you’ve made a project, Glue will remember this as your last-opened project and automatically open it for you next time you open Glue.
Glue and Visual Studio
Glue is a tool meant to work hand-in-hand with Visual Studio. It is not a replacement for Visual Studio, meaning you will be doing work in both Visual Studio and Glue. It is quite common to develop FlatRedBall games with both Visual Studio and Glue open.
Opening and Running your project
The previous steps created a regular Visual Studio project. To open the project, click the Visual Studio icon in Glue, as show in the following image:
You can also open the project by opening the .sln file. You can navigate to the location of the .sln file and double-click it, or open it through Visual Studio. The .sln is located one folder above the .glux file, which is the title of the Glue window. For example, the solution for the project as shown in the screenshot would be:
You may see a window like this:
If so you will want to select the version of Visual Studio that is compatible with the type of project you are running. If you have multiple versions of Visual Studio installed, you will want to select the one which can create XNA projects. If you’re unsure, try opening Visual Studio and seeing if you can create a new XNA project. At the time of this writing, Visual Studio 2017 is the most common version to use with FlatRedBall.
If you do not have the option to create XNA projects in Visual Studio, then you will need to install/modify Visual Studio to support XNA projects.
Once Visual Studio is open, you can run your project by pressing the green “play” button, or by pressing F5
Your game should run if all prerequisites have been properly installed. You should see a blank game
That was easy! So far you have a fully-functional game using FlatRedBall. The next tutorial will cover making our first Entity.