Home

GameFramework

Game framework

Operations

New

Initializes game framework

New(screen_width:Int, screen_height:Int, title:String, fps:Int, init_flags:Int)
Parameters
NameTypeDescription
screen_widthIntscreen width
screen_heightIntscreen height
titleStringscreen title
fpsIntframe per second
init_flagsIntinitialization flags

Initializes game framework

New(screen_width:Int, screen_height:Int, title:String)
Parameters
NameTypeDescription
screen_widthIntscreen width
screen_heightIntscreen height
titleStringscreen title

AddAnimatedImageSprite

Adds an image sprite to the framework

method : public : AddAnimatedImageSprite(file:String, clips:Vector) ~ AnimatedImageSprite
Parameters
NameTypeDescription
fileStringfile path to image asset
clipsVectorvector of rendering rectangles

Return
TypeDescription
AnimatedImageSpriteanimated image sprite

Adds an image sprite to the framework

method : public : AddAnimatedImageSprite(file:String) ~ AnimatedImageSprite
Parameters
NameTypeDescription
fileStringfile path to image asset

Return
TypeDescription
AnimatedImageSpriteanimated image sprite

AddImageSprite

Adds an image sprite to the framework

method : public : AddImageSprite(file:String, colorkey:Color, render_rect:Rect) ~ ImageSprite
Parameters
NameTypeDescription
fileStringfile path to image asset
colorkeyColorimage color key
render_rectRectbounding rectangle to render

Return
TypeDescription
ImageSpriteimage sprite

Adds an image sprite to the framework

method : public : AddImageSprite(file:String, colorkey:Color) ~ ImageSprite
Parameters
NameTypeDescription
fileStringfile path to image asset
colorkeyColorimage color key, may be Nil

Return
TypeDescription
ImageSpriteimage sprite

Adds an image sprite to the framework

method : public : AddImageSprite(file:String) ~ ImageSprite
Parameters
NameTypeDescription
fileStringfile path to image asset

Return
TypeDescription
ImageSpriteimage sprite

AddRectangle

Adds a rectangle to the framework

method : public : AddRectangle(w:Int, h:Int) ~ Rectangle
Parameters
NameTypeDescription
wIntrectangle width
hIntrectangle height

Return
TypeDescription
Rectanglerectangle

AddTextSprite

Adds a text sprite to the framework

method : public : AddTextSprite() ~ TextSprite
Return
TypeDescription
TextSpritetext sprite

AddTitledImageSprite

Adds an tiled image to the framework

method : public : AddTitledImageSprite(file:String, colorkey:Color) ~ TitledImageSprite
Parameters
NameTypeDescription
fileStringfile path to image asset
colorkeyColorimage color key, may be Nil

Return
TypeDescription
TitledImageSpritetiled image

Clear

Clears the scene

method : public : Clear() ~ Nil

Debug

Prints debug message

function : public : Debug(debug_msg:String) ~ Nil
Parameters
NameTypeDescription
debug_msgStringmessage

FrameEnd

Sets the end frame

method : public : FrameEnd() ~ Nil

FrameStart

Sets the start frame

method : public : FrameStart() ~ Nil

FreeShapes

Removes all shapes

method : public : FreeShapes() ~ Nil

GetClearColor

Gets the clear color

method : public : GetClearColor() ~ Color
Return
TypeDescription
Colorclear color

GetEvent

Gets the framework event

method : public : GetEvent() ~ Event
Return
TypeDescription
Eventframework event

GetFps

Gets the frame per second

method : public : GetFps() ~ Int

GetRenderer

Gets the framework renderer

method : public : GetRenderer() ~ Renderer
Return
TypeDescription
Rendererframework renderer

IsOk

Initialization status flag

method : public : IsOk() ~ Bool
Return
TypeDescription
Booltrue if initialized, false otherwise

Quit

Closes the framework

method : public : Quit() ~ Nil

RemoveSprite

Remove shape from framework

method : public : RemoveSprite(shape:Shape) ~ Bool
Parameters
NameTypeDescription
shapeShapeshape to remove

Return
TypeDescription
Booltrue if successful, false otherwise

SetClearColor

Sets the clear color

method : public : SetClearColor(color:Color) ~ Nil
Parameters
NameTypeDescription
colorColorclear color

SetFont

Sets the game font

method : public : SetFont(font:Font) ~ Nil
Parameters
NameTypeDescription
fontFontgame font

Show

Shows the scene

method : public : Show() ~ Nil