A cheat sheet (also cheatsheet) or crib sheet is a concise set of notes used for quick reference.

This will be a “cheatsheet” for AppGameKit: It will be a list of references to common commands and how to do common things

More specific things will be in their respective posts

Window Size

Set size and resolution


SetWindowSize( x, y, 0 )

SetVirtualResolution( x, y )

Get size and resolution


GetVirtualWidth()

GetVirtualHeight()

Text Sprites

Creation and Manipulation


CreateText(id, "Text")

SetTextSize(id, size)

SetTextColor(id, red, green, blue, alpha)

SetTextPosition(id, x, y)

Getting Height and Width


GetTextTotalHeight(id)

GetTextTotalWidth(id)

Image Sprites

Creation


CreateImageColor(id, red, green, blue, alpha)

Importing - Note that the files have to be in the “media” folder


LoadImage(id, "filename")

Initialization and Manipulation


CreateSprite(id, id)

SetSpritePosition(id, x, y)

SetSpriteSize(id, x, y)

// Note that scale is from 0 to 1

SetSpriteScale(id, xScale, yScale)

Input


GetRawKeyState(key) = 1

GetRawKeyPressed(key)

GetRawLastKey()