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 downloaded and unzipped the FRBDK.zip file, then you should already have Glue on your machine. Unzip the file, open the Xna 4 Tools folder, and run GlueFormsCore.exe.
If you haven’t yet downloaded the FRBDK.zip file, you can get it from the Download page.
Creating a new project
Once you open Glue, you can create a new project. To create a new Project:
- Select File -> New Project
- Enter Beefball for the Project Name.
- Leave Desktop GL as the platform. Our game will target this 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.
- (Optional) Change the location of the project. By default the project will be created in Documents\FlatRedBallProjects.
- Click the Create 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 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 at the same time.
Opening and Running your project
When creating a Glue project, an accompanying Visual Studio project is also created. To open the project, click the Visual Studio icon in Glue, as show in the following image:
You can also open the project in visual studio by opening the .sln file. The project folder can be opened by clicking the folder icon in the task bar. This will open the location of the .csproj file, which is one folder below the .sln file. The following animation shows how to navigate to the solution:
When you double-click the .sln file 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. At the time of this writing, Visual Studio 2019 is the most common version to use with FlatRedBall.
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.