-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Josema edited this page May 11, 2016
·
3 revisions
Div GO is a framework html5 development of video games 2D and 3D based on the language DIV Games Studio. Includes new functions and variables to harness the potential of Html5 and canvas. Div GO also features an integrated development environment with a code editor, a list of processes and functions, graphics viewer, list of active processes, compiler and a projects generator.
Hello World example:
PROGRAM Hello World;
PRIVATE
text = "hello";
text2 = "hello world";
BEGIN
//ways to create a hello world, concatenating variables
write(0, 160, 70, 4, "hello world");
write(0, 160, 100, 4, text + " world");
write(0, 160, 130, 4, text2);
LOOP
FRAME;
END
END
Basic example of creating processes:
PROGRAM BasicProcess;
BEGIN
set_mode(m640x400); //screen resolution
set_fps(60, 0); //frames per second
write(0, 320, 50, 4, "Press SPACE to create processes");
LOOP
IF (KEY(_space)) MyProcess(); END
FRAME;
END
END
PROCESS MyProcess();
BEGIN
graph = 2;
x = rand(0, 640);
y = -20;
size = rand(20, 80);
alpha = rand(20, 100);
LOOP
//once it reaches the bottom, the loop is removed with break; ending the process
y += 8; IF (y > 420) BREAK; END
FRAME;
END
END