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
// Ejemplo de Div GO // by J. Manuel Habas Millán program ejemplo_object3d_animation; global tex; enemigos; 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, "CURSORES: moverte por el escenario"); // inicia scene3d sin esto no funcionaran las funciones object3d() ni light3d() start_scene3d(0, tex, 1, 0); //numero, file, graph, ancho, alto, region //crea luces en escena light3d(100, rgb(200, 200, 255), 5000, 100, 100, -100); //intensidad, color, distancia, 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); jugador(0, 100, 200, 0); for (enemigos = 0; enemigos < 5; enemigos++) enemigo(rand(-600, 600), rand(-600, 600), rand(20, 90), rand(0, 360000)); end scene3d.light = 10; // activa sombras a la scene3d set_shadows(0); loop if (key(_esc)) exit("Amaka Soft 2026", 1); end frame; end end process jugador(x, y, z, num); private figura; caminando; reculando; parado; luz; begin ctype = c_scene3d; scene3d[num].camera = id; // carga y crea modelo en la escena figura = load_object3d("resources/objects3d/Soldier.glb", 0, #fff, x, 0, -100); //archivo, wireframe, color, x, y, z modify_object3d(figura, 100, 10000, 10000, 10000); //id, alpha, ancho, alto, largo //luz = light3d(200, rgb(255, 100, 100), 10000, x, -200, z); loop parado ++; if (key(_left)) angle -= 1000; end if (key(_right)) angle += 1000; end rotate_object3d(figura, 0, 0, angle); if (key(_up)) parado = 0; caminando ++; advance(10); object3d_advance(figura, 10); else caminando = 0; end if (key(_down)) parado = 0; reculando ++; advance(-4); object3d_advance(figura, -4); else reculando = 0; end if (caminando == 1) object3d_animation(figura, 1, 0, 30); end if (reculando == 1) object3d_animation(figura, 3, 0, -20); end if (parado == 1) object3d_animation(figura, 0, 0, 20); end if (caminando > 1) caminando = 1; end if (reculando > 1) reculando = 1; end if (parado > 1) parado = 1; end //move_light3d(luz, 200, x, -200, -z + 100); frame; end end process enemigo(x, z, size, angle) private figura, luz; begin // carga y crea modelo en la escena figura = load_object3d("resources/objects3d/monster.dae", 0, #fff, x, 0, z); //archivo, wireframe, color, x, y, z modify_object3d(figura, 100, size * 10, size * 10, size * 10); //id, alpha, ancho, alto, largo texture_in_object3d(figura, tex, 3); object3d_animation(figura, 0, 0, 20); loop rotate_object3d(figura, 0, 0, angle + 90000); //rotacion para avanzar object3d_advance(figura, 5); rotate_object3d(figura, 0, 0, angle); //rotacion visual if (timer > 20) angle += rand(500, 1500); end if (timer > 24) timer = 0; end frame; end end