FlatRedBallXna:Tutorials:Rendering to the Pixel and Floating Point Error

Introduction If you’ve read the tutorial on 2D in FlatRedBall then you’re aware that FlatRedBall can handle pure 2D graphics. Unfortunately, even if you follow the information in that article it’s still possible to experience graphical issues related to rendering 2D images which should be pixel-perfect. These issues arise due to floating point inaccuracies. This[…]

FlatRedBall.Camera

Introduction The Camera encapsulates functionality to simplify and control the display of a FlatRedBall application to the user. The camera controls view position, rotation, field of view, and viewable distance. By default the camera in FlatRedBall XNA looks down the negative Z axis – that is negative Z points away from the camera. Increasing the[…]

Camera and Coordinates

Introduction At this point the tutorials have covered placing objects and moving them using Velocity. This tutorial covers the coordinate system of FlatRedBall and shows how camera position can impact how things look. 3D coordinates If using a 3D camera, the coordiantes viewed on screen depend on the Z value. For example, if the Z[…]

UsePixelCoordinates

Introduction The UsePixelCoordinates method is an easy way to set up a traditional 2D camera. Using this method, world units can match up with pixel coordinates. Using the pixel as the unit is effective in pure 2D games where graphics are created to be drawn to-the-pixel. A camera which uses pixel coordinates is referred to[…]

Sprite

Introduction The Sprite is a flat graphical object which is commonly used in 2D games as well as for particles, HUDs, and UIs in 3D games. The Sprite class inherits from the PositionedObject class. Tutorials Working with Sprites Sprite Scale For information on Scale, see the IScalable wiki entry. To match the on-screen pixel dimensions[…]