PureBasic - Sprite

Overview

'Sprites' are well known by game players. These are small pictures, sometimes called 'brushes', which can be displayed at any position on a screen. The sprites can move over graphics using a transparent layer. Even better, PureBasic allows you to perform real time effects like real Shadow, AlphaBlending, RGBFilters, Alpha channel, ... all this in windowed or full screen mode !

As the sprites are very linked to the screen, the screen related functions have been included into the sprite library (it may change later). After initializing the screen and sprite enviroment via InitSprite() you can start opening a full-size or windowed screen.


Windows: DirectX 9 is used for sprite handling which allows your programs to use hardware acceleration if available. Three additional Subsystems are also available, depending of the needs: "OpenGL", "DirectX7" and "NT4"

Linux: SDL (Simple Directmedia Layer) is used to manage the sprites. This allows your programs to use hardware acceleration if available. An additional "OpenGL" Subsystem is also available, which use OpenGL as backend for all sprite and sprite3D functions.

MacOS X: OpenGL is used to manage the sprites which allows to use hardware acceleration.

Command Index

AvailableScreenMemory
CatchSprite
ChangeAlphaIntensity
ChangeGamma
ClearScreen
ClipSprite
CloseScreen
CopySprite
CreateSprite
DisplayAlphaSprite
DisplayRGBFilter
DisplayShadowSprite
DisplaySolidSprite
DisplaySprite
DisplayTranslucentSprite
DisplayTransparentSprite
ExamineScreenModes
FlipBuffers
FreeSprite
GrabSprite
InitSprite
IsScreenActive
IsSprite
LoadSprite
NextScreenMode
OpenScreen
OpenWindowedScreen
SaveSprite
ScreenID
ScreenModeDepth
ScreenModeHeight
ScreenModeRefreshRate
ScreenModeWidth
ScreenOutput
SetFrameRate
SpriteCollision
SpriteDepth
SpriteHeight
SpriteID
SpriteOutput
SpritePixelCollision
SpriteWidth
StartSpecialFX
StopSpecialFX
TransparentSpriteColor
UseBuffer

Example

Sprite.pb
WindowedScreen.pb

Supported OS

All

Reference Manual - Index