2D Graphics
box ( x, y, width, height, colour, outline )
centreSpriteCamera ( pos )
centreSpriteCamera ( xpos, ypos )
circle ( x, y, radius, vertices, colour, outline )
collideMap ( sprite )
collideMapArea ( areaName, sprite )
result = collideSprites ( spriteA, spriteB, resolve1, resolve2 )
handle = copyImage ( imageHandle, source )
copyShape ( shape )
createBox ( x, y, width, height )
createCircle ( x, y, radius, vertices )
createCurve ( point1, point2, ... pointN )
createCurve ( points )
handle = createImage ( width, height, filter, type )
createLine ( x1, y1, x2, y2 )
createLineStrip ( point1, point2, ... pointN )
createLineStrip ( points )
createPoly ( point1, point2, ... pointN )
createPoly ( points )
handle = createSprite ()
createStar ( x, y, innerRadius, outerRadius, numPoints )
createTriangle ( x1, y1, x2, y2, x3, y3 )
deleteShape ( shape )
result = deltaTime ()
result = detectMapAreaCollision ( areaName, sprite )
result = detectMapCollision ( sprite )
result = detectSpriteCollision ( spriteA, spriteB )
drawImage ( handle, x, y )
drawImage ( handle, x, y, scale )
drawImage ( handle, { sourceX, sourceY, sourceW, sourceH }, { x, y, width, height } )
drawImageEx ( handle, location, rotation, scale, tint, origin )
drawMap ()
drawMapLayer ( layer )
drawQuad ( handle, { sourcex, sourcey, sourcew, sourceh }, points, tint )
drawShape ( shape )
drawSheet ( handle, tileno, { xpos, ypos, width, height } )
drawSprite ( sprite )
drawSprites ()
freeImage ( handle )
arrayResult = getMapArea ( areaName )
arrayResult = getMapAreaNames ()
vectorResult = [getMapLocation] (Command Reference/2D Graphics/getMapLocation.md) ( locationName )
arrayResult = [getMapLocationNames] (Command Reference/2D Graphics/getMapLocationNames.md) ()
vectorResult = [getMapSize] (Command Reference/2D Graphics/getMapSize.md) ()
getShapeBounds ( shape )
getShapeLocation ( shape )
getShapeRotation ( shape )
getShapeScale ( shape )
getShapeTint ( shape )
result = getSpriteAnimFrame ( sprite )
result = getSpriteAnimFrameCount ( sprite )
vectorResult = getSpriteAnimSpeed ( sprite )
vectorResult = getSpriteCamera ()
result = getSpriteCameraRotation ()
vectorResult = getSpriteColour ( sprite )
vectorResult = getSpriteColourSpeed ( sprite )
result = getSpriteDepth ( sprite )
handle = getSpriteImage ( sprite )
vectorResult = getSpriteImageSize ( sprite )
vectorResult = getSpriteLocation ( sprite )
vectorResult = getSpriteOrigin ( sprite )
result = getSpriteRotation ( sprite )
result = getSpriteRotationSpeed ( sprite )
vectorResult = getSpriteScale ( sprite )
vectorResult = getSpriteScaleSpeed ( sprite )
vectorResult = getSpriteSize ( sprite )
vectorResult = getSpriteSpeed ( sprite )
result = getSpriteVisibility ( sprite )
getVertex ( shape, vertex )
getVertexColour ( shape, vertex )
getVertexLineColour ( shape, vertex )
getVertexLineThickness ( shape, vertex )
result = imageH ( image )
vectorResult = imageSize ( sprite )
result = imageW ( image )
joinShapes ( shape1, shape2 )
line ( point1, point2, colour )
handle = loadImage ( filename )
handle = loadImage ( filename, filter )
loadMap ( filename )
moveShape ( shape, x, y )
moveShape ( shape, axes )
result = numTiles ( tilesheet )
numVerts ( shape )
plot ( x, y, colour )
removeSprite ( sprite )
renderEffect ( image, target, effect, arguments )
rotateShape ( shape, amount )
scaleShape ( shape, scale )
scaleShape ( shape, dirX, dirY )
setBlend ( mode )
setShapeColour ( shape, colour )
setShapeLineStyle ( shape, thickness, tint )
setShapeLocation ( shape, x, y )
setShapeLocation ( shape, location )
setShapeRotation ( shape, amount )
setShapeScale ( shape, scale )
setShapeScale ( shape, scaleX, scaleY )
setShapeScaleModeLocal ( shape, enabled )
setShapeTint ( shape, tint )
setSpriteAnimation ( sprite, startTile, endTile )
setSpriteAnimation ( sprite, startTile, endTile, speed )
setSpriteAnimFrame ( sprite, frame )
setSpriteAnimSpeed ( sprite, speed )
setSpriteCamera ( pos )
setSpriteCamera ( xpos, ypos )
setSpriteCamera ( xpos, ypos, zpos )
setSpriteCameraRotation ( angle )
setSpriteCollisionShape ( sprite, shape )
setSpriteCollisionShape ( sprite, shape, width, height, rotation )
setSpriteColour ( sprite, colour )
setSpriteColour ( sprite, red, green, blue, alpha )
setSpriteColourSpeed ( sprite, rgbaSpeed )
setSpriteColourSpeed ( sprite, rSpeed, gSpeed, bSpeed, aSpeed )
setSpriteDepth ( sprite, depth )
setSpriteImage ( sprite, image )
setSpriteLocation ( sprite, pos )
setSpriteLocation ( sprite, xpos, ypos )
setSpriteOrigin ( sprite, pos )
setSpriteOrigin ( sprite, xpos, ypos )
setSpriteRotation ( sprite, angle )
setSpriteRotationSpeed ( sprite, rotationSpeed )
setSpriteScale ( sprite, scale )
setSpriteScale ( sprite, { xScale, yScale } )
setSpriteScaleSpeed ( sprite, scaleSpeed )
setSpriteScaleSpeed ( sprite, xScaleSpeed, yScaleSpeed )
setSpriteSpeed ( sprite, speed )
setSpriteSpeed ( sprite, xspeed, yspeed )
setSpriteText ( sprite, fontsize, tint, arguments )
setSpriteVisibility ( sprite, visibility )
setVertex ( shape, vertex, position )
setVertexColour ( shape, vertex, colour )
setVertexLineStyle ( shape, vertex, thickness, tint )
setView ( left, top, right, bottom )
vectorResult = tileSize ( image, tile )
triangle ( point1, point2, point3, colour, outline )
updateMap ()
updateSprite ( sprite )
updateSprite ( sprite, deltatime )
updateSprites ( sprites )
updateSprites ( deltatime )
updateSprites ( sprites, deltatime )
uploadImage ( pixeldata, width, height, filter )
3D Graphics
result = animationLength ( object, animation )
handle = createObjectGroup ( origin )
handle = createTerrain ( gridsize, filter )
drawObjects ()
handle = loadModel ( filename )
result = numAnimations ( object )
result = objectIntersect ( handle1, handle2 )
objectPointAt ( handle, point )
handle = placeObject ( object, location, scale )
handle = pointLight ( position, colour, brightness )
handle = pointShadowLight ( position, colour, brightness )
removeLight ( light )
removeObject ( handle )
rotateObject ( handle, axes, amount )
setAmbientLight ( colour )
setCamera ( location, target )
setEnvironment ( background, tint )
setExposure ( exposure )
setExposure ( exposure, whiteLevel )
setFov ( angle )
setLightBrightness ( light, brightness )
setLightColour ( light, colour )
setLightDir ( light, direction )
setLightPos ( light, position )
setLightSpread ( light, spread )
setObjectCollisionScale ( handle, scale )
setObjectMaterial ( handle, colour, metallic, roughness )
setObjectMaterial ( handle, colour, metallic, roughness, emissivity )
setObjectParent ( objectHandle, groupHandle )
setObjectPos ( handle, pos )
setObjectScale ( handle, scale )
setObjectVisibility ( handle, visibility )
setTerrainPoint ( terrain, xpos, ypos, height, colour )
showObjectBounds ( enabled, colour, thickness )
handle = spotLight ( position, direction, colour, brightness, spread )
unlinkObject ( handle )
updateAnimation ( object, animation, frame )
updateTerrain ( terrain, heights, colours )
handle = worldLight ( direction, colour, brightness )
worldShadowLight ( centre, direction, colour, brightness, range, resolution )
Arithmetic
result = abs ( number )
result = acos ( cosine )
result = asin ( sine )
result = atan ( tangent )
result = atan2 ( x, y )
vectorResult = bezier ( point1, point2, point3, factor )
vectorResult = bezier ( point1, point2, point3, point4, factor )
result = bitCount ( number )
ceil ( number )
result = clamp ( number, minimum, maximum )
result = cos ( angle )
vectorResult = cross ( vector1, vector2 )
result = distance ( point1, point2 )
result = dot ( vector1, vector2 )
result = float ( value )
result = floor ( number )
result = fract ( value )
result = int ( value )
result = length ( vector )
result = lerp ( v0, v1, t )
result = max ( number1, number2 )
result = min ( number1, number2 )
vectorResult = normalize ( vector )
value = pi
result = pow ( number, power )
radians ( enable )
result = random ( range )
vectorResult = reflect ( incident, normal )
vectorResult = refract ( incident, normal, ior )
rnd ( range )
result = round ( value )
result = rsqrt ( number )
result = sin ( angle )
result = sinCos ( angle )
result = smoothStep ( value0, value1, factor )
result = sqrt ( number )
result = tan ( angle )
result = trunc ( value )
Binary
result = bitFieldExtract ( number, start, count )
result = bitFieldInsert ( number, start, count, value )
result = bitGet ( number, bit )
result = bitSet ( number, bit, value )
result = leadingZeroes ( value )
result = trailingZeroes ( value )
File Handling
close ( handle )
open ()
read ( handle, count )
seek ( handle, position )
write ( handle, text )
Input
structure = controls ( index )
result = docked ()
result = getKeyboardBuffer ()
hideKeyboard ()
result = input ( prompt, multiline )
showKeyboard ()
list = touch ()
Screen Display
clear ()
clear ( colour )
result = gHeight ()
result = gWidth ()
setDrawTarget ( target )
setMode ( width, height )
update ()
Sound and Music
result = audioLength ( handle )
status = getChannelStatus ( channel )
handle = loadAudio ( sample )
result = note2Freq ( note )
playAudio ( channel, handle, volume, pan, speed, loops )
playNote ( channel, wave, frequency, volume, speed, pan )
pulseRumble ( controller, channel, speed, volume, frequency )
setClipper ( channel, threshold, strength )
setEnvelope ( channel, speed )
setFilter ( channel, type, cutoff )
setFrequency ( channel, frequency )
setModulator ( channel, wave, frequency, scale )
setPan ( channel, pan )
setReverb ( channel, delay, attenuation )
setRumble ( controller, channel, volume, frequency )
setVolume ( channel, volume )
startChannel ( channel )
stopChannel ( channel )
Text Handling
chr ( number )
chrVal ( string )
cursor ( x, y )
drawText ( x, y, size, colour, values )
ink ( colour )
result = len ( string )
result = len ( array )
print ( values )
printAt ( x, y, values )
str ( int )
str ( float )
result = strBeginsWith ( string, to_find )
result = strContains ( string, to_find )
strEndsWith ( string, to_find )
strFind ( string, to_find )
result = stringHash ( string )
strReplace ( string, to_find, replace )
textSize ( size )
result = textWidth ( text )
result = tHeight ()
result = tWidth ()
Time and Date
structure = clock ()
handle = setTimer ( interval, count, functionName( arguments ) )
sleep ( time )
startTimer ( handle )
stopTimer ( handle )
result = time ()