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
Five Blocks
World Chapas
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 Example // by J. Manuel Habas Millán program example_object3d_animation; global tex; enemies; begin tex = load_fpg("resources/fpgs/texturas"); set_mode(640, 400); screen_color(#424); set_fps(60, 0); text_color = #ccc; text_size = 50; write(0, 320, 20, 4, "CURSORS: move around the stage"); // initialize scene3d; without this, the object3d() and light3d() functions will not work. start_scene3d(0, tex, 1, 0); // scene3d number, file, graph, region // creates scene3d lights light3d(100, rgb(200, 200, 255), 5000, 100, 100, -100); // intensity, color, distance, x, y, z light3d(200, rgb(255, 255, 0), 3000, 1000, 100, -1000); light3d(200, rgb(255, 0, 255), 3000, -1000, 100, -1000); light3d(200, rgb(0, 255, 255), 3000, -1000, 100, 1000); light3d(200, rgb(150, 255, 150), 3000, 1000, 100, 1000); player(0, 100, 200, 0); for (enemies = 0; enemies < 5; enemies++) enemy(rand(-600, 600), rand(-600, 600), rand(20, 90), rand(0, 360000)); end scene3d.light = 10; // activate shadows in scene3d set_shadows(0); loop if (key(_esc)) exit("Amaka Soft 2026", 1); end frame; end end process player(x, y, z, num); private figure; walking; backing; standing; begin ctype = c_scene3d; scene3d[num].camera = id; // load and create model in scene figure = load_object3d("resources/objects3d/Soldier.glb", 0, #fff, x, 0, -100); // filename, wireframe, color, x, y, z modify_object3d(figure, 100, 10000, 10000, 10000); // 3d object id, alpha, width, height, long loop standing ++; if (key(_left)) angle -= 1000; end if (key(_right)) angle += 1000; end rotate_object3d(figure, 0, 0, angle); if (key(_up)) standing = 0; walking ++; advance(10); object3d_advance(figure, 10); else walking = 0; end if (key(_down)) standing = 0; backing ++; advance(-4); object3d_advance(figure, -4); else backing = 0; end if (walking == 1) object3d_animation(figure, 1, 0, 30); end if (backing == 1) object3d_animation(figure, 3, 0, -20); end if (standing == 1) object3d_animation(figure, 0, 0, 20); end if (walking > 1) walking = 1; end if (backing > 1) backing = 1; end if (standing > 1) standing = 1; end frame; end end process enemy(x, z, size, angle) private figure, luz; begin // load and create model in scene figure = load_object3d("resources/objects3d/monster.dae", 0, #fff, x, 0, z); // filename, wireframe, color, x, y, z modify_object3d(figure, 100, size * 10, size * 10, size * 10); // 3d object id, alpha, width, height, long texture_in_object3d(figure, tex, 3); object3d_animation(figure, 0, 0, 20); loop rotate_object3d(figure, 0, 0, angle + 90000); // rotation to advance object3d_advance(figure, 5); rotate_object3d(figure, 0, 0, angle); // visual rotation if (timer > 20) angle += rand(500, 1500); end if (timer > 24) timer = 0; end frame; end end