FlatRedBall.SpriteManager.OrderedSortType

Introduction The OrderedSortType property controls how Sprites are ordered when they are drawn. Z Buffered Sprites do not use this property when drawing. The following available options exist: SortType Description None No sorting will be performed. Objects will be drawn in the order that they have been added to the SpriteManager. Z (Default) Objects will[…]

FlatRedBall.SpriteManager

Introduction The SpriteManager is a static class which handles Sprite addition, removal, and common behavior. The SpriteManager manages behavior for Sprites and SpriteFrames. Sprites The SpriteManager provides numerous methods for for working with Sprites. The following sections provide code samples for working with Sprite-related methods. Sprite Addition Most AddSprite methods both instantiate a new Sprite[…]

Texture

Introduction The Texture color operation results in an object being drawn with its unmodified texture. Color values (red, green and blue) on the IColorable are completely ignored, unless the object has no texture. The Texture color operation is the default color operation for FlatRedBall types like Sprite and Text. Code Example Texture color operation can[…]

04 – Manual Particle Systems

Introduction Particles may require a large number of FlatRedBall Sprite instances. This guide shows how to create an incredibly efficient particle system using manual particle sprites. What is a Manual Particle Sprite? Manual sprites are sprites which the engine does not automatically update every frame. Manual sprites are an efficient alternative to automatically-updates sprites (the[…]

Using Farseer in a Glue Project

Introduction This walkthrough shows how to add Farseer to a simple Glue project. We will create a diagonal stack of blocks which will fall and collide against a static surface. This tutorial uses the FlatRedBall desktop engine, which means it uses proper XNA (as opposed to MonoGame). MonoGame projects must use the MonoGame version of[…]

Code-only Farseer Introduction

Introduction The Farseer Physics Engine is a physics engine (as the name implies) written in C#. It is directed toward use with XNA and Silverlight, but it can be used with any .NET application. It is a common choice for expanding the physics capabilities of FlatRedBall. General Approach Unfortunately the tutorial support for Farseer (at[…]

ImplementsIDrawableBatch

Introduction The ImplementsIDrawableBatch property can be set to true for entities which require custom rendering code. If this value is true, Glue will generate most of the code necessary for implementing IDrawable batch, including: All necessary properties Empty implementation for IDrawableBatch.Update and IDrawableBatch.Update and IDrawableBatch.Destroy. These are are empty since entities already have update and destroy[…]

RenderTarget

Introduction The RenderTarget property can be set so a given Layer will render to the RenderTarget rather than to screen. The RenderTarget property can be used for a number of reasons: To create textures used in a multi-pass rendering system, such as to apply layer-wide effects like color tinting or bloom To improve the performance[…]