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
// Pruebas de compilador online Div GO // Php + Html5 + Canvas + Javascript + Three.js lib // by J. Manuel Habas Millán program ejemplo_collision_objects3d; global tex, luz1, luz2; obj1, obj2, obj3, obj4; 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: moverte por el escenario"); write(0, 5, 25, 3, "+ / -: enciende / apaga luz ambiental"); //inicia scene3d sin esto no funcionaran las funciones object3d() ni light3d() start_scene3d(0, tex, 1, 0); //numero, file, graph, region obj1 = object3d(1, 1, #48f, 100, 2, 200, 50, 200); //tipo, wireframe, color, alpha, trazado, x, y, z obj2 = object3d(2, 1, #48f, 100, 2, -200, 50, 200); //tipo, wireframe, color, alpha, trazado, x, y, z obj3 = object3d(3, 1, #48f, 100, 2, 200, 50, -200); //tipo, wireframe, color, alpha, trazado, x, y, z obj4 = object3d(4, 1, #48f, 100, 2, -200, 50, -200); //tipo, wireframe, color, alpha, trazado, x, y, z texture_in_object3d(obj1, tex, 2); //id, file, graph texture_in_object3d(obj2, tex, 3); //id, file, graph texture_in_object3d(obj3, tex, 5); //id, file, graph texture_in_object3d(obj4, tex, 998); //id, file, graph //crea luces en escena luz1 = light3d(100, rgb(200, 200, 255), 10000, 100, 100, -100); //intensidad, color, distancia, x, y, z luz2 = light3d(200, rgb(0, 255, 128), 1000, -100, 200, -100); jugador(0, 50, 0); //x, y, z scene3d.light = 0; scene3d.alpha = 100; scene3d[0].camera = id; y = 300; angle_y = -20000; ctype = c_scene3d; loop move_light3d(luz2, 200, -100, 200, 100); //id, intensidad, x, y, z if (key(_c_minus) and scene3d.light > 0) scene3d.light --; end if (key(_c_plus) and scene3d.light < 200) scene3d.light ++; end if (key(_esc)) exit("Amaka Soft 2015", 1); end frame; end end process jugador(x, y, z); private obj; colision1, colision2, colision3, colision4; txt1, txt2, txt3, txt4; begin obj = object3d(1, 1, #48f, 100, 2, x, y, z); //tipo, wireframe, color, alpha, trazado, x, y, z //aplica una textura a objeto texture_in_object3d(obj, tex, 4); //id, file, graph loop delete_text(txt1); delete_text(txt2); delete_text(txt3); delete_text(txt4); colision1 = collision_objects3d(obj1, obj); colision2 = collision_objects3d(obj2, obj); colision3 = collision_objects3d(obj3, obj); colision4 = collision_objects3d(obj4, obj); if (key(_left)) x -= 5; end if (key(_right)) x += 5; end if (key(_up)) z += 5; end if (key(_down)) z -= 5; end if (colision1) txt1 = write(0, 630, 10, 2, "colisiona con CUBO"); end if (colision2) txt2 = write(0, 630, 10, 2, "colisiona con ESFERA"); end if (colision3) txt3 = write(0, 630, 10, 2, "colisiona con TOROIDE"); end if (colision4) txt4 = write(0, 630, 10, 2, "colisiona con CILINDRO"); end move_object3d(obj, x, y, z, 0, 0, 0); //id, x, y, z, angle_x, angle_y, angle_z frame; end end
+
Tamaño Código:
Compilar Código
Compilando...