Introduction The PauseThisScreen method is provided by FlatRedBall Screens which can be used to implement pausing. In many cases, this function will effectively provide pause implementation for games. Example Usage – Pausing With the Keyboard The following code shows how to pause and unpause the screen using a gamepad’s Start button. void CustomInitialize() { //[…]

Adding Gum Screens to Glue Screens

Introduction Many games include a Gum screen for every Glue screen. Gum screens can be used for UI such as buttons and textboxes (usually using FlatRedBall.Forms) or can be used for read-only UI such as score and health display. Screens can be added in a variety of ways, depending on the state of your project.[…]


Introduction The CurrentScreenSecondsSince method returns how many seconds have passed since the argument time according to the current screen time. This is the preferred method of detecting how long time has passed since it takes into consideration screen pausing and the TimeManager’s TimeFactor property. Code Example: Spawning an Enemy on a Timer The following code[…]


Introduction The OnScreenKeyboard, also referred to as a “software keyboard”, can be used to enter text in a TextBox using a GamePad. Console games and games which use a controller as a primary input device will usually include some form of OnScreenKeyboard for text entry. Although the OnScreenKeyboard is primarily designed to be used with[…]


Introduction The BaseScreen value controls the base screen from which the current screen is derived. The derived screen will have all of the objects, files, events, variables, and code of the base screen, but can add more functionality and content in Glue and code. In code setting the BaseScreen sets the screen to inherit from[…]

Derived Screens as a Levels

The latest version of FlatRedBall, Glue, and the Tiled plugin include features to support a new approach for creating levels – using derived screens. Screen inheritance has been available in Glue for many years, but the latest set of features revive this functionality and make level creation easier than ever. Old vs. New Levels are[…]

02. Creating a GameScreen

Introduction This walk-through creates two screens. The first is a screen called GameScreen which defines what our game has in every level. The second is a screen called Level1 which has files and objects for our first level. GameScreen will be a base class for Level1, and any additional levels will also use GameScreen as a base screen.[…]

Restricting Mouse to Screen Bounds

Introduction Some games benefit from keeping the mouse within the screen bounds. The two common scenarios for keeping the mouse within the screen bounds are: A first person shooter uses the mouse to move around. The mouse should be invisible and not move outside of the window when the window has focus. Real time strategy[…]