FlatRedBall
  • 🖥️Downloading FlatRedBall
  • 🏗️Building FlatRedBall From Source
    • Linking Games to FlatRedBall Engine Source
    • Linking FNA
  • ❓Need Help?
  • ✨FlatRedBall Features
  • 🎓Tutorials
    • Introduction To FlatRedBall
    • Quick Start Guide
    • Beefball - A Full FlatRedBall Tutorial Project
      • Creating a FlatRedBall Project
      • Creating an Entity
      • Creating a Screen
      • Controlling an Entity
      • Creating the Screen Collision
      • Advanced PlayerBall Controls
      • Creating the Puck Entity
      • Adding Multiple Players
      • Scoring and Restarting Rounds
      • Scoring Hud
      • Scoring Hud Logic
      • Adding Dashing
    • Platformer Tutorials
      • Platformer Basics
        • Creating an Entity
        • Controlling a Platformer Entity
        • Movement Values
        • Double Jump
      • Checkpoint and Level End
      • Climbing Ladders
      • Doors
      • GroundCollidedAgainst and Movement Values
      • Moving Platforms
      • Multiple Players
      • NPC Dialog
      • Breaking Blocks
        • New Project Setup
        • Creating Level1 Map
        • Creating the Block Entity
        • Block Removal
      • Dealing Damage
        • New Project Setup
        • Enemy Entity
        • Shooting Bullets
        • Damaging the Enemy
      • Enemy Movement
        • New Project Setup
        • Enemy Entity
        • Enemy Input Logic
        • Detecting Platform Edges
      • Ground Type and Water Movement
        • New Project Setup
        • Creating Level1 Map
        • Adding Ice and Water
        • Platformer Movement Values
      • Animation and Platformer Values
        • New Project Setup
        • Creating AnimationLayers
        • Modifying Platformer Values
      • Wall Sliding and Jumping
    • Damage Dealing
      • Setup
      • Team Index
      • Damage Events
      • IDamageArea Removal
      • Melee Damage
    • Entity Variants Using Inheritance
    • FlatRedBall.Forms
      • Getting Started with FlatRedBall.Forms
        • Setup
        • Working with Common Controls
        • Forms vs Gum in Code
      • Forms and Xbox360GamePad
      • Data Binding (BindingContext)
        • BindingContext Property
        • Binding FlatRedBall.Forms
        • Parent and Children Binding using BindingContext
        • ListBox Templates
      • Styling Forms
      • Defining New Forms Types
        • Adding New Types to FlatRedBall.Forms Library
      • Accessing Forms Events in Gum Runtimes
    • Top Down Games
      • Top Down Basics
        • Setup
        • Input Device
        • CurrentMovement
      • Enemy Movement
        • Enemy Pathfinding
        • Direct Enemy Control
      • GroundVelocity
      • Animation
      • Sorting
    • Post Processing
    • Rock Blaster - A Full FlatRedBall Tutorial Project
      • Introduction
      • Setup
      • Game Skeleton
      • Player Entity
      • Player Behavior
      • Rock Entity
      • Collision
      • Rock States
      • HUD
      • Multiple Players
      • Health
      • Health Part 2
      • Destroying Entities
      • Cleaning Up
    • Code-Only Projects (No Editor)
      • Creating a FlatRedBall Project
      • Adding a Circle
      • Loading Textures and Using Sprites
    • Code Tutorials
      • 3D Camera Setup
      • Adding FlatRedBall to a MonoGame/FNA Project
      • Adding WPF to an Existing Game
      • async and await
      • CLR Profiler
      • Collision Jitter
      • Culling
      • Customizing Cursor Visuals
        • Windows Desktop
        • windows-rt
      • Depth Buffer Z Fighting
      • Dictionaries and Enum Keys
      • FlatRedBall XNA in Windows Form
      • Improving Performance
        • CustomActivity Performance
        • Identifying Screen Creation Performance Issues
        • Rendering Performance
        • Manually Updated Objects
          • Introduction
          • Measuring Automatic Updates
          • Measuring Sprite Automatic Updates
          • Manual Particle Systems
      • Object Sorting
      • Pix
      • Rendering Sprites with Shaders
      • Tile-Based Movement
      • Velocity
    • Distribution
      • App Icon
      • Emptying bin Folder Using Probing Path
      • itch.io
      • Release Build
      • Steam
    • FlatRedBall and Velcro Physics
      • Using Velcro Physics with the FlatRedBall Editor
      • Code-Only Velcro Projects
    • FlatRedBall Editor Plugins
      • Introduction to FlatRedBall Plugins
      • Creating a Plugin Project
      • Creating a Plugin Class
      • Adding UI to FlatRedBall
      • Using MVVM
      • Creating a NamedObjectSave-Editing Plugin
      • Adding File Format Support
      • Adding Code Files to a Game Project
      • Errors
      • Exporting a Plugin
    • Additional FlatRedBall Editor Tutorials
      • How to Create a First Person Camera
      • How to Play Sounds
      • How to Share Reference Data Between Screens and Entities
    • Math Tutorials
      • Circle Collision
      • Determining required magnitude for trajectory
      • Introduction to Collision
      • Power of Two
      • Rectangle Collision
      • rotation
      • statistics
      • trigonometry
      • vector
      • matrix
      • interpolation
    • Overworld Tutorials
      • Spinning Mode 7
        • New Project Setup
        • Adding Camera Code
        • Fading In and Out
  • 🎞️Videos
  • 📐FlatRedBall Editor
    • Display Settings
    • Entities
      • BaseEntity
      • Constructor
      • ConvertToManuallyUpdated
      • CreatedByOtherEntities
      • CustomActivity
      • CustomDestroy
      • CustomInitialize
      • Destroying Entities
      • Entity Performance
      • Export Entity
      • Implements IClickable
      • Implements ICollidable
      • Implements IDamageArea
      • Implements IDrawableBatch
      • Implements IGumCollidable
      • Implements IVisible
      • Implements IWindow
        • SlideOnClick
      • Import Entity
      • Inheriting from FlatRedBall Types
      • LayerProvidedByContainer
      • MoveToLayer
      • PooledByFactory
      • Top Down Movement
        • TopDownSpeedMultiplier
      • Use Global Content
    • Events
      • ResolutionRrOrientationChanged
    • Factories
      • CreateNew
      • EntitySpawned
      • Initialize
      • SortAxis
    • Files
      • File Types
        • Animation Chain List (.achx)
        • Comma Separated Values (.csv)
          • Combining .csvs With Entities
          • CreatesDictionary
          • Cross Referencing CSVs
          • Instantiating Custom Types
          • OrderedList
          • SetCreatedClass
            • generate-data-class
          • uniformrowtype
        • Effect (.fx, .fxb)
        • Font (.fnt)
        • JSON (.json)
        • Model (.fbx)
        • MP3
        • Node Network (.nntx)
        • OpenDocument Spreadsheet (.ods)
        • ShapeCollections (.shcx)
        • SplineList (.splx)
        • Texture2D (.png)
        • Wave (.wav)
      • Accessing Files in Code
      • Adding File Objects to Managers
      • Destroy on Unload
      • File Build Tool
      • Folders
      • Global Content Files
      • IsDatabaseForLocalizing
      • IsManuallyUpdated
      • IncludeDirectoryRelativeToContainer
      • LoadedAtRuntime
      • LoadedOnlyWhenReferenced
      • Name
      • Platform Inclusions
      • Project Specific Files
      • RuntimeType
      • SourceFile
      • UseContentPipeline
      • Wildcard Files
    • FileVersion (.gluj)
    • Generated Code
    • Global Content Files
      • LoadAsynchronously
      • Reload
      • Setting Files At Runtime
    • Live Edit
      • Render Targets
    • Menu
      • Content
        • Additional Content
          • Using Runtime Types as Objects
          • creating-runtime-objects
          • runtime-object-charateristics
          • simple-line-of-text-tutorial
        • Introduction
        • pipeline-settings
      • File
        • New Project
      • Edit
        • Find File References
      • Plugins
        • Install Plugin
        • Manage Plugins
      • Project
        • View Projects
      • Settings
        • Camera Settings
        • File Associations
        • File Build Tools
        • Performance Settings
      • Update
        • Introduction
        • glue-reference-menu-frbdk
        • glue-reference-menu-libraries
    • Multi-Platform
      • Synced Projects
      • Changing Main Project Type
      • Android
        • Distribution
        • Setup
      • iOS
        • Certificates and Profiles
        • Copying Projects to Mac
        • Using Xamarin Build Host
      • Switch (Nintendo)
      • Web
    • Objects
      • Object Types
        • AxisAlignedRectangle
        • Camera
        • CameraControllingEntity
        • Circle
        • CollisionRelationship
        • Layer
          • DestinationRectangle
          • Is2D
        • Polygon
        • PositionedObjectList
        • RenderTarget2D
        • ShapeCollection
        • SoundEffectInstance
        • Sprite
        • Text
        • TileNodeNetwork
      • AddToManagers
      • AttachToCamera
      • AttachToContainer
      • CallActivity
      • Collidable Objects
      • EntireFile
      • ExposedInDerived
      • HasPublicProperty
      • IgnoresPausing
      • IncludeInIClickable
      • IncludeInICollidable
      • IsContainer
      • LayerOn
      • Map
      • SetByDerived
      • SourceFile
      • SourceType
    • Plugins
      • glue-gluevault-component-pages-rendertargetrenderer
      • glue-gluevault-component-pages-simple-command-console
      • glue-gluevault-component-pages-squid-gui-integration
      • kalldrexx-interactive-debugging-console
    • Profiling
    • Screens
      • AsyncLoadingState
      • BaseScreen
      • Constructor
      • Creating a New Screen
      • CustomDestroy
      • CustomInitialize
      • DefaultLayer
      • GameScreen
      • IsActivityFinished
      • IsLoadingScreen
      • LoadStaticContent
      • MoveToScreen
      • PauseAdjustedCurrentTime
      • Set as StartUp Screen
      • UnloadsContentManagerWhenDestroyed
    • States
      • InterpolateToState
      • InterpolateToState vs InterpolateBetween
      • State Categories
      • State Classes
      • States and Inheritance
      • Tunneling Category Variables
    • Variables
      • CreatesEvent
      • HasAccompanyingVelocityProperty
      • IsShared
      • Proper Variable Naming
      • SetByDerived
      • Type
      • Variable Order
    • Visual Studio Project (.csproj)
  • 🏃Animation Editor
    • Frame Time
    • Animation Shapes and Collision
  • Tiled
    • Tiled Basics
      • Introduction
      • Creating a GameScreen
      • Adding Collision
      • Colliding Entities Against TileShapeCollections
      • Working with Multiple Levels
      • Creating Entities from Tiles
      • Creating Entities from Object Layers
      • Accessing Tiled Properties
      • Working with Tiled Shapes
    • Tiled Files in Entities
    • TileEntityInstantiator
    • Using TiledObjects.Generated.xml
    • LayeredTileMap
      • Collisions
      • Destroy
      • FromTiledMapSave
      • Z
    • MapDrawableBatch
      • AddTile
      • CoordinateAdjustment
      • GetBottomLeftWorldCoordinateForOrderedTile
      • MergeOntoThis
      • NamedTileOrderedIndexes
      • PaintTile
      • PaintTileTextureCoordinates
      • ParallaxX
      • Paste
      • Properties
      • RemoveQuads
      • RenderingScale
      • SortAxis
    • TiledMapSave
    • TileShapeCollection
      • AddCollisionAtWorld
      • AddCollisionFrom
      • AddCollisionFromTilesWithProperty
      • AddMergedCollisionFromLayer
      • AddMergedCollisionFromTilesWithProperty
      • AdjustRepositionDirectionsOnAddAndRemove
      • CollideAgainst
      • CollideAgainstClosest
      • GetRectangleAtPosition
      • InsertCollidables
      • LastCollisionAxisAlignedRectangles
      • Rectangles
      • RemoveFromManagers
      • RemoveSurroundedCollision
  • 🟩Gum
    • Tutorials
      • Introduction and Setup
      • Screens in Gum
      • Gum Objects in Code
      • Events on Gum Objects
      • Events on Gum Objects Part 2
      • Exposed Variables
      • States
      • Adding Code to Gum Objects
    • Accessing Gum Screens in Code
    • Adding Components to Layers
    • Adding Gum Screens to FlatRedBall
    • Animations in Code
    • Components in FlatRedBall Entities
    • Converting Gum Coordinates
    • Creating Components in Code
    • GraphicalUiElement as IWindow
    • Gum Resolution
    • Gum Properties Tab
    • Gum Animations
      • How to Play Gum Screen Animations
      • Named Events
      • Setting Gum Animationchain Achx in Code
  • 🦴Spine
    • Setup
    • Atlas
    • Changing Spine Textures at Runtime
    • SpineDrawableBatch
      • Event
      • PlayAnimation
      • SetCollision
      • Skeleton
  • ⏸️Aseprite
    • AnimationChainList
  • 🏫API Documentation
    • FlatRedBall Engine
      • AI
        • LineOfSight
          • VisibilityGrid
        • Pathfinding
          • PositionedNode
          • Link
            • Cost
            • NodeLinkingTo
          • NodeNetwork
            • GetPath
            • UpdateShapes
            • Visible
          • TileNodeNetwork
            • AddAndLinkTiledNode
            • AddAndLinkTiledNodeWorld
            • OccupyTileWorld
            • SetCosts
      • Audio
        • AudioManager
          • AreSoundEffectsEnabled
          • CurrentlyPlayingSong
          • MasterSongVolume
          • MasterSoundVolume
          • Play
          • PlaySong
          • PlaySongs
          • StopSong
        • PositionedSound
        • Sound
      • Camera
        • AbsoluteRightXEdge
        • AbsoluteRightXEdgeAt
        • AddLayer
        • AddSpriteToBillboard
        • AspectRatio
        • AttachTo
        • BackgroundColor
        • CameraCullMode
        • ClearMinimumsAndMaximums
        • ClearsDepthBuffer
        • DestinationRectangle
        • DrawsShapes
        • DrawsToScreen
        • DrawsWorld
        • FarClipPlane
        • FieldOfView
        • FixAspectRatioYConstant
        • ForceUpdateDependencies
        • GetViewport
        • IsSpriteInView
        • KeepSpriteInScreen
        • Layer
        • Layers
        • Main
        • MaximumX
        • Orthogonal
        • OrthogonalHeight
        • OrthogonalWidth
        • PixelsPerUnitAt
        • Position
        • PositionRandomlyInView
        • RelativeXEdgeAt
        • RemoveLayer
        • RotationMatrix
        • SetBordersAtZ
        • SetLookAtRotationMatrix
        • SetSplitScreenViewport
        • UpdateViewProjectionMatrix
        • UpVector
        • UsePixelCoordinates
        • UsePixelCoordinates3D
        • View
      • Content
        • ContentLoadBatch
        • AnimationChain
          • AnimationChainListSave
        • ContentManager
          • AddUnloadMethod
          • FileAliases
          • IsAssetLoadedByName
          • Load
          • LoadFromGlobalIfExists
          • Multiple Content Managers
        • Math
          • Geometry
            • ShapeCollectionSave
        • Polygon
          • PolygonSave
        • Scene
          • CameraSave
          • SceneSave
        • SpriteEditorScene
          • Camera
      • Debugging
        • Debugger
          • CommandLineWrite
          • GetFullPerformanceInformation
          • TextBlue
          • WriteAutomaticallyUpdatedObjectInformation
      • Entities
        • CameraControllingEntity
        • IDamageable
        • IDamageArea
      • FlatRedBallServices
        • AddDisposable
        • AddManager
        • CornerGrabbingResize
        • Draw
        • ForceClientSizeUpdates
        • Game
        • GetManagerInformation
        • GlobalContentManager
        • GraphicsOptions
        • Initialize
        • IsLoaded
        • Load
        • Owner
        • Random
        • RenderAll
        • Unload
        • Update
        • WindowHandle
      • Graphics
        • Animation
          • AnimationChain
            • Clone
            • FrameToFrame
            • TotalLength
          • AnimationChainList
          • AnimationController
          • AnimationFrame
            • RelativeX
            • ShapeCollectionSave
            • Texture
          • IAnimationChainAnimatable
            • Animate
            • Animation and Timing
            • AnimationChains
            • AnimationSpeed
            • CurrentChainName
            • CurrentFrameIndex
            • JustChangedFrame
            • JustCycled
            • UseAnimationRelativePosition
        • BitmapFont
          • BMFC File
          • BitmapCharacterInfo
          • FNT File
          • Glyphs
          • LineHeightInPixels
          • RenderToTexture2D
        • BlendOperation
        • ColorOperation
          • Add
          • Color
          • ColorTextureAlpha
          • InterpolateColor
          • Modulate
          • Texture
        • GraphicsOptions
          • Filtering
          • IsFullScreen
          • ResolutionHeight
          • SetFullScreen
          • SetResolution
          • SizeOrOrientationChanged
          • TextureFilter
          • TextureLoadingColorKey
          • UseMultisampling
        • IColorable
          • Alpha
          • BlendOperation
          • Blue
          • ColorOperation
        • IDrawableBatch
          • Z
          • RenderState
        • IVisible
          • IgnoresParentVisibility
        • Layer
          • Layer Membership Details
          • LayerCameraSettings
          • Remove
          • RenderTarget
          • SortType
          • Sprites
          • UsePixelCoordinates
        • LayerCameraSettings
          • OrthogonalWidth
          • TopDestination
        • Particle
          • EmissionSettings
            • Drag
            • PixelSize
            • ScaleX
          • Emitter
        • PostProcessing
          • SwapChain
        • RenderBreak
        • Renderer
          • Draw
          • LastFrameRenderBreakList
          • RenderBreaksAllocatedThisFrame
        • Text
          • AdjustPositionForPixelPerfectDrawing
          • ColorOperation
          • DisplayText
          • GetWidth
          • Font
          • HorizontalAlignment
          • InsertNewLines
          • MaxWidth
          • MaxWidthBehavior
          • NewLineDistance
          • NumberOfLines
          • ScaleX
          • SetColor
          • SetPixelPerfectScale
          • VerticalAlignment
          • Width
        • TextManager
          • AddManuallyUpdated
          • AddText
          • AddToLayer
          • FilterTexts
          • RemoveText
        • Texture
          • RenderTargetSprite
          • ImageData
            • ApplyColorOperation
            • Fill
            • FromTexture2D
      • Gui
        • Cursor
          • Camera
          • ClickNoSlideThreshold
          • CustomUpdate
          • GetRay
          • IngnoreInputThisFrame
          • IsInWindow
          • IsOn
          • IsOn3d
          • PrimaryClick
          • PrimaryClickNoSlide
          • PrimaryPushTime
          • ScreenX
          • SecondaryClick
          • SetControllingGamepad
          • SetJoystickControl
          • TransformationMatrix
          • WindowOver
          • WidowPushed
          • WorldPosition
          • WorldX
          • WorldXAt
          • WorldYAt
          • XForUi
        • GuiManager
          • AddDominantWindow
          • BringsClickedWindowsToFront
          • BringToFront
          • GamepadsForUiControl
          • MakeRegularWindow
          • RemoveWindow
          • SortZAndLayerBased
          • Windows
        • IClickable
        • IInputReceiver
          • IWindow
            • CallClick
            • Enabled
          • ReceiveInput
      • Input
        • AnalogButton
        • AnalogStick
          • IsMaxPositionNormalized
        • DelegateBased1DInput
        • DelegateBased2DInput
        • DelegateBasedPressableInput
        • I1DInput
        • I2DInput
        • IMouseOver
        • InputDeviceBase
        • InputManager
          • ClearAllInput
          • InputReceiver
        • IPressableInput
        • Keyboard
          • Clear
          • ControlPositionedObject
          • Get2DInput
          • GetKey
          • GetStringTyped
          • IgnoreKeyForOneFrame
          • KeyDown
          • KeyPushed
        • Mouse
          • GrabbedPositionedObject
          • IsOn3D
          • ModifyMouseState
          • Restricting Mouse to Screen Bounds
          • SetScreenPosition
        • TouchScreen
          • LastFrameGestures
          • ReadsGestures
        • Windows
          • WindowsInputEventManager
        • Xbox360GamePad
          • ButtonDown
          • ButtonMap
          • ButtonPosition vs Button
          • ButtonPushed
          • ControlPositionedObject
          • CreateDefaultButtonMap
          • Deadzone
          • DeadzoneType
          • FakeIsConnected
          • GamepadLayout
          • IgnoreButtonForOneFrame
      • Instructions
        • DelegateInstruction
        • IInstructable
          • Call
          • Cnstructions
          • Set
        • Instruction
        • InstructionList
          • ExecuteAndRemoveOrCyclePassedInstructions
        • InstructionManager
          • Add
          • AddSafe
          • Instructions
          • MoveThrough
          • MoveTo
          • MoveToAccurate
          • ObjectsIgnoringPausing
          • PauseEngine
          • Pulse
          • RotateToAccurate
        • Reflection
          • LateBinder
          • PropertyCollection
        • MethodInstruction
        • StaticMethodInstruction
      • IO
        • Csv
          • CsvHeader
          • CsvFilemanager
            • Cells with Multiple Lines
            • Color
            • CsvDeserializelist
            • Rows with Lists
          • RuntimeCsvRepresentation
            • FromList
            • GenerateCsvString
        • FileManager
          • BinarySerialize
          • CloneObject
          • FromFileText
          • GetAllFilesInDirectory
          • GetUserFolder
          • InitializeUserFolder
          • RelativeDirectory
          • SaveEmbeddedResource
          • SaveText
          • Standardize
          • UserApplicationDataForThisApplication
          • XmlDeserialize
          • XmlSerialize
      • Localization
        • LocalizationManager
      • Managers
        • IManager
      • Math
        • IAttachableRemovable
        • AttachableList
          • FindByName
          • MakeOneWay
        • Collision
          • CollisionManager
            • Relationships
            • Update
        • Geometry
          • AxisAlignedCube
            • CollideAgainstBounce
          • AxisAlignedRectangle
            • Axis Alignment And Rotation
            • CollideAgainstMoveSoft
            • Color
            • GetRandomPositionInThis
            • KeepThisInsideOf
            • LastMoveCollisionReposition
            • Left
            • RepositionDirections
          • Capsule2D
          • Circle
            • CollideAgainst
            • CollideAgainstBounce
            • CollideAgainstMove
            • IsPointInside
            • LastCollisionTangent
            • LastMoveCollisionReposition
            • ProjectParentVelocityOnLastMoveCollisionTangent
            • Visible
            • Z
          • Colliding a List of Shapes Against Itself
          • FloatRectangle
          • ICollidable
          • IScalable
            • Scale
          • Line
            • Color
            • LastCollisionPoint
            • RelativePoint1
            • SetFromAbsoluteEndpoints
          • Point
          • Polygon
            • AbsolutePointPosition
            • Clone
            • CollideAgainstBounce
            • CollideAgainstMove and Attachments
            • CollideAgainstMove
            • Color
            • CreateEquilateral
            • CreateRectangle
            • ForceUpdateDependencies
            • IsPointInside
            • LastMoveCollisionReposition
            • OptimizeRadius
            • Points
            • Position
            • ProjectParentVelocityOnLastMoveCollisionTangent
            • ScaleBy
            • Thin Polygon Problem
            • VectorFrom
            • Visible
            • Z
          • Segment
            • ClosestPointTo
          • Shape
          • ShapeCollection
            • AttachTo
            • AxisAlignedRectangles
            • CollideAgainst
            • CollideAgainstBounceWithoutSnag
            • CollideAgainstMove
            • CollideAgainstMoveWithoutSnag
            • LastCollisionAxisAlignedRectangles
            • SortAscending
            • Visible
          • ShapeManager
            • AddToLayer
            • Remove
            • ShapeDrawingOrder
          • ShapeMerger
          • Shapes and 2D Collision
          • Sphere
        • IAttachable
          • Attachment Updates in the Engine
          • Detach
          • ParentRotationChangesPosition
          • ParentRotationChangesRotation
          • TopParent
        • IRotatable
          • RotationMatrix
        • MathFunctions
          • AbsoluteToWindow
          • AngleToAngle
          • AngleToVector
          • GetPointInCircle
          • GetPositionAfterTime
          • RegulatAngle
          • RotatePointAroundPoint
          • RoundFloat
          • RoundToInt
          • WidowToAbsolute
        • Paths
          • Path
        • PositionedObjectList
          • Add
          • AttachTo
          • Clear
          • GetFirstAfter
          • GetFirstAfterPosition
          • SortXInsertionAscending
        • Splines
          • Spline
            • GetPositionAtLengthAlongSpline
      • Performance
        • Measurement
          • Section
            • GetAndStartContextAndTime
            • Save
            • ToStringVerbose
      • PositionedObject
        • Acceleration
        • AttachTo
        • Children
        • Clone
        • Drag
        • ForceUpdatedependencies
        • ForceUpdatedependenciesDeep
        • Initialize
        • KeepTrackOfReal
        • LastPosition
        • Mirrored properties
        • ParentRotationChangesPosition
        • ParentRotationChangesRotation
        • Position
        • RelativePosition
        • RelativeRotationZ
        • RelativeVelocity
        • RemoveSelfFromListsBelongingTo
        • RotationZ
        • SetRelativeFromAbsolute
        • TimedActivity
        • TopParent
        • UpdateDependencies
        • Velocity
        • Z
      • Screens
        • Screen
          • ContentManagerName
          • CustomDestroy
          • IsActivityFinished
          • MoveToScreen
          • PauseThisScreen
        • ScreenManager
          • Activity
          • CurrentScreen
          • Start
      • Sprite
        • Alpha
        • AnimateSelf
        • AnimationChains
        • AnimationSpeed
        • Bottom
        • BottomTextureCoordinate
        • Changing a Sprite's Origin
        • ColorOperation
        • CurrentChainName
        • CurrentFrameIndex
        • IgnoreAnimationChainTextureFlip
        • Inheriting from the Sprite Class
        • JustCycled
        • LeftTextureCoordinate
        • PixelSize
        • Position
        • RightTextureCoordinate
        • SetAnimationChain
        • SetScaleXRatioToY
        • Sorting and Overlapping
        • Sprite vs Texture2d
        • Texture Coordinates
        • Texture
        • TextureAddressMode
        • TextureCoordinate
        • TextureFilter
        • TextureScale
        • TimeIntoAnimation
        • TopTextureCoordinate
        • UseAnimationRelativePosition
        • Vertices
        • VerticesForDrawing
        • Visible
      • SpriteList
      • SpriteManager
        • AddDrawableBatch
        • AddManagedInvisibleSprite
        • AddManualSprite
        • AddParticleSprite
        • AddPositionedObject
        • AddSprite
        • AddToLayer
        • AddZBufferedDrawableBatch
        • AddZBufferedSprite
        • AutomaticallyUpdatedSprites
        • Camera
        • ConvertToAutomaticallyUpdated
        • ConvertToManagedInvisible
        • ConvertToManuallyUpdated
        • ConvertToZBufferedSprite
        • DrawableBatches
        • ManagedPositionedObjects
        • ManualUpdate
        • MaxParticleCount
        • MoveToBack
        • OrderedSortType
          • Z
        • OrderedSprites
        • RemoveDrawableBatch
        • RemoveLayer
        • RemovePositionedObject
        • RemoveSprite
        • RemoveSpriteOneWay
        • SortTexturesSecondary
        • SortYSpritesSecondary
        • UnderAllDrawnLayer
      • TimeManager
        • Accumulating Time
        • CurrentScreenSecondsSince
        • CurrentTime
        • Profiling
        • SecondDifference
        • SecondsSince
        • SumTimeSection
        • SystemCurrentTime
        • TimeFactor
        • Working with TimeSpan
      • Utilities
        • StringFunctions
    • FlatRedBall.Forms
      • Controls
        • Button
        • CheckBox
        • ComboBox
        • FrameworkElement
          • DefaultFormsComponents
          • HandleTab
          • Show
          • Visual
        • Games
          • DialogBox
          • OnScreenKeyboard
          • SettingsView
        • ListBox
        • ListBoxItem
        • RadioButton
        • ScrollBar
        • ScrollViewer
        • Slider
        • StackPanel
        • TextBox
        • TreeView
        • TreeViewItem
      • MVVM
        • DependsOnAttribute
    • FlatRedBall Editor Plugin
      • customvariable
      • Introduction
      • flatredball-glue-elements-objectfinder
      • flatredball-glue-guidisplay-propertygriddisplayer
      • Introduction
      • flatredball-glue-projectmanager
      • Introduction
      • flatredball-glue-saveclasses-namedobjectsave
      • flatredball-glue-saveclasses-referencedfilesave
      • flatredball-glue
        • plugins
          • flatredball-glue-exportedinterfaces-igluestate
          • flatredball-glue-exportedinterfaces-igluxcommands-addreferencedfiletoglobalcontent
          • flatredball-glue-exportedinterfaces-igluxcommands
          • Introduction
          • flatredball-glue-exportedinterfaces-iprojectcommands-makeabsolute
          • flatredball-glue-exportedinterfaces-iprojectcommands
          • flatredball-glue-interfaces-icodegeneratorplugin
          • flatredball-glue-interfaces-imenustripplugin
          • Introduction
          • flatredball-glue-pluginbase-getfilesreferencedby
          • flatredball-glue-pluginbase
          • Introduction
        • vshelpers
          • codebuilditemadder
    • FlatRedBall Editor (Glue)
      • AssetTypeInfo
      • Cleaning Up Screens
      • CodeGeneration
        • ICodeBlock
      • CustomActivity
      • CustomLoadStaticContent
      • Entity
        • Introduction
        • glue-reference-entities-destroy
      • Game1CodeGenerator
      • GetFile
      • PauseThisScreen
      • SaveClasses
        • GlueSettingsSave
      • Screen
        • glue-reference-screens-pauseadjustedsecondssince
    • Live Edit
      • EditorVisuals
        • Circle
        • Text
      • Instance Creation
    • Gum Runtime
      • GraphicalUiElement
        • GetAbsoluteLeft
        • GetGraphicalUiElementByName
        • HasCursorover
        • InterpolateBetween
        • InterpolateTo
        • MoveToFrbLayer
        • RaiseChildrenEventsOutsideOfBounds
        • SetProperty
        • ShowLineRectangles
        • TestCollision
      • RenderingLibrary
        • camera
        • ipositionedsizedobject
        • graphics
          • Layer
          • text
            • textrenderingmode
    • iOS
      • uikit-uiviewcontroller
    • Microsoft.Xna.Framework
      • Audio
        • SoundEffect
        • SoundEffectInstance
      • Color
      • Introduction
      • Game
        • IsActive
        • IsFixedTimeStep
        • IsMouseVisible
        • TargetElapsedTime
      • GameWindow
        • Introduction
        • Introduction
        • handle
      • Graphics
        • Shared Parameters
        • model
        • spritebatch
        • GraphicsDevice
          • renderstate
          • SetRenderTarget
        • renderstate
          • referencealpha
        • Texture2D
          • Creating New Textures Programatically
      • GraphicsDeviceManager
        • supportedorientations
      • Media
        • MediaPlayer
        • Song
          • FromUri
      • Vector3
    • NAudio
      • NAudio_Song
    • SkiaGum
      • SkiaSpriteCanvas
      • Renderables
        • RenderableSkiaObject
    • State Interpolation
      • Tween
      • Tweener
      • TweenerManager
  • 🏘️Contributing
    • How to Contribute
    • Builds (Releases)
      • Gum
    • Writing Documentation
    • Contributing Code (Pull Requests)
    • Automated Test Project
    • Programming Style Guide
  • 🎮FlatRedBall Games
    • angry-boy
    • avatar-skate
    • avatar-word-wave
    • bobble-biker
    • box-the-gopher
    • cargo-crush
    • combo-red-moon-rising
    • cubism
    • eat-my-shuriken-and-die
    • elemento
    • food-battler
    • free-towels
    • gravi-dot
    • hyperdodge
    • juice-factory
    • operation-sd-space-defense
    • picture-puzzle-revolution
    • prismatic
    • quarantine
    • quest-for-freshness
    • star-stepper
    • steambirds
    • sticky-bump
    • tile-trip
    • trashman
    • tumble-heads
    • udder-chaos
    • without-escape
    • games-oniro
  • 🔴FlatRedBall Logo
  • Installing XNA in Visual Studio 2017
Powered by GitBook
On this page
  • Registering Commands
  • Registering Command Aliases
  • Registering Helps
  • Registering Help Aliases
  • Customization
  • In Game Usage
  • Special Keys
  • Additional Notes
  • Can I use this in a commercial project?
  • Who do I contact?

Was this helpful?

Edit on GitHub
Export as PDF
  1. FlatRedBall Editor
  2. Plugins

glue-gluevault-component-pages-simple-command-console

The simple command console provides an easy to use dos-style command parser featuring commands, helps, and aliases.

The simple command console is ready to go right out of the box. Simply import the entity into your project, and add it to your screen. Then use the described public methods to add new commands, helps or aliases.

Registering Commands

void RegisterCommand(string name, string helpText, CommandTarget target)

This method is used to register a command. This defines the command and indicates what method should be called when the command is entered.

name is a string that represents the command to be typed. This can not contain any white space characters, as the command parser stops at the first white space when looking for a command to parse.

helpText is a string to be displayed to the screen if the user types "help name". This should describe how to use the command.

target is a delegate provided by the entity and is defined as:

public delegate void CommandTarget(string args);

The CommandTarget is the function to be called when this command is typed. If the user types anything after the command, the entirety of the line after the command is passed to the function as a single string. For instance, if the the command is "list" and the user types "list all my houses" then when the function is called it will be passed "all my houses" in the args variable.

Registering Command Aliases

void RegisterCommandAlias(string alias, string commandName)

This method allows you to register an alias for a previously registered command. An alias is another keyword that can be used instead of the commands name.

alias is a string that represents the new name of the command.

commandName is the name of the command to create an alias for.

Registering Helps

void RegisterHelp(string name, string helpText)

This method allows you to register help text that is not associated with a command. This should not be used to register helps for commands, as that help should be registered with the command itself.

name is a string that the user will type after the help command to retrieve this help entry.

helpText is a string that will be displayed to the screen when the user requests this help entry.

Registering Help Aliases

void RegisterHelpAlias(string alias, string helpName)

This method allows you to register an alias for a previously registered help entry. An alias is another keyword that can be used instead of the help entry's name.

alias is a string that represents the new name of the help entry.

helpName is the name of the original help entry to create an alias for.

Customization

The console window display can be customized using the various variables that have been exposed.

  • X,Y : sets the bottom left corner of the console window

  • Z : sets the z-buffer of the display so it can show up over other sprites

  • NumOutputLines : The number of output lines visible in full display mode

  • NumCharOnLine : The number of characters allowed on each line

  • CursorBlinkRate : How fast the cursor should blink, smaller number is faster blink

  • FullDisplay : if the console is currently in full display mode

  • NumLinesInPartialDisplay : how many lines should be shown while in partial display mode

  • InputHistoryLength : how many different inputs should it remember at once

  • BackBufferHistoryLength : the total number of lines to be stored in the backbuffer

In Game Usage

To issue a command in the game, type the command preceeded by a forward slash. For instance "/reset me" will call the function registered with the "reset" command, passing the argument of "me".

If you type your command without a forward slash like "reset me" the console will look to see if there is a "say" command registered, if so it will call the function registered with the "say" command and pass it the entirety of the typed input. This is the equivalent as if you typed "/say reset me". If no say command is registered, the console will tell the user that it did not recognize the command or keyword.

To get help on a topic or a command you can type "/help" followed by the topic or command that you want help on. For instance, if you wanted help on the "reset" command, you would type "/help reset", this same is true for non-command help.

If the command entered does not exist, the console will display a simple message saying that the command does not exist.

When in full mode, the console reads all input from the pc keyboard, and aside from certain special keys, all input is fed to the console display.

Special Keys

When in full display mode, the console watches for certain special keys that perform certain operations.

Key
Operation
Mode

Tilde (~)

Toggle console between Full and Mini modes

Full / Mini

Page Up

Scrolls back-buffer up one page

Full

Page Down

Scrolls back-buffer down one page

Full

Home

Scrolls all the way to the top of the back-buffer

Full

End

Scrolls all the way to the end of the back-buffer

Full

Up Arrow

Scroll up one command in the input history

Full

Down Arrow

Scroll down one command in the input history

Full

Additional Notes

  • If the output display is too wide for the console's settings, it will auto-wrap the output to the last available space between characters.

  • The console currently only accepts input from InputManager.Keyboard

  • The console is currently only built for Windows PC, inputs from other devices may or may not be recognized.

  • Internally, there is no difference between a command help or a non-command help. Once registered all help topics are stored by keyword and display text only.

Can I use this in a commercial project?

Flat Red Ball is kind of an open source oriented community. I am following suit by releasing this as open source under the MIT license. As such, you don't have very many limitations on how you can use this.

Who do I contact?

Did you find a bug? Do you have a suggestion for improvement? Or maybe you'd just like to let me know you are using it or provide other feedback? In any case, you can easily find me in the community or on chat as Magius96.

Previousglue-gluevault-component-pages-rendertargetrendererNextglue-gluevault-component-pages-squid-gui-integration

Last updated 1 year ago

Was this helpful?

If you are really interested in reading the specific license that I've applied to this, then go .

📐
here