Introduction The CreatedByOtherEntities property can be used if instances of an Entity will be created at runtime (such as bullets fired by a Spaceship Entity) in a location other than your current screen. Setting this property to true does the following: Glue will generate a factory for the Entity type which includes a CreateNew method[…]


Introduction The PooledByFactory property on Entities tells Glue that the Factory for the given Entity should perform pooling. For this property to appear, an Entity must have its CreatedByOtherEntities property set to true. More information on CreatedByOtherEntities can be found here. What is pooling? In programming a “pool” of objects is a group of objects[…]


Introduction The CreateNew function is used to create a new instance of the Entity corresponding to the calling factory. In simple cases, the only requirement is simply calling this method an a new instance will be created and available for use in your code. For information on CreateNew in the context of a tutorial, see[…]

05. Player Behavior

Introduction At this point we have a ship which is visible on Screen, but it doesn’t do anything. This tutorial will add behavior to our Player Entity so that it can move, turn, and shoot. Adding Variables For this game, the Player will continuously move forward at a constant speed. The Player object will be[…]


Introduction Factories must have their Initialize method called before they are used. In many cases the Initialize method is automatically called in Glue generated code. This article explores when the Initialize method is called for you and when you must call it yourself. The Initialize method also controls which list is populated by a factory.[…]


Introduction The BaseEntity property controls the inheritance of a given Entity. An Entity can inherit from another Entity, or it can inherit from a FlatRedBall type, like Sprite. Inheriting from other Entities Entities can inherit from other Entities. Entity inheritance is the current recommended approach for creating a variety of common entities, such as multiple[…]