Glue:Tutorials:Using Layers

Introduction Layers are a very common object in FlatRedBall, especially when dealing with UI and HUD. If you’re not familiar with these terms we’ll define them first, because we will use them in the rest of the tutorial: UI – this stands for “user interface”. In FlatRedBall we generally use UI to refer to buttons,[…]

Glue:Tutorials:Custom variables and behaviors

Introduction Custom Variables are variables which can be added to a Screen or Entity to be used either in custom or generated code. There are three types of variables: Exposed Tunneled New (custom) Let’s go through each type to show how they work. As a note for content creators, variables are the key to reusing[…]

PolygonEditor:Tutorials:Loading .scnx Files

Introduction The PolygonEditor can load .scnx files. These files are the standard way of representing collections of FlatRedBall objects including Sprites, SpriteFrames, and PositionedModels. The SpriteEditor is one of the many applications that can create .scnx files. Loading a .scnx File To load a .scnx file: Select File->Load Scene Select the file to load The[…]

FlatRedBall.ManagedSpriteGroups.SpriteFrame

Tutorial See SpriteFrame Tutorial Creating a SpriteFrame in code The following code shows you how to create a SpriteFrame purely in code: Texture2D texture = FlatRedBallServices.Load<Texture2D>(“redball.bmp”, contentManager); SpriteFrame spriteFrame = SpriteManager.AddSpriteFrame(texture, SpriteFrame.BorderSides.All); SpriteFrames and Layers Just like Sprites and Text objects, SpriteFrames can be added to Layers. The following code creates two SpriteFrames. One is[…]

SpriteFrame

Tutorial See SpriteFrame Tutorial Creating a SpriteFrame in code The following code shows you how to create a SpriteFrame purely in code: Texture2D texture = FlatRedBallServices.Load<Texture2D>(“redball.bmp”, contentManager); SpriteFrame spriteFrame = SpriteManager.AddSpriteFrame(texture, SpriteFrame.BorderSides.All); SpriteFrames and Layers Just like Sprites and Text objects, SpriteFrames can be added to Layers. The following code creates two SpriteFrames. One is[…]

SpriteEditor:Add

Sprite Allows users to add a Sprite to the workspace in the SpriteEditor. Users have the option of navigating to any directory they choose to add a Sprite. SpriteGrid Allows users to add a SpriteGrid to the workspace in the SpriteEditor Essentially, by taking an image, users can create a full grid of Sprites and[…]

02 – Measuring Automatic Updates

Introduction Automatic updates can take a significant amount of time every frame if your game includes a large number of automatically updated objects. The first step in improving the performance of your game is measure the number of objects your game contains. This article will discuss how to do this. Requirements This article assumes that[…]

.scnx (File Type)

Introduction A Scene is simply a collection of different types of objects which can be added as a group. Usually scene creation begins in a tool like the SpriteEditor or TileEditor. The default file type of a scene is .scnx. These are XML files which describe a scene. These scene files can be loaded by[…]

AnimationChainList

Introduction Represents a list of AnimationChains. This object can be loaded from file and saved to file as well. This object is associated with the .achx file. For information on how to use AnimationChainLists in Glue, see this article. AnimationChains can be displayed by IAnimationChainAnimatables such as Sprites and SpriteFrames. For more information on how[…]

Layer

Introduction Layers provide a method of enforcing the order in which objects are drawn. This means that Layers can be used to override the default ordering of objects. In other words Layers can be used to make objects which are further from the Camera draw on top of objects which are closer to the Camera.[…]