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

13. Destroying Entities

Introduction As mentioned in the conclusion of the previous tutorial the game currently has a severe accumulation bug (which some may refer to as a memory leak, although it’s not quite the same thing). This bug occurs because the game is continually creating new Entity instances, but is not destroying them. Rather than simply correcting[…]


Introduction ApplyColorOperation is a method which can be used to modify an ImageData using the same ColorOperation and Red,Green,Blue values that are present in the IColorable interface which is implemented by common FlatRedball objects such as Sprite and Text. ApplyColorOperation modifies the data stored in an ImageData permanently – it cannot be undone. Code Example[…]


Introduction The AutomaticallyUpdatedSprites property in the SpriteManager is a list of all Sprites which the SpriteManager will apply standard behavior to. This includes velocity, rotational velocity, attachment, color rate changes, scale velocity, and animation. This list is made available for debugging and testing. It can be added to a watch window when Visual Studio has[…]


Introduction The TimedActivity method is a method used by PositionedObjects (and objects which inherit from PositionedObject such as Sprite) to perform common every-frame logic. The TimedActivity method performs the following: Adjusts position by velocity and acceleration Adjusts velocity by acceleration Adjusts rotation by rotation velocity Adjusts velocity by drag (linear representation) Calls TimedActivityRelative. Adjusts RealVelocity[…]


Introduction The RenderBreak struct is a struct used internally by the engine to identify when to switch rendering states during a vertex buffer rendering pass. Vertex buffers are used to render most FRB types including Sprites, Texts, and Shapes. You will likely not need to interact with RenderBreak if you are writing game-level code. This[…]


Introduction The Drag property on EmissionSettings controls the Drag value that is applied to emitted particle Sprites. For information on how Drag modifies the movement of a Sprite, see the Drag page.


Introduction The Animate property returns whether the IAnimationChainAnimatable is performing animation (cycling through AnimationFrames). This property does not reflect whether the IAnimationChainAnimatable has a CurrentChain. If it does not, this value may still be true indicating that the IAnimationChainAnimatable will animate once a CurrentChain is set. Setting Animate The IAnimationChainAnimatable interface only requires that the[…]


Introduction The CameraCullMode property controls how the Camera culls objects such as Sprites, which means whether objects that are out of view are drawn or not. By default, CameraCullMode is set to CameraCullMode.UnrotatedDownZ, which means that the Camera will not draw objects which are outside of the calculated view of an un-rotated camera. If your[…]


Introduction Every Entity in Glue has a ConvertToManuallyUpdated method in generated code. This method will remove all contained objects in the Entity from their managers – including removing the Entity itself from being a managed PositionedObject. ManuallyUpdated Entities with visible objects (such as Sprites will still be rendered. This method is not the equivalent to[…]