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. Setting this property to true does the following: Glue will generate a factory for the Entity type which includes a CreateNew method that can be used to create new[…]


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. Main Ship 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 MainShip Entity so that it can move, turn, and shoot. Adding Variables The MainShip movement will be to continually move forward at a constant speed, and to give the user[…]


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