Introduction The I2DInput interface can be used to generalize input code for detecting a value and velocity along two dimensions (X and Y). A common usage of this is to control an object’s 2-dimensional movement such as a character in a top-down game. Numerous common input devices are implemented as I1DInput. The X and Y[…]


Introduction The I1DInput interface can be used to generalize input code for detecting a value and velocity along one dimension. A common usage of this is to control objects on one axis such as a platformer character’s horizontal movement. Numerous common input devices are implemented as I1DInput. The Value property is typically between -1 and[…]

Glue:Reference:Global Content:Setting files at runtime

Introduction All files in GlobalContent have a getter and a setter. This means that you are able to set files at runtime if you would like to update them in custom code. This section will discuss the details of setting files, and why you may want to do this in your projects. Example Scenario Setting[…]


Introduction The InterpolateColor ColorOperation can be used to blend a Sprite to a particular color. The Alpha value on the IColorable is used to perform the blending, so IColorables which use the InterpolateColor ColorOperation must rely on only their texture for transparency. Code Example


Darkening Example The following code creates 10 bears, starting with a color of pure black (0,0,0) and ending with white (1,1,1). The bears start dark (as if in shadow), then become progressively brighter.

Tinting Example The ColorOperation.Modulate option makes the drawn object “multiply” all of its texture color values by the Red, Green, and[…]


Introduction The RelativePoint1 and RelativePoint2 values define the shape of a line relative to its absolute position. These values can be set to modify how a line will draw – specifically its angle and length. For simplicity the RelativePoint1 can be set to (0,0), so simply modifying the second point will adjust the line. Examples[…]


Introduction The CurrentScreen property references the ScreenManager’s current Screen. Only one Screen can be active at one time. This property is set automatically by the ScreenManager when a new Screen is created. This can occur through: The FlatRedBall.Screens.ScreenManager.Start method The FlatRedBall.Screens.Screen.MoveToScreen method The FlatRedBall.Screens.Screen.IsActivityFinished property The CurrentScreen property cannot be set directly. For more information[…]

Additional Content:New Content CSV:Runtime Object Charateristics

Introduction Files loaded by Glue can be used to either create “save objects” and “runtime objects”. Save objects are objects which can be loaded directly from file. Save objects are typically not added to the FlatRedBall Engine, nor do they require loading other files which use content managers (such as Texture2Ds). Runtime objects are typically[…]

Additional Content:New Content CSV:Simple Line of Text Tutorial

Requirements for loading custom content Each entry (usually one row) in a CSV defines how a file type is loaded into a runtime object. This code tells Glue how to generate code to load and interact with various file formats. Before creating an entry in a CSV, you will first need to create a new[…]

Additional Content:New Content CSV:Creating Runtime Objects

Introduction This article discusses how to modify your content CSV to support creating a “runtime object”. A runtime object is an object which typically has the following characteristics: It has every-frame activity It has some kind of membership in the FlatRedBall managers (such as it adds Sprites to the SpriteManager, PositionedObjects to the SpriteManager, or[…]