documentación
novedades
guía de usuario
listado de funciones
variables y constantes
componentes web
licencia
comunidad
juegos desarrollados
foro de discusión
seguir en facebook
seguir en twitter
ejemplos
primitivas y textos:
draw
write
interacción procesos:
signal
colision
advance
planos:
scroll
mode7
scene3d
reproducción audio / video:
sonidos
video
modplay
efectos:
proceso
región
scroll
juegos:
Super Paf!
Plataformas
Dr. Malvado
Pacoman
Steroid
Pitfall
Exploss
Zelda
Sokoban
Fostiator
Oh Mummy!!
Sonic SMS
Galax
Puzzle
Bricks Breaker
Helio Ball
tutoriales:
0
1
2
3
4
5
6
7
menú
documentación:
novedades
guía de usuario
listado de funciones
variables y constantes
licencia
comunidad:
juegos desarrollados
foro de discusión
seguir en facebook
seguir en twitter
ejemplos:
write
scroll
scene3d
colision
modplay
región
Super Paf!
Dr. Malvado
Pitfall
Sokoban
tutoriales:
0
1
2
3
4
5
descargas
HTML5 Game engine
Entorno de desarrollo de juegos online en HTML5
Haz clic para obtener el control del teclado
Programar a tamaño normal
Programar a tamaño completo
Recuperar PRG
Abrir archivo PRG
Guardar PRG
Buscar
Reemplazar
// Div GO : Games Online > Example // Php + Html5 + Canvas + Javascript + Three.js lib // by J. Manuel Habas program example_3d; global tex, obj1, obj2, _light; private ang = 0, fig1; begin tex = load_fpg("graficos/texturas"); set_mode(640, 400); screen_color(#424); set_fps(60, 0); text_color = #ccc; text_size = 50; write(0, 5, 10, 3, "CURSORES: move around the stage"); write(0, 5, 30, 3, "ENTER: active casting shadows"); write(0, 5, 50, 3, "ESC: eliminates casting shadows 3d"); write(0, 5, 70, 3, "W,A,S,D: moves the light"); //initialized scene3D without this the functions object3d() and light3D() do not work start_scene3d(0, tex, 1, 0); //numero, file, graph, region //create objects in scene obj1 = object3d(1, 1, #f0f, 100, 0, -100, 50, 200); //type, wireframe, color, alpha, line drawn, x, y, z obj2 = object3d(2, 1, #ff0, 100, 0, 100, 50, 200); //type, wireframe, color, alpha, line drawn, x, y, z fig1 = load_object3d("objetos3d/monster.dae", 0, #fff, 0, 0, 0); //file, wireframe, color, x, y, z move_object3d(fig1, -50, 10, -50, 0, 90000, 0); //id, x, y, z, angle_x, angle_y, angle_z //apply a texture to object texture_in_object3d(obj1, tex, 4); //id, file, graph texture_in_object3d(obj2, tex, 2); //id, file, graph texture_in_object3d(fig1, tex, 3); //id, file, graph //changes the width, height or length of objects modify_object3d(fig1, 100, 200, 200, 200); //create lights in scene _light = light3d(100, rgb(200, 200, 255), 10000, 100, 100, -100); //intensity, color, distance, x, y, z player(0, 250, 0); //x, y, z scene3d.light = 0; scene3d.alpha = 100; loop ang += 400; move_object3d(obj1, -100, 50, 200, 0, 0, ang); //id, x, y, z, angle_x, angle_y, angle_z move_light3d(_light, 200, x, 150, z); //id, intensity, x, y, z if (key(_enter)) set_shadows(0, 80, 2); end //scene3d number, opacity shadows, quality if (key(_esc)) clear_shadows(0); end //remove and apply shadow to a 3d object if (key(_space)) shadow_in_object3d(obj1, true); end if (key(_backspace)) shadow_in_object3d(obj1, false); end if (key(_a)) x -= 4; end if (key(_d)) x += 4; end if (key(_w)) z += 4; end if (key(_s)) z -= 4; end frame; end end process player(x, y, z); begin ctype = c_scene3d; scene3d.camera = id; angle_y = -20000; loop if (key(_left)) angle -= 1000; end if (key(_right)) angle += 1000; end if (key(_up)) advance(10); end if (key(_down)) advance(-8); end frame; end end
+
Tamaño Código:
Compilar Código
Compilando...