a string containing the address the client is connected to the server with (in format IP:port, or 'localhost' if not connected to a server)
hex, rgb, rgba, color matrix value, or a tint object; applies color filter to diob; ex ( '#000000' ); ex ( 'rgb(10, 20, 30)' ); ex ( {'tint': 0x444444} )
set in order to tell the engine the client is in an input and key commands should be used as text input, false for normal; engine automatically sets this for most inputs
name of the interface element to send default messages to (ex: 'interface1.output1' )
string containing CSS to be used as a web style (ex '.test{font-weight: bold;}.test2{color: #000;}' ); style can be referenced by the name 'default'
optional; if set, the map will not scale based on the window size
maximum number of frames the client will attempt to draw per second; default 60
a reference to the player mob of this client
SERVER-ONLY; setting this will prevent the server from automatically loading interfaces on the server-side; if you want the server to have access, you will need to show the interface manually
string containing a color (null for transparent) to set the client's screen background to, for example '#000' for black; default is '#000'
true or false; true acts the same as 'scaleNearest' when scaling, but it also removes smoothing caused by other things
object containing eye delay information; possible values 'step' (determines number of pixels the eye moves per frame; default 1) and 'max' (object determining maximum distance in pixels the screen can be from the eye {'x': 100, 'y': 100}); ex {'step': 2, 'max': {'x': 100, 'y': 100}}
a string containing the HTML to display behind the game screen; #web_background to set the style of the entire background
amount of blank tiles that can be seen on the left and right of the view
amount of pixels the client's view is offset by from the view eye on the x-axis
amount of blank tiles that can be seen on the top and bottom of the view
amount of pixels the client's view is offset by from the view eye on the y-axis
adds a new command to the client's commands; if pFunc is null and pCommand is the name of an pre-defined command, that command will be added
name of the client command to be added
function to be called when the command is executed
adds a custom font
name of the font
url or path to the font file
OptionalpRemote: unknownoptional; set this if the path is outside of the project
OptionalpStyle: objectoptional; custom style object to apply to the font; ex {'font-weight': bold}
creates a new custom macro named pName with the keyDown command of pDown and the keyUp command of pUp; custom macros override macro atlas macros
name of the custom macro
string of key that will execute the macro
OptionalpDown: stringoptional; string containing the command to be executed when the key is pushed down; example 'test(1)' would execute the 'test' client command with one parameter equal to '1'
OptionalpUp: stringoptional; string containing the command to be executed when the key is let go of; example 'test(1)' would execute the 'test' client command with one parameter equal to '1'
adds the specified filter
name of the filter; only one name may be used at a time, using the name will remove the old filter with that name
the type of filter to add; below is the types and their specific possible pArgs values
color-based filter
adds an interface element to the interface and returns it
type of interface object to add
name of the interface to add the interface element to
OptionalpName: string | numberoptional; name to give the element being added
OptionalpX: numberoptional; x position to give the element
OptionalpY: numberoptional; y position to the give the element
OptionalpArgs: unknown[]optional; array of arguments to pass to the onNew event of the interface element being created
returns it
adds an overlay to the client which is a visual icon that always follows the screen; returns the new overlay; if pOver is already an overlay of a diob it will remove it form that diob and add it to this diob
string of the type of object or overlay to add an overlay of or actual diob to add
OptionalpAppearance: number | booleanoptional; if true, this overlay will be be treated as if it is part of the the parent's actual appearance - appearance settings such as angle and alpha of the parent will be used for this overlay and the overlay will be drawn directly on top of the parent so no other diobs that are not an overlay of the parent can appear between it and the parent (it will basically be an extension of the parent's icon); if this is false, the overlay will be treated as an independent diob that just follows the parent around; instead of true or false this can be an object containing information on the appearMask, 'shareIcon' to have the overlay share the same iconName as the parent and 'isUnder' to make the overlay appear under the parent instead of above, 'ownState' to have this overlay not sync up with the parent's iconState; ex {'shareIcon': true, 'isUnder': true}
OptionalpSkipEvent: booleanoptional; if true, the onAddOverlay event will not be called
returns the new overlay; if pOver is already an overlay of a diob it will remove it form that diob and add it to this diob
loads a JavaScript file into the project
name to give the script
link to the JavaScript file to load
OptionalpModule: unknownoptional; load script as a module
OptionalpFunc: Functionoptional; function to call after the JavaScript file has loaded
calls the client command of pCommand with the arguments of pArgs
name of the client command to call
array of arguments to pass to the command
OptionalpSend: unknownCLIENT-ONLY; optional; if set the command will also be sent to the server
returns true if pInt is currently shown, false if not; if pEl is set, checks if the specified element is shown
name of the interface
OptionalpEl: unknownoptional; name of the element
returns true if pInt is currently shown, false if not; if pEl is set, checks if the specified element is shown
brings up a confirm window asking the user to select "yes" or "no"; returns true or false
message to display in the confirm window
function to call after input; the first argument will be the input; can be a "callback array" containing the function, the 'this', and arguments; ex ( [this.someFunc, this] )
returns true or false
creates a new top screen named pName with the layer pLayer
name of the top screen to create
OptionalpLayer: unknownoptional; layer to give the screen
OptionalpSet: objectoptional; settings object; ex ( {'scaleType': 'nearest'} );
returns the canvas element that this element is drawn on to
name of the interface that element is on
name of the element
returns the canvas element that this element is drawn on to
returns the interface element object of the specified interface
name of the interface to get element from
name of the element to get
returns the interface element object of the specified interface
returns an array of interface elements on the interface pInterface depending on the provided arguments; if pType is not set, all elements on the interface will be returned; if pType is set but pChild is not, elements on the interface with the exact type of pType will be returned; if pType is set and pChild is set, all elements with the type pType or a parent type of pType will be returned; for example, if pType is set to 'Interface/A' with pChild undefined, all elements with the exact type of 'Interface/A' will be returned, but if pChild is set, then all types starting with 'Interface/A' on the interface will be returned
name of the interface to get element from
OptionalpType: stringoptional; string containing type path to return
OptionalpChild: booleanoptional; boolean that determines if child types are included
returns an array of interface elements on the interface pInterface depending on the provided arguments; if pType is not set, all elements on the interface will be returned; if pType is set but pChild is not, elements on the interface with the exact type of pType will be returned; if pType is set and pChild is set, all elements with the type pType or a parent type of pType will be returned; for example, if pType is set to 'Interface/A' with pChild undefined, all elements with the exact type of 'Interface/A' will be returned, but if pChild is set, then all types starting with 'Interface/A' on the interface will be returned
returns an array of diobs on the screen that overlap the specified position box depending on the provided arguments; if pType is not set, all diobs in the position box will be returned; if pType is set but pChild is not, diobs in the position box with the exact type of pType will be returned; if pType is set and pChild is set, all diobs with the type pType or a parent type of pType will be returned; for example, if pType is set to 'Interface' with pChild undefined, all diobs with the exact type of 'Interface' will be returned, but if pChild is set, then all interfaces on the screen will be returned
starting x position
starting y position
OptionalpType: stringoptional; ending x position
OptionalpChild: booleanoptional; ending y position
OptionalpPage: stringoptional; string containing type path to return
returns an array of diobs on the screen that overlap the specified position box depending on the provided arguments; if pType is not set, all diobs in the position box will be returned; if pType is set but pChild is not, diobs in the position box with the exact type of pType will be returned; if pType is set and pChild is set, all diobs with the type pType or a parent type of pType will be returned; for example, if pType is set to 'Interface' with pChild undefined, all diobs with the exact type of 'Interface' will be returned, but if pChild is set, then all interfaces on the screen will be returned
returns a mapView object containing the information of the client's mapView; for example {'width': 640, 'height': 640} would mean the client's mapView is 640 by 640 pixels in size
returns a mapView object containing the information of the client's mapView; for example {'width': 640, 'height': 640} would mean the client's mapView is 640 by 640 pixels in size
returns an object containing the cursor information; ex ( {'cursor': 'default', 'x': 0, 'y': 0} )
returns an object containing the cursor information; ex ( {'cursor': 'default', 'x': 0, 'y': 0} )
returns an object containing information about the client's browser and operating system; example {'platform': 'Netscape', 'version': 'Chrome/38.0.2125.104', 'vendor': 'Google', 'language': 'en-US', 'system': 'Windows 95'}
returns an object containing information about the client's browser and operating system; example {'platform': 'Netscape', 'version': 'Chrome/38.0.2125.104', 'vendor': 'Google', 'language': 'en-US', 'system': 'Windows 95'}
returns an array of diobs that are overlays of this diob using the provided arguments; if pType is not set, all diobs will be returned; if pType is set but pChild is not, all diobs with the exact type of pType will be returned; if pType is set and pChild is set, all diobs with the type pType or a parent type of pType will be returned; for example, if pType is set to 'Mob' with pChild undefined, all diobs with the exact type of 'Mob' will be returned, but if pChild is set, then all mobs will be returned
OptionalpType: stringoptional; string containing type path to return
OptionalpChild: booleanoptional; boolean that determines if child types are included
returns an array of diobs that are overlays of this diob using the provided arguments; if pType is not set, all diobs will be returned; if pType is set but pChild is not, all diobs with the exact type of pType will be returned; if pType is set and pChild is set, all diobs with the type pType or a parent type of pType will be returned; for example, if pType is set to 'Mob' with pChild undefined, all diobs with the exact type of 'Mob' will be returned, but if pChild is set, then all mobs will be returned
returns the diob plane pPlane ir specified, otherwise returns an array of existing planes; you can then alter it like any other diob and all visual changes will be applied to all diobs on this plane
OptionalpPlane: numberoptional; value of plane to get
returns the diob plane pPlane ir specified, otherwise returns an array of existing planes; you can then alter it like any other diob and all visual changes will be applied to all diobs on this plane
returns an object {'x': x, 'y': y} containing the x and y position on the map that currently matches the pX and pY position on the screen
x position on the screen
y position on the screen
OptionalpO: objectoptional; an existing object to set the x and y of
returns an object {'x': x, 'y': y} containing the x and y position on the map that currently matches the pX and pY position on the screen
returns an object {'x': x, 'y': y} containing the x and y position of the client's screen on the map
OptionalpO: objectoptional; an existing object to set the x and y of
returns an object {'x': x, 'y': y} containing the x and y position of the client's screen on the map
returns an object containing the x and y of the game scale; ex: {'x': 2, 'y': 2}
OptionalpO: objectoptional; an existing object to set the x and y of
returns an object containing the x and y of the game scale; ex: {'x': 2, 'y': 2}
returns an object containing the width and height of the game screen; ex: {'width': 100, 'height': 100}
OptionalpO: objectoptional; an existing object to set the width and height of
returns an object containing the width and height of the game screen; ex: {'width': 100, 'height': 100}
returns a screenView object containing the information of the client's screenView; for example {'scaleTo': 'ratio', 'scaleNearest': true} would mean the client's screenView keeps its ratio and scales pixels to their nearest neighbor
returns a screenView object containing the information of the client's screenView; for example {'scaleTo': 'ratio', 'scaleNearest': true} would mean the client's screenView keeps its ratio and scales pixels to their nearest neighbor
grabs an object with the screen name, layer, settings, and either an array of pixel data or a data url depending on pType for the entire screen named pName or the default top screen if no name is given. The array of pixel data can then be changed and used elsewhere or drawn onto another screen. To read the width and height you could use object.width and object.height, where object is the object returned by the function. The object data array is as follows: object.data[0] is the red value (0-255) of the pixel at 0,0, object.data[1] is the green value (0-255) of the pixel at 0,0, object.data[2] is the blue value (0-255) of the pixel at 0,0, and object.data[3] is the alpha value (0-255) of the pixel at 0,0. Then object.data[4], object.data[5], object.data[6], and object.data[7] are the respective values for the pixel at 1,0. This trend continues through the whole array for every pixel. object ex: {'name': '', 'layer': 1, 'data': ''}
OptionalpName: string | numberoptional; name of the top screen to get the data of
OptionalpType: stringoptional; type of data to get; 'url' or 'pixels' or 'canvas'
returns an object {'step': step, 'max': {'x': x, 'y': y}} containing delay details of client's view eye
returns an object {'step': step, 'max': {'x': x, 'y': y}} containing delay details of client's view eye
returns an object containing the width and height of the game window; ex: {'width': 100, 'height': 100}
OptionalpO: objectoptional; an existing object to set the width and height of
returns an object containing the width and height of the game window; ex: {'width': 100, 'height': 100}
hides the interface of pInterface if pElement is not specified, otherwise it only hides pElement
name of the interface to hide or the interface containing pElement
OptionalpElement: Dioboptional; name of interface lement in pInterface to hide
outputs text to an interface element; if pInt or pEl is not set or is invalid, text goes to client.mainOutput
text to be displayed
string containing interface file name to output to
string containing the interface element name to output to
plays a sound to this client; returns the Sound object
either a string with the name of a sound file, or a string containing the path of a Sound object, or an actual Sound object, or a basic object with the proper information; ex ( {'soundName': 'name', 'volume': 50} )
OptionalpStart: unknownoptional; time to start playing the sound at
OptionalpDuration: unknownoptional; how long to play the sound for
returns the Sound object
brings up a prompt window to ask for text from the user
title of the prompt
default text in the input
function to call after input; the first argument will be the input; can be a "callback array" containing the function, the 'this', and arguments; ex ( [this.someFunc, this] )
sends the data for the pD diob to the client, if pVar is set it will send only those variables, if it is not set it will only send built-in engine variables
reference to the diob to send
OptionalpVar: unknown[]optional; variable name or array of variable names
sends a packet to a client or server, depending on where the code is executed; client code executing this will send the packet to the server; server code executing this will send the packet to the client; this will invoke Client/onPacket on client-side if the sendPacket is server-side and on the server-side if it is on the client-side
name of packet to send
an object containing data to be sent; ex {'a': 1, 'b': 2}
OptionalpForce: booleanoptional; send the packet immediately instead of buffering it with the packet delay
sets the edge limit of the map for the client
number of black tiles visible on the left and right edges of the map; -1 for default
number of black tiles visible on the top and bottom edges of the map; -1 for default
stores pData as a string locally on the client's computer and can be referenced using pKey; leaving pKey and pData blank will clear all local storage; 3000 characters are allowed to be saved per game (keys and values combined)
key used to reference the stored data
data as a string to store locally for the client
sets the cursor of the client
a string containing the name of the cursor for built-in cursors, a URL path to an image, or a diob; built-in (auto, all-scroll, crosshair, default, help, inherit, move, pointer, progress, text, vertical-text, wait, no-drop, not-allowed, e-resize, n-resize, s-resize, w-resize, col-resize, row-resize, ne-resize, nw-resize, se-resize, sw-resize); passing a diob will use the diob's icon; blank for default
OptionalpX: numberoptional; offsets the icon left or right by pX pixels
OptionalpY: numberoptional; offsets the icon up or down by pY pixels
sets the client's screenView to pView or default if pView is null
an object containing new information for the client's screenView; for example {'scaleTo': 'ratio', 'scaleNearest': true} would mean the client's screenView keeps its ratio and scales pixels to their nearest neighbor; 'scaleNearest' means pixels will stay pixelated and will not try to blend with other pixels, 'scaleTo': 'normal' means normal scaling, 'scaleTo': 'ratio' means the width and height of the window keep their aspect ratio when scaled, 'scaleTo': 'multiple' means the game will only show in scales that are multiples of two when scaled, 'scaleTo': 'none' prevents all scaling
changes the name and layer of the top screen with the name pName; adding data optional
name of the top screen to set
new name of the top screen
new layer of the top screen
OptionalpNewData: unknownoptional; data to add to the screen
OptionalpNewSet: unknownoptional; new settings object
sets the client's view eye delay which is how many pixels the screen can be off center of the view eye and how quickly it catches up to the view eye; set step to 0 for no delay (the default)
object containing eye delay information; possible values 'step' (determines number of pixels the eye moves per frame; default 0) and 'max' (object determining maximum distance in pixels the screen can be from the eye {'x': 100, 'y': 100}); ex {'step': 2, 'max': {'x': 100, 'y': 100}}
sets the style of pStyle to the value of pValue of the web tag with the id pID
id of the web tag to set the style of
type of style to set
value as a string to set the style to
displays the interface of pInterface, if not already displayed, along with all elements of the interface with that are not hidden by default; if pElement is specified, it makes that element no longer hidden
name of interface to show
OptionalpElement: Dioboptional; name of interface element in pInterface to show
OptionalpForce: booleanoptional; if set, all hidden elements will be forced to be shown
performs the specified draw function using the specified pArgs object; ex ( {'type': 'image', 'image': this, 'x': 1, 'y': 1} )
an object or array of objects which determines the settings of the draw
type of draw
The client object.