01 – Introduction

Introduction Even if you’ve used FlatRedBall for a while you may not be familiar with exactly what a “manually updated” object is. The reason for this is because the option to make things manually updated exists almost exclusively for performance reasons. Technically one might want to manually update objects to achieve custom behavior as well,[…]

FlatRedBall.Scene.ConvertToManuallyUpdated

Introduction This method converts all contained Sprites and PositionedModels to be manually-updated. This can be used to greatly improve performance of your game if your Scene does not have any kind of every-frame activity such as velocity, color rates, or attachments. This method can be called after the Scene is added to managers using AddToManagers.

Texture2D

Introduction A Texture2D is a 2D array of pixel information which can be used by Sprites, Text objects, and PositionedModels when drawn. All FlatRedBall platforms support textures up to a max size of 2048×2048. FlatRedBall PC uses the Reach profile by default, but if switched to HiDef, textures up to 4096×4096 can be used. Displaying[…]

FlatRedBallXna:Tutorials:Culling

Introduction Culling is the process of determining that an object or a part of an object does not need to be drawn, then skipping the drawing logic because of this determination. This is an effective way to improve performance if the process of detecting whether an object should be drawn is significantly faster than just[…]

FlatRedBall.Math.Geometry.ShapeManager.ShapeDrawingOrder

Introduction The ShapeDrawingOrder controls whether all Shapes are drawn under or over other FlatRedBall-drawn objects (for example Sprites, Models, and Texts). Currently shape drawing order cannot be controlled by the shape’s Z value; however, as of the June 2009 release of FlatRedBall, most shapes can be placed on layers which provides some control over ordering.[…]

.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[…]

FlatRedBall.Scene.AddToManagers

Introduction The AddToManagers method adds all contained elements in the calling Scene to their appropriate managers. Since a Scene can contain Sprites, Text objects, and PositionedModels, this method can add objects to more than one manager. This method is most often called after a Scene is loaded through FlatRedBallServices. Method Signatures public void AddToManagers() Adds[…]

Microsoft.Xna.Framework.Graphics.Model

Introduction Xna’s Model class is the class that’s used to draw 3D geometry. Usually in FlatRedBall this object is contained within a PositionedModel and is accessed by the PositionedModel’s XnaModel property. Setting Effects To set individual effects on a model, set the effects within the model’s meshparts, like so: // Load the effect to use[…]

FlatRedBall.Instructions.Instruction

Introduction Instructions are objects which store a value that will be set to a particular property at a given time. In other words, Instructions can be used to do something at some fixed time in the future. These are useful for creating cut scenes and performing predictable behavior without explicitly holding on to references to[…]

FlatRedBall.Math.Geometry.IScalable

Introduction The IScalable interface provides an interface for 2D objects which can be resized. IScalable objects have two properties which control size: ScaleX ScaleY Note: By default, scale has nothing to do with the Texture that an object is displaying. Two objects showing different Textures of different dimensions will be the same size if they[…]