This is a super maze game with some interesting working flow created with jquery. I love it. In this game you have to take the bomb to the end of the maze safely without touching any maze corner or line. To start the game, just click on bomb once and move your cursor. Dont drag the bomb just click on it once, and it will follow your mouse pointer itself. I hope you will enjoy this awesome game :)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
$(document).ready(function(){ var clicking = false; var blast = false; var blasts = false; var where = 0; $('#Move').click(function(){ if(clicking == false) clicking = true; else clicking = false; }); $('#maze').click(function(){ clicking = false; }); $(document).mouseover(function(e){ if(clicking == false){ return;} xpos = e.pageX; ypos = e.pageY; if((ypos > 520 && xpos > 420) || (ypos > 495 && xpos > 464)) { completed(); } if(ypos < 24 || xpos > 482 || ypos > 583 || xpos < 18) { blast = true;where=2; } else if(ypos >= 24 && ypos <= 77 && xpos >= 372 && xpos <= 404) { blast = true;where=3; } else if(ypos >= 30 && ypos <= 81 && xpos >= 422) { blast = true;where=4; } else if(ypos >= 39 && ypos <= 81 && xpos >= 47 && xpos <= 352) { blast = true;where=5; } else if(ypos >= 39 && ypos <= 189 && xpos >= 314 && xpos <= 352) { blast = true;where=6; } else if(ypos >= 92 && ypos <= 133 && xpos >= 317 && xpos <= 462) { blast = true;where=7; } else if(ypos >= 311 && ypos <= 352 && xpos >= 24 && xpos <= 80) { blast = true;where=8; } else if(ypos >= 311 && ypos <= 570 && xpos >= 47 && xpos <= 81) { blast = true;where=9; } else if(ypos >= 146 && ypos <= 188 && xpos >= 351 && xpos <= 460) { blast = true;where=10; } else if(ypos >= 146 && ypos <= 244 && xpos >= 428 && xpos <= 460) { blast = true;where=11; } else if(ypos >= 202 && ypos <= 243 && xpos >= 428) { blast = true;where=12; } else if(ypos >= 202 && ypos <= 243 && xpos >= 264 && xpos <= 408) { blast = true;where=13; } else if(ypos >= 92 && ypos <= 134 && xpos >= 47 && xpos <= 299) { blast = true;where=14; } else if(ypos >= 92 && ypos <= 188 && xpos >= 99 && xpos <= 134) { blast = true;where=15; } else if(ypos >= 147 && ypos <= 188 && xpos >= 99 && xpos <= 191) { blast = true;where=16; } else if(ypos >= 92 && ypos <= 188 && xpos >= 264 && xpos <= 296) { blast = true;where=17; } else if(ypos >= 148 && ypos <= 298 && xpos >= 47 && xpos <= 81) { blast = true;where=18; } else if(ypos >= 202 && ypos <= 243 && xpos >= 47 && xpos <= 242) { blast = true;where=19; } else if(ypos >= 147 && ypos <= 350 && xpos >= 209 && xpos <= 242) { blast = true;where=20; } else if(ypos >= 256 && ypos <= 515 && xpos >= 99 && xpos <= 134) { blast = true;where=21; } else if(ypos >= 311 && ypos <= 461 && xpos >= 155 && xpos <= 189) { blast = true;where=22; } else if(ypos >= 474 && xpos >= 155 && xpos <= 189) { blast = true; where=23; } else if(ypos >= 474 && ypos <= 514 && xpos >= 155 && xpos <= 299) { blast = true;where=24; } else if(ypos >= 420 && ypos <= 461 && xpos >= 155 && xpos <= 351) { blast = true;where=25; } else if(ypos >= 528 && xpos >= 99 && xpos <= 134) { blast = true;where=26; } else if(ypos >= 202 && ypos <= 353 && xpos >= 318 && xpos <= 348) { blast = true;where=27; } else if(ypos >= 258 && ypos <= 297 && xpos >= 374 && xpos <= 460) { blast = true;where=28; } else if(ypos >= 256 && ypos <= 458 && xpos >= 374 && xpos <= 406) { blast = true;where=29; } else if(ypos >= 365 && ypos <= 405 && xpos >= 319 && xpos <= 406) { blast = true;where=30; } else if(ypos >= 420 && ypos <= 460 && xpos >= 374) { blast = true;where=31; } else if(ypos >= 474 && ypos <= 515 && xpos >= 318 && xpos <= 460) { blast = true;where=32; } else if(ypos >= 422 && ypos <= 568 && xpos >= 318 && xpos <= 348) { blast = true;where=33; } else if(ypos >= 528 && ypos <= 567 && xpos >= 374 && xpos <= 460) { blast = true;where=34; } if(blast == true) { xpos2 = parseInt(xpos)-parseInt(20); ypos2 = parseInt(ypos)-parseInt(29); $('img#explosion').css({'left': xpos2+'px','top': ypos2+'px'}).show(); $('#Move').hide(); $('#lose').fadeIn(); clicking = false; return false; } xpos = parseInt(xpos)-parseInt(17); ypos = parseInt(ypos)-parseInt(22); $('#Move').css({'left': xpos+'px','top': ypos+'px'}); }); function completed() { $('#Move').hide(); $('#won').fadeIn(); clicking = false; } }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<script type="text/javascript" src="jquery-1.3.2.js">// <![CDATA[ mce:0 // ]]></script><script type="text/javascript" src="script.js">// <![CDATA[ mce:1 // ]]></script> <!-- body{ background:#fff} #maze{ background:url(maze.gif) top left no-repeat; height:610px; width:502px;float:left;} #Move{position:absolute; cursor:pointer; height:38px; margin-top:10px; left:0px;} #exit{ float:left; margin-top:500px; margin-left:-30px;} #explosion{ display:none; position:absolute} #won{ position:absolute; margin-top:460px; margin-left:-110px; display:none} #lose{ position:absolute; margin-top:460px; margin-left:-110px; display:none} --> <img id="Move" src="bomb.png" alt=""> <div id="maze"><img id="explosion" src="explosion.gif" alt=""></div> <img id="exit" src="exit.png" alt=""> <img id="won" src="won.png" alt=""> <img id="lose" src="lose.png" alt=""> |
Comments are closed.