Div Games Online
logo Div Games Online

Documentation: Functions list of Div GO : Div Games Online v2.04.2

all functions (Div / Div 2 / Div GO) original functions (Div / Div 2) new functions (Div GO)
filter functions:
[math] [graphics primitives] [string] [print text] [interaction processes] [scroll] [mode7] [scene3D] [graphic effects] [sound] [video] [geometric] [pathfinding] [color] [region] [general interaction program] [date/time] [saved data] [string conversion] [resource load] [music module] [array functions] [websocket]
search functions:  

191 new functions (Div GO):

atob(variable);
avg(array);see example
[returns the weighted average of the array values]
base64_decode(variable);see example
base64_encode(variable);see example
base64_to_graph(value);see example
blur_in_map(file, graph, value);see example
- value: from 0 to 30 in order to variation of blur effect, 0 being focused and 30 the greatest blur
break_back_scroll(number, orientation, fragments, speed);see example
number: scroll number
orientation: 0 horizontal, 1 vertical
fragments: array with the different heights or widths of the scroll
speed: array with the displacement speeds of the different fragments
btoa(variable);see example
- variable: converts a numeric value in a binary string
ceil(value);see example
change_fpg_color(file, color source, color change, tonality);see example
change_text(id, alpha, blur, tone, invert, grayscale);see example
change_tile_value(tilemap, graph to change, new graph);see example
change_tilemap(tilemap, scroll number);see example
change_vectors(3d object id, quantity);see example
change_video(media id, volume, frequency);
clear();
[returns empty array value, clear array of data]
clear_map(file, graph, x, y, width, height);see example
clear_map_put(file, graph1, graph2, x, y);see example
clear_map_xput(file, graph1, graph2, x, y, angle, size, flags);see example
clear_points(file, graph);see example
[clears all control points from a graph]
clear_shadows(number);see example
clear_texture(3d object id);see example
close_socket(id socket);
collision_box(process id or TYPE process name, size1, size2, debug);see example
- process id or type
- size1: size of the identified process
- size2: size of the calling process
- debug: show collision limits, only in ide
collision_circle(process id or TYPE process name, size1, size2, debug);see example
- process id or type
- size1: size of the identified process
- size2: size of the calling process
- debug: show collision limits, only in ide
collision_objects3d(id1, id2);see example
color_in_map(file, graph, color);see example
- color: hexadecimal or rgb(red, green, blue);
color_object3d(3d object id, color);see example
- color: hexadecimal or rgb(red, green, blue);
constraint(id1, stop id1, id2, stop id2, distance, elasticity);see example
- id1: id of a process
- stop id1: true or false to set the id1 process regarding the process id2
- id2: id of the second process
- stop id2: true or false to set the id2 process regarding the process id1
- distance: distance between the two processes from its center point
- elasticity: the higher the number will be more elastic effect, 0 = not elastic
continue_song();
continue_sound(channel id, time);
- time: from where will continue playing the sound
continue_video(media id, time);
- time: from where will continue playing the video
date(date variable);see example
- date variable:
d_day // returns the numeric value of the day
d_week // returns the numeric value of the week
d_month // returns the numeric value of the month
d_year // returns the numeric value of the year
delete_input(input id);see example
delete_light3d(light id);
delete_link(link id);see example
delete_local_storage(OFFSET variable);
delete_object3d(3d object id);
delete_point(file, graph, number);see example
[delete the point indicated in the last parameter of the function]
delete_region(region number);see example
delete_session(OFFSET variable);
delete_xdraw(xdraw identifier);
draw_bezier_curve(number, color, alpha, region);
draw_stamp(draw id);see example
- all_drawing: with this constant value, delete of display all primitives graphical
enable_geolocation();
enable_notifications();
exists(process id or TYPE process name);see example
[returns TRUE or FALSE, if exists the process]
exp(value);
explode(variable, delimiter character);see example
[returns an array with the values delimited by the character string, making each element of the array has a fragment of the string]
fade_in(speed, file, graph, x, y, angle);see example
fade_out(speed, file, graph, x, y, angle);see example
find_local_storage(OFFSET variable);see example
[returns TRUE or FALSE, if the variable saved exists]
find_session(OFFSET variable);
[returns TRUE or FALSE, if the session variable exists]
fix(value, digits);see example
floor(value);see example
fullscreen_scale(rescale);see example
get_browser(browser / os variable);see example
- browser / os variable:
b_width // width of the browser
b_height // height of the browser
b_os_width // width screen of the o.s.
b_os_height // height screen of the o.s.
b_name // name of the browser
b_os_name // name of the o.s.
b_language // browser language
b_joy_connect // true or false if joy or pad is connected
b_pad_connect // true or false if joy or pad is connected
b_name_joy // name of joy / pad
b_name_pad // name of joy / pad
get_channel(channel number);see example
get_dist_objects3d(id1, id2);
get_image_tiles(image, width, height);see example
get_socket(id socket);see example
get_song_channels();see example
get_sound_length(channel id);
[returns the total length in seconds of the sound]
get_sound_playtime(channel id);
[returns the time in seconds what has been reproduced]
get_tile(tilemap, x, y);see example
get_video_length(media id);
[returns the total length in seconds of the video]
get_video_playtime(media id);
[returns the time in seconds what has been reproduced]
gradient_draw(id, color, x0, y0, x1, y1);see example
- color: hexadecimal or rgb(red, green, blue);
gradient_text(id, color, x0, y0, x1, y1);see example
- color: hexadecimal or rgb(red, green, blue);
graph_to_base64(graph);
graphic_builder(variable);see example
graphic_explorer(file, graph);see example
hsl(hue, saturation, lighting);see example
- hue: this value is in degrees from 0 to 360, where 0 and 360 the red color
- saturation: this percentage value is from 0 to 100
- lighting: this percentage value is from 0 to 100
hsla(hue, saturation, lighting, alpha);see example
- hue: this value is in degrees from 0 to 360, where 0 and 360 the red color
- saturation: this percentage value is from 0 to 100
- lighting: this percentage value is from 0 to 100
- alpha: this value is decimal from 0 to 255, with 0 being transparent
htoa(variable);see example
- variable: converts a numeric value to a hexadecimal string
implode(array, unifying character);
[returns a string with the array elements together by the unifying character]
input(font, border, border color, x, y, width, height, max character, alignment, OFFSET variable);see example
is_defined_region(region number);see example
[returns TRUE or FALSE, if region exists or not]
is_finite(variable);
is_fullscreen();see example
is_int(variable);
is_nan(variable);
is_playing_video(media id);
[returns 0 if the video is stopped and 1 if it is playing]
key_in(keyboard code);see example
key_out(keyboard code);see example
light3d(intensity, color, distance, x, y, z);see example
- intensity: minimum value 0 (light off) and maximum 200 (strong light); 100 is the default - color: hexadecimal or rgb(red, green, blue); - distance: how far will the light in the 3d scene
link(border, color, x, y, width, height, url, target);see example
load_external_data(filename);
load_font(filename);
load_image(filename);
- accepts images format: png, jpg, svg, png, bmp
load_local_storage(OFFSET variable);see example
load_object3d(filename, wireframe, color, x, y, z);
- accepts 3D objects format: obj, dae, wrl
- wireframe: 0 to show solid object; 1 to show the wireframe of the object
- color: hexadecimal o rgb(red, green, blue);
load_session(OFFSET variable);
load_sound(filename, cyclic);
- cyclic: 0 to beep 1 time; 1 to ring being repeated indefinitely
load_video(filename, cyclic);
- cyclic: 0 to beep 1 time; 1 for reproducing being repeated indefinitely
log(value);
ltrim(text);see example
max(value, value);see example
[returns the highest numeric value]
min(value, value);see example
[returns the lowest numeric value]
modify_object3d(3d object id, alpha, width, height, long);
move_light3d(light id, intensity, x, y, z);
- intensity: minimum value 0 (light off) and maximum 200 (strong light); 100 is the default
move_link(link id, border, color, x, y);see example
move_link(input id, border, color, x, y);
move_object3d(3d object id, x, y, z, angle x, angle y, angle z);
move_video(media id, flags, angle, alpha, x, y, width, height, region);
move_xdraw(xdraw id, x, y, size, angle, alpha);
new_tilemap(id tilemap);see example
notification(file, graph, title, description);see example
object_in_scene3d(id, number);
object3d(type, wireframe, color, alpha, line drawn, x, y, z);see example
- type:
0 = plane
1 = cube
2 = sphere
3 = torus
4 = cylinder
- wireframe: 0 to show solid object; 1 to show the wireframe of the object
- color: hexadecimal o rgb(red, green, blue);
- alpha: object opacity
- region: region number defined with define_region();
otoa(variable);see example
- variable: converts a numeric value into a string octal
out_region_dist(identifier, region);see example
- identifier: process id
- region: region number defined with define_region();
paint_in_map(file, graph, color);
- color: hexadecimal or rgb(red, green, blue);
pause_song();
pause_sound(channel id);
[returns the time where it has been paused in milliseconds]
pause_video(media id);
[returns the time where it has been paused in milliseconds]
pixelated_in_map(file, graph, variation);
- variation of 0 to 100 to change the size of the pixel, with 0 being the normal size and the largest size 100
polytone(frequency, note, max volume position, min volume position, volume);see example
pop(variable);see example
[returns array with 1 less element at the end]
push(variable, value);see example
[returns array with 1 element inserted at the end]
regex(type, text, expression, modifier, replacement);see example
- type:
0 o "s": search word
1 o "m": search for all similarities
2 o "r": search and replace
- text: text where to search
- expression: regular expression
- modifier (optional):
"g": global search
"i": search case insensitive
"m": multi-line search
"s": allows the . match newline characters
"u": unicode
- replacement (optional): replacement text
region_blur(region, value);see example
- region: region number defined with define_region();
- value: from 0 to 30 in order to variation of blur effect, 0 being focused and 30 the greatest blur
region_chroma(region number, color, hue);see example
region_color(region, color);
- region: region number defined with define_region();
- color: hexadecimal or rgb(red, green, blue);
region_copy(destination region, origin region);see example
region_mask(region, file, graph, x, y, size, alpha);
- region: region number defined with define_region();
region_pixelated(region, variation);see example
- region: region number defined with define_region();
- variation of 0 to 100 to change the size of the pixel, with 0 being the normal size and the largest size 100
region_size(region, x, y, size_x, size_y);see example
region_wave(region, orientation, amplitude, variation);
- region: region number defined with define_region();
- orientation: 0 horizontal, 1 vertical
- amplitude: separation of waves: 0 without separation, 1 for 1px of separate, 2 for 2px... 10px... in forward
- variation of -100 to 100 to change the size of the pixel, with 0 being the normal size and the largest size 100
region_zoom(region, x, y, variation);
- region: region number defined with define_region();
- variation of 0 to 100 to change the size of the pixel, with 0 being the normal size and the largest size 100
rgb(red, green, blue);see example
rgba(red, green, blue, alpha);see example
round(value);see example
rtrim(text);see example
save_external_data(file path, OFFSET variable);
save_local_storage(OFFSET variable);see example
save_session(OFFSET variable);
say(text);
[shows information per console]
screen_color(background color);see example
- color: hexadecimal or rgb(red, green, blue);
screen_scanline(percentage, type);see example
- percentage: 0 (default) disables scanline; 100 is shown in greater darkness
- type: 0 horizontal line; 1 vertical line; 2 grid
screen_smooth(boolean);
- boolean: TRUE active blur, FALSE disables
screen_transparent(boolean);see example
[removes the background color and shows content from behind the canvas]
set_author(page author);
set_background(file, graph, position, size, repeat);see example
- position:
0: up left, 1: up, 2: up right
3: left, 4: center, 5: right
6: down left, 7: down, 8: down right
- repeat:
0: no-repeat
1: repeat-x
2: repeat-y
3: repeat
set_bezier_curve(bezier number, bezier point x1, bezier point y1, bezier point x2, bezier point y2, x, y);
set_center(file, graph, x, y);
set_color(background color);
- color: hexadecimal o rgb(red, green, blue);
set_description(page description);
set_fog(scene3d number, color, initial distance, final distance);see example
set_half_scroll(scroll number, graph);see example
set_icon(file path);
set_point(file, graph, point number, x, y);see example
set_shadows(number, alpha, type);see example
set_socket(id socket, variable);see example
set_terrain(number, file, graphic, distance, terrain height);see example
set_tile(tilemap, x, y, graph);see example
set_visible_mouse(boolean);see example
- boolean: display or hide the mouse system; TRUE is the default value
set_vpad(boolean, alpha);see example
- boolean: TRUE turns on the virtual pad, FALSE turns it off
- alpha: 0 to 100 for opacity, with 100 being the most opaque value
shadow_draw(id, color, x, y, blur);see example
- color: hexadecimal or rgb(red, green, blue);
shadow_in_object3d(3d object id, enable);see example
shadow_text(id, color, x, y, blur);see example
- color: hexadecimal or rgb(red, green, blue);
shift(variable);see example
[returns array with 1 element less from the start]
sort(variable, mode);
- mode:
0 for ascending order (from lowest to highest)
1 for descending order (from highest to lowest)
2 for random disorder.
splice(variable, initial position, number of elements);
[returns an array with elements removed from a given position]
start_bezier_curve(bezier number, x, y);
start_capture_cam(number, region);see example
start_scene3d(number, file, graph, region);see example
start_socket(url ws o wss(secure));see example
stop_bezier_curve(bezier number, type);
stop_capture_cam(number);see example
stop_scene3d(number);
subtract_draw(id, x, y, width, height);
subtract_text(id, x, y, width, height);
subtract_xdraw(id, x, y, width, height);
sum(array);see example
[returns the sum of all values in the array]
texture_in_map(file, graph, width, height, x, y, size_x, size_y);see example
texture_in_object3d(id, file, graph);see example
time(time variable);see example
- time variable:
t_milliseconds // returns the numeric value of the millisecond
t_seconds // returns the numeric value of the second
t_minutes // returns the numeric value of the minutes
t_hours // returns the numeric value of the hours
trim(text);see example
unique(variable);see example
[returns the values of a filter array without duplicate values]
unload_font(id);
unload_image(id);
unload_video(video id);
unshift(variable, value);see example
[returns array with 1 element inserted at the start]
vibration(time);
video(video id, volume, frequency);
- video id: returned by the video file loaded with load_video();
- volume: 0 for minimum volume, 256 for maximum volume
- frequency: 256 is the standard rate
video_in_object3d(3d object id, video code, volume, frequency);
- video code: returned by the video file loaded with load_video();
- volume: 0 for minimum volume, 256 for maximum volume
- frequency: 256 is the standard rate
wave_in_map(file, graph, orientation, amplitude, variation);
- orientation: 0 horizontal, 1 vertical
- amplitude: separation of waves: 0 without separation, 1 for 1px of separate, 2 for 2px... 10px... in forward
- variation of -100 to 100 to change the size of the pixel, with 0 being the normal size and the largest size 100
write_html(font, centering code, text);see example
- font: id returned by load_font()
- centering code: 0 to 8
- text: "write text with support html tags"
write_object3d(id font, wireframe, color, alpha, height, x, y, z, text);see example
xdraw(file, graph, x, y, size, angle, alpha, region);
- file
- graph: fpg code graphic drawing
- x: position x
- y: position y
- size: size of the graphic
- angle: angle of the graphic
- alpha: opacity of the graphic
- region: region number defined with define_region();