contents

tutorial
language
library


library

functions by category

date/time

CurrentDate CurrentDir CurrentTime SetTimer Wait

files

GetOpenFileName GetSaveFileName NextFile

graphics

Blit Circle Cls Line LoadPic Paint Point PolyFill Polygon Print PSet
Rect Rgb SetBackColor SetFont SetForeColor SetXY

Input

Input Inputbox KeyPress MouseButton MouseX MouseY Msg

Maths

Abs Cos Power Rnd Sgn Sin Sqr Tan Val

Miscellaneous

End

screen

Refresh ScreenDx ScreenDy ScreenHeight ScreenWidth ScrollScreen SetScreen UpdateScreen

sprites

GetSpriteBounce GetSpriteDx GetSpriteDy GetSpriteHt GetSpriteName GetSpriteOff GetSpritePicNum GetSpriteWd GetSpriteX GetSpriteY LoadSprite MoveSprites SpriteCol SpriteCols SpriteOff spritenumber SetSprite SetSpritedir SetSpritepic

Strings

Mid Asc Chr InStr LCase Left Len LSet Replace Right RSet String Str Trim UCase

sound

LoopSound PauseSound PlaySound StopSound

tiles

LoadMap LoadTiles TileScreen

zones

GetZone SetZone

functions in alphabetical order

Abs Asc
Blit
Chr Circle Cls Cos CurrentDate CurrentDir CurrentTime
End GetOpenFileName GetSaveFileName GetSpriteBounce GetSpriteDx GetSpriteDy GetSpriteHt GetSpriteName GetSpriteOff GetSpritePicNum GetSpriteWd GetSpriteX GetSpriteY GetZone
Input Inputbox InStr
KeyPress LCase Left Len Line LoadPic LoadMap LoadSprite LoadTiles LoopSound LSet
Mid MouseButton MouseX MouseY MoveSprites Msg
NextFile
Paint PauseSound PlaySound Point PolyFill Polygon Power Print PSet
Rect Refresh Replace Rgb Right Rnd RSet
ScreenDx ScreenDy ScreenHeight ScreenWidth ScrollScreen SetBackColor SetFont SetForeColor SetScreen SetSprite SetSpritedir SetSpritepic SetTimer SetXY SetZone SpriteCol SpriteCols SpriteOff spritenumber Sgn Sin Sqr StopSound String Str
Tan TileScreen Trim
UCase UpdateScreen
Val
Wait


Abs x

returns number

returns the Absolute Value of a number.
the Absolute Value is always positive.

example
var x
x = -10
Print Abs x

displays 10

see also
Sgn



Asc character$

returns code

returns the Ascii code of a given character.

example
Print Asc "a"

displays 65

see also
Chr


Blit srcLeft srctop srcwidth srcheight destLeft desttop destwidth destheight
copies one rectangular section of the screen to another
rectangular section.

example
LoadPic "map.bmp"

Blit 0 0 100 100 100 100 100 100

see also



Chr x
returns character$
returns a character with the given Ascii code.


example
Print Chr 65

displays "a"

see also
Asc


Circle x y radius
draws a Circle.

example
Circle 200,200,100


see also
Line Rect Polygon


Cls [colour]
clears the screen with the given colour.

example
Cls "black"

see also



Cosx

returns number

returns the CoSine of a number.

example
Print Cos 6

see also
Sin Tan


CurrentDate

returns date$

example
Print CurrentDate


see also
CurrentTime


CurrentDir

returns dir$

example
Print CurrentDir

see also



CurrentTime

returns time$

example
Print CurrentTime


see also
CurrentDate


End

Ends the program.
example
End


see also
CurrentDate


GetOpenFileName

returns fiLename$

opens a dialog box which allows the user
to pick a file to open.

example
Print GetOpenFileName


see also
GetSaveFileName


GetSaveFileName

returns fiLename$

opens a dialog box which allows the user
to pick a file to save to

example
Print GetSaveFileName

see also
GetOpenFileName


GetSpriteBounce n

returns Value

gets the bounce Value of a given sprite.

example
Print GetSpriteBounce n

see also



GetSpriteDx n

returns dx

gets the dx Value of a given sprite.
this is how far it is moving in the x (horizontal) direction.
if dx is negative it will move to the Left.
if dx is positive it will move to the Right.

example
Print GetSpriteDx 1

see also
GetSpriteDy


GetSpriteDy n

returns dy

gets the dy Value of a given sprite.
this is how far it is moving in the y (vertical) direction.
if dy is negative it will move up.
if dy is positive it will move down.

example
Print GetSpriteDy n

see also
GetSpriteDx


GetSpriteHt n

returns height

gets the height of a given sprite.

example
Print GetSpriteHt n

see also
GetSpriteWd



GetSpriteName n

returns file$

gets the fiLename of a given sprite.

example
Print GetSpriteName n

see also



GetSpriteOff n

returns state

gets the on-off status of a given sprite.

example
Print GetSpriteOff n

see also
SetSpriteoff


GetSpritePicNum n

returns picturenumber

gets the picture number of a given sprite.

example
Print GetSpritePicNum n

see also
SetSpritepic


GetSpriteWd n

returns width

gets the width of a given sprite.

example
Print GetSpriteWd n

see also
GetSpriteHt


GetSpriteX n

returns x

gets the x position of a given sprite.

example
Print GetSpriteX n

see also
GetSpriteY



GetSpriteY n

returns y

gets the y position of a given sprite.

example
Print GetSpriteY n

see also
GetSpriteX



GetZone

returns zone

returns the mouse zone the mouse is in.

example
Print GetZone

see also
SetZone


Input

returns String

see also
Msg


Inputbox

returns String$

displays a dialogbox which the user can type some
text into.

example
Print Inputbox

see also
Msg


InStr String$ subString$

returns position

searches for a String within a String. if the search
is sucessful the position within the String is returned.

example
Print InStr "abc","b"
displays 2

see also
Left Mid Right


KeyPress

returns KeyPress

returns a KeyPress.

example
Print KeyPress

see also
mousedown
MouseX MouseY


Left String$ Length

returns String$

example
Print Left "abcdef",3

see also
Right Mid


LCase String$

returns String$

converts a String to lowercase.

example
Print LCase "abc"

see also
UCase


Len String$

returns number

returns the Length of characters in a String.

example
Print Len "abc"

see also
Right Mid


Line top Left bottom Right
draws a Line.

example
Line 100,100,200,200

see also
Rect Polygon


LSet String$

returns String$

see also
RSet


LoadMap fiLename$

loads a map file to be used with tiles.

example
LoadMap "map.txt"

see also
LoadTiles


LoadPic fiLename$

displays the given picture file.

example
LoadPic "map.bmp"

see also
LoadTiles


LoadSprite fiLename$ n

loads a sprite into memory.

example
LoadSprite "ship.bmp" 0

see also
SetSprite


LoadTiles fiLename$

loads a bitmap of tiles.

example
LoadTiles "tiles2.bmp"

see also
LoadMap


LoopSound

example
LoopSound

see also
PlaySound PauseSound


Mid String$ start Length

returns String$

example
Print Mid "abcd",2,2

see also
Left Right


MouseButton

returns state

returns the state of the mouse buttons.

example
Print MouseButton

see also
MouseX MouseY


MouseX

returns x

returns the x position of the mouse.

example
Print MouseX

see also
MouseY


MouseY

returns y

returns the y position of the mouse.

example
Print MouseY

see also
MouseX


MoveSprites

moves all the sprites according to their dx
and dy Values.

example
MoveSprites

see also
Refresh


Msg text$
displays a messagebox with the given String.

example
Msg "hello"

see also
Inputbox


NextFile folder$

returns String$

see also
CurrentDir


Paint x y colour bordercolour
fills the screen with a certain colour until a border is reached.

example
Circle 100,100,10
Paint 50,50,"red","black"


see also
PSet Point


PlaySound file$

Plays a .wav or .mid file.
see also
PauseSound


PauseSound file$

see also
PlaySound


Point x y

returns colour

returns the colour of the given pixel.

example
Print Point 100,100

see also
PSet


PolyFill x y

draws a Polygon uSing pairs of xy co-ordinates and fills it with
the current colour.

example
SetBackColor "red"
PolyFill 200,100,300,200,200,300,100,100


see also
Polygon


Polygon x y
draws a Polygon uSing pairs of xy co-ordinates.

example
Polygon 200,100,300,200,200,300,100,200

see also
PolyFill


Power x n

returns x to the Power of n.

example
Print Power 2,8

returns number

see also
Sqr


Print String$ [x] [y]

Prints text on the screen. if co-ordinates are added
text is Printed at that location. if no co-ordinates
are added text is Printed at the next position.

Print "hello"
displays hello

Print "hello",20,50
displays hello at 20,50

example
Print "hello"
Print "world",20,50


see also
SetFont


PSet x y colour
fills in a pixel on the screen.

example
PSet 100,100,"red"

see also
Point


puttile

Rect Left top width height [colour]
draws a rectangle.

see also
TileScreen


Rect Left top width height [colour]
draws a filled rectangle.

example


see also
Rect


Refresh
updates the screen.
this is very imporTant command. normally the front screen
is never drawn to directly. background images are added to the
background screen. when Refresh is called the background screen
is copied to the sprite screen. the sprites are added and the sprite
screen is copied to the front screen.

uSing multiple screens avoids the considerable screen flicker
that would happen if everything was directly drawn to the front
screen.

Refresh happens automatically at the end of a program.

example
Refresh


see also



Replace String$ Replace$ start Length

returns String$

Replaces a section of a String.

see also
Mid


Rgb red green blue

returns colour

returns colour based on red, green and blue Values.
these Values can be anywhere between 0 and 255 inclusive.

example
Print Rgb 100,100,100


see also
PSet


Right String$ Length

returns String$

returns the Right hand side of a String.

example
Print Right "abc",3


see also
Left Mid


Rnd x

returns number

returns a random number.

example
Print Rnd 100


see also



RSet String$

returns String$

see also
LSet


ScreenDx

returns number

returns how much the screen has scrolled in the x (horizontal)
direction.

example
ScreenDx


see also
ScreenDy


see also PlaySound PauseSound


ScreenDy

returns number

returns how much the screen has scrolled in the y (vertical) direction.

example
ScreenDy


see also
ScreenDx


ScreenHeight

returns height

returns the screen height.

example
Print ScreenHeight


see also
ScreenWidth


ScreenWidth

returns width

returns the screen width.

example
Print ScreenWidth


see also
ScreenHeight


ScrollScreen x y
scrolls the screen in x and y (horizontal and vertical) directions.

example
ScrollScreen 100,100


see also



SetBackColor colour

sets the background colour.

example
SetBackColor "red"


see also
SetForeColor


SetFont name$ size style$

sets the font.

see also
Print


SetForeColor colour

sets the drawing colour.

example
SetForeColor "blue"


see also
SetBackColor


SetScreen dx dy

sets the scrolling offsets of the screen.

example
SetScreen 20,20


see also
ScrollScreen


SetSprite n x y

sets the x and y Values of the given sprite.
this determines what position it is on the screen.

example
SetSprite 0,50,50


see also
GetSpriteX GetSpriteY


SetSpritedir n dx dy

sets the dx and dy Values of the given sprite.
this determines what direction it moves in.

example
SetSpritedir 0,10,10


see also
SetSprite


SetSpritepic n x

sets the picture number of the given sprite.
this allows frame animation.

example
SetSpritepic 0,10


see also
GetSpritePicNum


settilesize size

sets the width and height of all the tiles.
tiles are always squares.

example
settilesize 10


see also
LoadMap LoadTiles


SetTimer

see also



SetXY x y

sets the Print cursor.

example
SetXY 100,100

Print "text is now here."

see also
Print


SetZone number Left top width height

sets a mouse zone.

example
SetZone n,x1,y1,x2,y2


see also
GetZone


Sgn x

returns number

example
var x
x = -10
Print Sgn x

displays –

see also
Abs


Sin x

returns number

returns the Sine of a number.

example
Print Sin 60


see also
Cos Tan


SpriteOff n

turns off sprite n.
(makes invisible).

example
SpriteOff 0


see also
SpriteOn


SpriteOn n

turns on sprite n.
(makes visible).

example
SpriteOn 0


see also
SpriteOff


SpriteCol n1 n2

tests whether sprite n1 has
collided with sprite n2.

see also
SpriteCols


SpriteCols n

returns the number of a sprite
that has collided with sprite n,
otherwise returns -1.

see also
spritescols


Sqr x

returns number

returns the square root of a number.

example
Print Sqr 16


see also
Power


StopSound

see alse PlaySound



Str number

return String$

example
var x
x = 5
Print Str x


see also
Val


String character$ number

returns String$

repeats a character the given number of times.

example
Print String "z",5


see also
Chr


Tan x

returns number

returns the Tan of a number.

example
Print Tan 60


see also
Cos
Sin


TileScreen

example
TileScreen


see also
LoadTiles
LoadMap



Trim String$

returns String$

removes spaces from the start and ends of a String.

example
Print Trim " abc"


see also



UCaseString$

returns String$

converts a String to uppercase.

example
Print UCase abc

displays "abc"

see also
LCase



UpdateScreen

see also
Refresh


Val String$

return number

converts a String into a number. if it cannot do so it returns zero.
example
var a$ x
a$ = "123"
x = x + Val a$
Print x


see also
Str


Wait x
pauses the program for a number of milliseconds.

example
Wait 1000

Waits for 1 second.

see also
Msg