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

03 – Loading Textures and Using Sprites

Introduction Textures (which use the type Microsoft.Xna.Framework.Graphics.Texture2D) are used to draw graphics on the screen. A Texture is a resource which is usually loaded from .png and is drawn to the screen using the Sprite type. This tutorial shows how to load a PNG to disk and how to draw it on screen using a[…]


Introduction FlatRedBall Glue projects are saved in either gluj (Glue JSON) or glux (Glue Xml) files. Furthermore, new projects also save their screens in glsj (Glue Screen JSON) and entities in glej (Glue Entity JSON) files. This document discusses details about the glue data files. Gluj Versions The main Glue file (gluj for modern projects)[…]


Introduction The RenderTargetSprite class provides a simple way to perform rendering using a RenderTarget2D. Although FlatRedBall provides support for using MonoGame render targets, the RenderTargetSprite simplifies the creation and management of render targets. RenderTargetSprite instances provide a FlatRedBall Layer for adding visual objects to the sprite. RenderTargetSprite Concepts To understand how a RenderTargetSprite works, we can[…]


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


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