Introduction All FlatRedBall shapes inherit from the PositionedObject class, so they inherit the X, Y, Z, and Position properties. The Z value of shapes impacts their rendering, but not collision. In other words, shapes will render differently according to their Z value when rendering on a 3D camera, but they will collide as if their[…]

Additional Content:New Content CSV:Runtime Object Charateristics

Introduction Files loaded by Glue can be used to either create “save objects” and “runtime objects”. Save objects are objects which can be loaded directly from file. Save objects are typically not added to the FlatRedBall Engine, nor do they require loading other files which use content managers (such as Texture2Ds). Runtime objects are typically[…]


Introduction The PositionedObject’s Velocity and Acceleration values often dictate the position and movement of a PositionedObject, but sometimes these properties are also used in game code to control other objects. For example, in a physically realistic game if an airplane is flying at a certain speed and fires a bullet, the bullet’s world velocity should[…]


Introduction The AddPositionedObject method is a method which adds an existing PositionedObject instance to the SpriteManager for management. Managed PositionedObjects will have velocity, acceleration, drag, and attachment properties applied automatically every frame. This method should only be called for objects which are otherwise not handled specifically by the FlatRedBall Engine. For example, Sprites are managed[…]

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


Introduction The SecondDifference property returns the amount of time that has passed since the last frame. This value is updated only once per frame, and will remain the same value throughout an entire frame. This value can be used to manually update a value (such as an object’s position) according to time (as opposed to[…]


Introduction The Z value of an entity controls its distance away from the camera. If using a 3D Camera/Layer then making the Z a smaller (including negative) number will make the entity smaller and will make it sort behind other graphical objects. If using a 2D Camera/Layer then the Z value will not change the[…]

Following a character with the Camera

Introduction Top-down games which are played in an area larger than the size of the screen usually require a scrolling Camera. This problem can be solved a number of different ways. This article discusses the approaches and why each may be used. Attaching the Camera to the Character If the Character is a PositionedObject (which[…]


Introduction The Camera is a PositionedObject therefore it has a Position variable which works the same as the PositionedObject’s Position variable. The default position for Cameras is: X = 0 Y = 0 Z = 40 Code Example – Changing X and Y The default (unrotated Camera) looks down the Z axis. This means that[…]


Introduction The Polygon class overrides the base ForceUpdateDependencies implementation. The Polygon’s ForceUpdateDependencies method does the same thing as the base ForceUpdateDependencies implementation (updates the instance’s absolute Position and Rotation values according to attachments); however, it *also* updates the Polygon’s internal vertices. When should ForceUpdateDependencies be called? In most situations you will not need to call[…]