Hola,
Este juego fue el primero con movimiento que programe en javascript xD... esta echo 100% javascript + css + html :P
DEMO:
http://www.halfmusic.com/rompeladrillos.html
Codigo:
Código Javascript
:
Ver original// MIRARLO EN LA DEMO, PORQUE ES DEMASIADO LARGO Y ME PASO POR MUCHOS CARACTERES... XD
Modo de uso:
Código HTML:
Ver original<!--
#game {
background-color: #FFF;
height: 400px;
width: 500px;
border: 1px solid #000;
position: relative;
}
.ladrillo {
background-color: #F00;
height: 24px;
width: 55.5px;
position: absolute;
border: 1px solid #000;
line-height: 1px;
font-size: 1px;
}
#game #bola {
background-color: #999;
height: 5px;
width: 5px;
position: absolute;
line-height: 1px;
font-size: 1px;
left: -9px;
top: -26px;
}
#game #barra {
background-color: #000;
height: 10px;
width: 150px;
position: absolute;
}
.l1 {
background-color: #F00;
height: 23px;
width: 54.5px;
position: absolute;
border: 1px solid #000;
line-height: 1px;
font-size: 1px;
}
.l2 {
background-color: #00F;
height: 23px;
width: 54.5px;
position: absolute;
border: 1px solid #000;
line-height: 1px;
font-size: 1px;
}
.l3 {
background-color: #FF0;
height: 23px;
width: 54.5px;
position: absolute;
border: 1px solid #000;
line-height: 1px;
font-size: 1px;
}
.l4 {
background-color: #0FF;
height: 23px;
width: 54.5px;
position: absolute;
border: 1px solid #000;
line-height: 1px;
font-size: 1px;
}
.l5 {
background-color: #0F0;
height: 23px;
width: 54.5px;
position: absolute;
border: 1px solid #000;
line-height: 1px;
font-size: 1px;
}
-->
</style><div id="game" style="overflow:hidden;"> <div id="gano" style="display:none;"><h1>GANASTE TODO EL JUEGO!
</h1></div> <div id="campoGanoLevel" style="display:none;"><h1>GANASTE EL NIVEL!
</h1></div> // CODIGO DEL JUEGO
window.onload=function(){new HalfJueguego.ladrillos().init();};
Y es facil adaptar :p
Esta bajo licencia
GNU General Public License
Gracias
Salu2