Multiple Players

Introduction This walkthrough looks at the FlatRedBall Multiplayer Platformer project and explains the important details of creating a (local) multiplayer game similar to games like Contra III. The sample project can be downloaded from Github: We will be referring to the MultiplayerPlatformerDemo as this demo and the demo throughout this walkthrough. Selecting and Storing Join Status[…]

02 – Modifying Animation Layers

Introduction Platformer games (such as Super Mario World) include animated characters which play animations in response to input, physics, and collision with the environment. For example, a game like Super Mario World includes a number of animations: Idle Walk Run Jump Duck Look up Skid (Trying to turn around when running) Each of these animations is[…]


Layer Layers are containers which can be used to control the draw order of objects. Layers provide an alternative to setting the Z value of graphical objects for rendering. Typically layers are created for categories of objects such as: Game HUD Pause Menu Popups Command UI (UI which may be used in an RTS to[…]


Introduction AddMergedCollisionFromLayer adds rectangles to the calling TileShapeCollection for all layers in the argument layer which have properties matching the predicate. Rather than creating individual rectangles for each tile, the created rectangles will be merged – all adjacent rectangles in either a row or column will be combined into one to reduce memory consumption and to[…]


Introduction The MoveToLayer method will place the entity on a Layer (if it is not already on a Layer) or will remove the entity from its current Layer and place it on the argument Layer. This method will assign the entity’s LayerProvidedByContainer property, and will move all contained visual elements (such as Sprites) to the[…]


Introduction LayerOn controls which layer an object is rendered to. By default the value is blank which means that it will be sorted with all other objects with no layer. This value can be changed on an object’s Properties tab. For an object to be on a Layer, a Layer must be defined in the same Screen/Entity that[…]


Introduction MoveToFrbLayer can be used to move a GraphicalUiElement to a FlatRedBall layer. For information on moving objects to a layer in Glue, see the Adding Gum Components to Layers page. At the time of this writing, Gum objects can only exist on one FlatRedBall/Gum layer. Gum Layers vs FlatRedBall Layers Gum and FlatRedBall use two completely[…]

07. Creating Entities from Object Layers

Introduction In the previous tutorial we covered how to create entities from tiles. This approach can simplify entity creation, and works great for entities which are uniform (each instance is identical aside from position). Some entities require custom properties per-instance. For example, consider a game where players can walk through doors to enter other maps.[…]

Adding Gum Components to Layers

Introduction Gum Screens and Components can be added to Layers in Glue. This page discusses some common scenarios for layering Gum objects in Glue. For information on moving Gum objects to layers in code, see the MoveToFrbLayer page. Adding an entire Screen to a Layer in Glue Entire Gum Screens can be added to a Glue[…]


Introduction The RemoveLayer function removes the current Layer from the SpritManager. This function can be used to remove Layers once they are no longer needed (such as Layers created in custom code), or to move Layers between different Cameras. Code Example The following code shows how to create and destroy a Layer in custom code.[…]