Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add new levels

Cleanup server side script
Add a bonus animation
Add audio playing.
Add a start playing game button.
Add credits
Turn off the story/text when on the iphone.
Various fixes.
  • Loading branch information...
commit 88630a33865b341e3388be8b816f0c633c7f519f 1 parent 67e57b0
@icefox authored
Showing with 3,952 additions and 354 deletions.
  1. +1 −0  .gitignore
  2. +5 −0 .htaccess
  3. +77 −0 about.html
  4. +768 −0 anigma.js
  5. BIN  audio/04 Without You.mp3
  6. BIN  audio/All Systems Go.mp3
  7. BIN  audio/Alpha_C_-_Neon_Aurora.mp3
  8. BIN  audio/FantomenK - Tiny Tunes.mp3
  9. BIN  audio/Reflect 2.mp3
  10. BIN  audio/Siddhis - Wine Walls.mp3
  11. BIN  audio/Solo City.mp3
  12. BIN  audio/The Blackbird.mp3
  13. BIN  audio/aftershocksunrise.mp3
  14. BIN  audio/first.mp3
  15. BIN  audio/nullsleep_-_her_lazer_light_eyes.mp3
  16. +2 −0  cgi-bin/.htaccess
  17. +25 −0 cgi-bin/getlevel.cgi
  18. +102 −353 index.html
  19. +9 −0 levels/101.level
  20. +11 −0 levels/102.level
  21. +1 −1  levels/16.level
  22. +9 −0 levels/201.level
  23. +9 −0 levels/202.level
  24. +9 −0 levels/203.level
  25. +9 −0 levels/204.level
  26. +9 −0 levels/205.level
  27. +9 −0 levels/206.level
  28. +9 −0 levels/207.level
  29. +9 −0 levels/208.level
  30. +9 −0 levels/209.level
  31. +9 −0 levels/210.level
  32. +9 −0 levels/211.level
  33. +9 −0 levels/212.level
  34. +9 −0 levels/213.level
  35. +9 −0 levels/214.level
  36. +9 −0 levels/215.level
  37. +9 −0 levels/216.level
  38. +9 −0 levels/217.level
  39. +9 −0 levels/218.level
  40. +9 −0 levels/219.level
  41. +9 −0 levels/220.level
  42. +9 −0 levels/221.level
  43. +9 −0 levels/222.level
  44. +9 −0 levels/223.level
  45. +9 −0 levels/224.level
  46. +9 −0 levels/225.level
  47. +9 −0 levels/226.level
  48. +9 −0 levels/227.level
  49. +9 −0 levels/228.level
  50. +9 −0 levels/229.level
  51. +9 −0 levels/230.level
  52. +9 −0 levels/231.level
  53. +9 −0 levels/232.level
  54. +9 −0 levels/233.level
  55. +9 −0 levels/234.level
  56. +9 −0 levels/235.level
  57. +9 −0 levels/236.level
  58. +9 −0 levels/237.level
  59. +9 −0 levels/238.level
  60. +9 −0 levels/239.level
  61. +9 −0 levels/240.level
  62. +9 −0 levels/241.level
  63. +9 −0 levels/242.level
  64. +9 −0 levels/243.level
  65. +9 −0 levels/244.level
  66. +9 −0 levels/245.level
  67. +9 −0 levels/246.level
  68. +9 −0 levels/247.level
  69. +9 −0 levels/248.level
  70. +9 −0 levels/249.level
  71. +9 −0 levels/250.level
  72. +9 −0 levels/251.level
  73. +9 −0 levels/252.level
  74. +9 −0 levels/253.level
  75. +9 −0 levels/254.level
  76. +9 −0 levels/255.level
  77. +9 −0 levels/256.level
  78. +9 −0 levels/257.level
  79. +9 −0 levels/258.level
  80. +589 −0 levels/259.level
  81. 0  levels/260.level
  82. BIN  png/anigma.png
  83. BIN  png/arch.png
  84. BIN  png/background.png
  85. BIN  png/broken_wall.png
  86. BIN  png/cursor.png
  87. BIN  png/fire.png
  88. BIN  png/freezing_animation.png
  89. BIN  png/front_1.png
  90. BIN  png/front_title.png
  91. BIN  png/jewel_blue.png
  92. BIN  png/jewel_cyan.png
  93. BIN  png/jewel_gray.png
  94. BIN  png/jewel_green.png
  95. BIN  png/jewel_orange.png
  96. BIN  png/jewel_purple.png
  97. BIN  png/jewel_red.png
  98. BIN  png/jewel_white.png
  99. BIN  png/jewel_yellow.png
  100. BIN  png/trap_left.png
  101. BIN  png/trap_right.png
  102. BIN  png/wall.png
  103. +317 −0 style.css
  104. +385 −0 svg/background.svg
  105. +79 −0 svg/cursor.svg
  106. +127 −0 svg/jewel_blue.svg
  107. +175 −0 svg/jewel_green.svg
  108. +127 −0 svg/jewel_orange.svg
  109. +102 −0 svg/jewel_purple.svg
  110. +153 −0 svg/jewel_red.svg
  111. +116 −0 svg/jewel_white.svg
  112. +85 −0 svg/jewel_yellow.svg
  113. +172 −0 svg/wall.svg
  114. +2 −0  sync
View
1  .gitignore
@@ -0,0 +1 @@
+*.swp
View
5 .htaccess
@@ -0,0 +1,5 @@
+RewriteEngine on
+Options FollowSymLinks
+#RewriteBase /~ben/anigma_web/
+RewriteBase /anigma/
+RewriteRule ^levels/(.*)\.level$ cgi-bin/getlevel.cgi?$1 [env=LEVEL:$1]
View
77 about.html
@@ -0,0 +1,77 @@
+<html
+<head>
+ <title>About Anigma</title>
+ <link rel=stylesheet type="text/css" href="style.css">
+</head>
+<body>
+
+<div style="padding: 1em;">
+<h1>About</h1>
+Anigma is a test of various features that are proposed in CSS3. In particular this was my own way of trying out the new <a href="http://www.w3.org/TR/css3-transitions/">css3-transitions</a> and <a href="http://www.w3.org/TR/css3-animations/">css3-animations</a>. Anigma was tested on Arora, Safari and Google Chrome.
+<p>
+
+Some Easter Eggs features:<br>
+Hit the 'e' key to bring up a level editor.<br>
+Hit the 'k' key to bring up the debug form including a way to jump to any level you want.<br>
+
+<h4>SVG</h4>
+I hoped to have the game only use svg graphics, but currently there are some painting bugs related to transitions and svg images. Once these are fixed in WebKit I will update the game to point to the svg files rather then the rendered png's.
+
+<h1>Credits</h1>
+Anigma is inspired by the game <a href="http://benjamin-meyer.blogspot.com/2007/03/anigma-game.html">Anigma</a> which is a game written in C++ using the Qt library. None of the code in the C++ Anigma was re-used in the making of this Anigma only some of the levels and a few of the graphics. The Javascript code here in this demo is under the BSD.
+
+<h4>Images</h4>
+The Jewel images and background came from the game <a href="http://benjamin-meyer.blogspot.com/2007/03/anigma-game.html">Gweled</a> and <a href="http://games.kde.org/game.php?game=klines">KLines</a>. They are all under the GPLv2.
+
+<h4>Audio</h4>
+All of the background music is from <a href="http://8bitcollective.com">8bitcollective</a> and under the Creative Commons BY-NC-SA License.
+<ul>
+<li>First by <a href="http://8bitcollective.com/members/neil/">Neil</a>
+<li>Tiny Tunes by <a href="http://8bitcollective.com/members/FantomenK/">FantomenK</a>
+<li>Reflect 2 by <a href="http://8bitcollective.com/members/Nanoshine/">Nanoshine</a>
+<li>Neon Aurora by <a href="http://8bitcollective.com/members/Alpha+C/">Alpha C</a>
+<li>Wine Walls by <a href="http://8bitcollective.com/members/Siddhis/">Siddhis</a>
+<li>All Systems Go by <a href="http://8bitcollective.com/members/Emar/">Emar</a>
+<li>Aftershock Sunrise by <a href="http://8bitcollective.com/members/sleepy/">Sleepy</a>
+<li>Solo City by <a href="http://8bitcollective.com/members/Pompei/">Pompei</a>
+<li>Without You by <a href="http://8bitcollective.com/members/Pompei/">Pompei</a>
+<li>The Blackbird by <a href="http://8bitcollective.com/members/sailfish/">Sailfish</a>
+<li>Her Lazer Light Eyes by <a href="http://8bitcollective.com/music/Guest/186/">Nullsleep</a>
+</ul>
+
+<h1>Technical Details</h1>
+
+<h4>Movement</h4>
+The cursor and the jewel all have a transition property set on their top and left so when their position is changed via the mouse/keyboard they will slide across the screen. When an action causes the board to change (such as moving a jewel to the left/right) a functions checks to see if anything should fall down one block and if so sets their top property causing a transition.
+
+<h4>Removing Jewels</h4>
+When two jewels of the same type are next to each other the opacity is set to 0 starting a transition. The transition end event is used to actually remove the jewels from the dom allowing other jewels to fall down.
+
+<h4>Clock</h4>
+The countdown clock is a div that starts at the length of the screen and a background color of white. When the level is loaded the transition time is set to the time allowed for the level, the color is then set to red and width of 0 starting the transition. When the transition end event is fired it calls the function to drop the 'Out of time!' dialog.
+
+<h4>Score</h4>
+The score behaves similarly to the clock with a transition set on the width.
+
+<h4>Trap</h4>
+Use two background images with transitions followed by a change in id to a wall on the completion of the transition (via the end event).
+
+<h4>Fire & Crumble</h4>
+While this could have been done with an animated gif easily enough I tried out the CSS3 animations and setup keyframes to move the background offsets to the correct location in the image/sprite.
+
+<h4>Other</h4>
+Several other fun new properties were used including:
+<ul>
+<li>-webkit-background-size - cause the background image to scale to the width of the screen
+<li>-webkit-transform: - rotate the CSS3 logo 90 degres.
+<li>-webkit-border-radius and -webkit-box-shadow on the message box.
+<li>The HTML5 audio tag.
+</ul>
+
+<h1>Contact</h1>
+
+If you have any questions or feedback feel free to send me an <a href="mailto:ben@meyerhome.net">email</a>.
+
+</div>
+
+</body>
View
768 anigma.js
@@ -0,0 +1,768 @@
+/**
+ * Copyright (c) 2010, Benjamin C. Meyer <ben@meyerhome.net>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the author nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+TODO
+ Loading level animation.
+ Order Levels in a fun manner
+*/
+
+function logg(string)
+{
+// log.innerHTML = log.innerHTML + ' ' +string + '<br>';
+}
+
+function getCookie(cookieName)
+{
+ if (document.cookie.length <= 0) {
+ return '';
+ }
+
+ var cookieStart = document.cookie.indexOf(cookieName + '=');
+ if (cookieStart === -1) {
+ return -1;
+ }
+
+ cookieStart = cookieStart + cookieName.length + 1;
+ var cookieEnd = document.cookie.indexOf(';', cookieStart);
+ if (cookieEnd === -1) {
+ cookieEnd = document.cookie.length;
+ }
+ return unescape(document.cookie.substring(cookieStart, cookieEnd));
+}
+
+function checkForWebKitBrowser()
+{
+ var regexp = /WebKit\/([\d.]+)/;
+ if (!regexp.exec(navigator.userAgent)) {
+ showMessageBox('Sorry, Anigma requires a WebKit browser such as <a href="http://www.apple.com/safari/">Safari</a>, <a href="http://www.google.com/chrome">Chrome</a>, or <a href="http://arora-browser.org">Arora</a>');
+ return false;
+ }
+
+ var regexp = /iPhone\/([\d.]+)/;
+ if (regexp.exec(navigator.userAgent)) {
+ story = document.getElementById('story');
+ story.style.display = 'none';
+ }
+ return true;
+}
+
+function changeScore(amount)
+{
+ score += amount;
+ scoreDisplay.style.width = score;
+ if (score < 0) {
+ showMessageBox('Game Over!');
+ }
+}
+
+function loadLevelFile(level)
+{
+ document.getElementById('levelEditor').value = level;
+
+ dialog = document.getElementById('messagebox');
+ dialog.style.opacity = 0;
+ dialog.style.top = '-13em';
+
+ levelDisplay.innerHTML = '#' + currentLevel;
+ logtimestart = new Date().getTime();
+ levelLog = '';
+
+ var index = 0;
+ while (index < board.childNodes.length) {
+ if (board.childNodes[index].className === 'gameobject') {
+ board.removeChild(board.childNodes[index]);
+ } else {
+ ++index;
+ }
+ }
+
+ cursor = document.createElement('div');
+ cursor.className = 'gameobject';
+ cursor.id = 'cursor';
+ cursor.style.width = size;
+ cursor.style.height = size;
+ board.appendChild(cursor);
+ cursor.selected = true;
+ cursor.style.webkitBackgroundSize = size + 'px ' + size + 'px';
+ toggleSelection();
+
+ var rows = level.split('\n');
+ var height = size * (rows.length - 2);
+ if (height <= 0) {
+ currentLevel = 1;
+ loadLevel();
+ return;
+ }
+
+ if (height > 25 * size) {
+ // massive failure of the unknown type, level isn't actually a level file?
+ showMessageBox('Error Loading Level: ' + currentLevel + ', sorry.');
+ return false;
+ }
+ board.style.height = height;
+ board.style.marginTop = (11 * size) - (height);
+
+ var width;
+ for (var i = 0; i < rows.length -1; ++i) {
+ var row = rows[i + 1];
+ for (var j = 0; j < row.length; ++j) {
+ width = size * row.length;
+ if (row[j] === '.') {
+ continue;
+ }
+
+ var item = document.createElement('div');
+ item.className = 'gameobject';
+ item.id = row[j];
+
+ item.style.posTop = i * size;
+ item.style.posLeft = j * size;
+ item.style.width = size;
+ item.style.height = size;
+
+ switch(row[j]) {
+ case 'C':
+ item.addEventListener('webkitAnimationEnd',
+ function() { this.parentNode.removeChild(this); checkGravity(); }, false);
+ break;
+
+ case 'F':
+ item.style.webkitBackgroundSize = 10 * size + 'px ' + size + 'px';
+ break;
+
+ case 'W':
+ break;
+
+ // Jewels
+ case 'B':
+ case 'R':
+ case 'Y':
+ case 'G':
+ case 'P':
+ case 'A':
+ case 'H':
+ case 'E':
+ item.addEventListener('webkitTransitionEnd', movmentTransitionDone, false);
+ item.onclick = function() { selectJewel(this); };
+ item.style.webkitBackgroundSize = size + 'px ' + size + 'px';
+ break;
+
+ case 'T':
+ item.style.webkitBackgroundSize = size + 'px ' + size + 'px';
+ item.closed = false;
+ item.addEventListener('webkitTransitionEnd', function() { this.id = 'W'; }, false);
+ break;
+
+ case 'M':
+ currentLevel++;
+ loadLevel();
+ return;
+ item.startAnimationY = i;
+ item.endAnimationY = parseInt(row[j+3] + row[j+4], 10);
+ var diff = item.startAnimationY - item.endAnimationY;
+ item.style.webkitTransitionDuration = diff / 2 + 's';
+ item.startAnimationY = size * i;
+ item.endAnimationY = size * parseInt(row[j+3] + row[j+4], 10);
+
+ var first = row.substring(0, j);
+ var second = row.substring(j + 4);
+ row = first + second;
+ item.style.posTop = item.startAnimationY;
+ item.addEventListener('webkitTransitionEnd', swap_mover, false);
+ item.direction = true;
+ break;
+
+ default:
+ item.innerHTML = row[j];
+ break;
+ }
+
+ board.appendChild(item);
+ }
+ }
+
+ cursor.style.posTop = 3 * size;
+ cursor.style.posLeft = 3 * size;
+
+ board.style.width = width;
+ board.style.marginLeft = (document.body.clientWidth / 2) - (width / 2);
+
+ board.style.webkitBackgroundSize = board.style.width + ' ' + board.style.height;
+
+ clock.time = parseInt(rows[0].split('-')[3], 10) * 4;
+ if (clock.time < 30) {
+ clock.time = 30;
+ }
+ clock.style.webkitTransitionDuration = '0s';
+ clock.style.width = document.body.clientWidth;
+ clock.style.backgroundColor = 'white';
+ setTimeout(startLevelAnimations, 100);
+ levelCompleted = false;
+}
+
+function loadLevel()
+{
+ var xmlhttp = new XMLHttpRequest();
+ xmlhttp.onreadystatechange = function() {
+ if (xmlhttp.readyState === 4) {
+ loadLevelFile(xmlhttp.responseText);
+ logg(xmlhttp.status);
+ if (xmlhttp.status !== 200 && xmlhttp.status !== 0) {
+ currentLevel = 1;
+ loadLevel();
+ } else {
+ loadLevelFile(xmlhttp.responseText);
+ }
+ }
+ };
+ xmlhttp.open('POST', 'levels/' + currentLevel + '.level', true);
+ xmlhttp.send(levelLog);
+}
+
+function startLevelAnimations()
+{
+ for (var i = 0; i < board.childNodes.length; ++i) {
+ var node = board.childNodes[i];
+ if (node.id !== 'M') {
+ continue;
+ }
+ node.style.posTop = node.endAnimationY;
+ }
+ clock.style.width = '0px';
+ clock.style.backgroundColor = 'red';
+ clock.style.webkitTransitionDuration = clock.time + 's';
+ clock.style.webkitTransitionProperty = 'width background-color';
+ clock.addEventListener('webkitTransitionEnd', outOfTime, false);
+ checkGravity();
+}
+
+function restartLevel()
+{
+ if (document.getElementById('debug').style.display !== 'none') {
+ input = document.getElementById('level');
+ currentLevel = input.value;
+ } else if (score < 0) {
+ return;
+ }
+
+ changeScore(-10);
+ loadLevel();
+}
+
+function showMessageBox(message)
+{
+ var messageBox = document.getElementById('messagebox');
+ messageBox.innerHTML = message
+ messageBox.style.top = '0';
+ messageBox.style.opacity = 0.8;
+}
+
+function outOfTime()
+{
+ if (levelCompleted)
+ return;
+ showMessageBox('Out of Time!');
+ changeScore(-1);
+}
+
+function swap_mover()
+{
+ if (levelCompleted) {
+ return;
+ }
+ if (this.direction) {
+ this.style.posTop = this.startAnimationY;
+ } else {
+ this.style.posTop = this.endAnimationY;
+ }
+ this.direction = !this.direction;
+}
+
+function movmentTransitionDone()
+{
+ logg('webkitTransitionEnd ' + this.id);
+ checkElement(this);
+}
+
+function checkGravityOnNode(node)
+{
+ var x = node.style.posLeft;
+ var y = node.style.posTop;
+ var bNode = getGameElementAt(x, y + size);
+ if (bNode.id === 'C' ) {
+ bNode.style.webkitAnimationIterationCount = 1;
+ }
+ if (bNode.id === 'M') {
+ node.parentNode.removeChild(node);
+ bNode.appendChild(node);
+ node.style.posLeft = 0;
+ node.style.posTop = -size;
+ }
+
+ if (bNode.id === 'T' && bNode.closed !== true) {
+ bNode.closed = true;
+ bNode.style.backgroundPosition = '0';
+ bNode = NaN;
+ }
+
+ if (bNode.id === 'F' && bNode.beingPutOut !== true) {
+ bNode.beingPutOut = true;
+ //node.addEventListener('webkitTransitionEnd', function() { bNode.id = 'W'; }, false);
+ removeJewel(node);
+ bNode.id = 'W';
+ bNode.style.webkitBackgroundSize = size + 'px ' + size + 'px';
+ bNode = NaN;
+ }
+
+ if (!bNode) {
+ logg('falling ' + ' ' + bNode + ' ' + node.id);
+ node.style.posTop += size;
+ if (node && node === cursor.selectedElement) {
+ cursor.style.posTop += size;
+ }
+ return true;
+ }
+ return false;
+}
+
+function checkGravity()
+{
+ logg('checkgravity');
+ for (var i = board.childNodes.length -1; i >= 0; --i) {
+ var node = board.childNodes[i];
+ switch (node.id) {
+ case 'B':
+ case 'Y':
+ case 'G':
+ case 'P':
+ case 'R':
+ case 'A':
+ case 'H':
+ case 'E':
+ checkGravityOnNode(node);
+ break;
+ }
+ }
+}
+
+function playBackgroundAudio()
+{
+ var audio = document.getElementById('audio');
+ if (!audio)
+ return;
+ audio.pause();
+ audio.currentSong += 1;
+ if (audio.currentSong > 10)
+ audio.currentSong = 0;
+ switch(audio.currentSong) {
+ case 0: audio.setAttribute('src', 'audio/aftershocksunrise.mp3'); break;
+ case 1: audio.setAttribute('src', 'audio/All Systems Go.mp3'); break;
+ case 2: audio.setAttribute('src', 'audio/nullsleep_-_her_lazer_light_eyes.mp3'); break;
+ case 3: audio.setAttribute('src', 'audio/first.mp3'); break;
+ case 4: audio.setAttribute('src', 'audio/Solo City.mp3'); break;
+ case 5: audio.setAttribute('src', 'audio/Alpha_C_-_Neon_Aurora.mp3'); break;
+ case 6: audio.setAttribute('src', 'audio/Siddhis - Wine Walls.mp3'); break;
+ case 7: audio.setAttribute('src', 'audio/FantomenK - Tiny Tunes.mp3'); break;
+ case 8: audio.setAttribute('src', 'audio/The Blackbird.mp3'); break;
+ case 9: audio.setAttribute('src', 'audio/Reflect 2.mp3'); break;
+ case 10: audio.setAttribute('src', 'audio/04 Without You.mp3'); break;
+ }
+ audio.load();
+ audio.play();
+}
+
+function endLevelAnimation()
+{
+ var completedAnimation = document.getElementById('completed');
+
+ switch(Math.floor(Math.random() * 8)) {
+ case 0: completedAnimation.style.backgroundImage = 'url("png/jewel_yellow.png")'; break;
+ case 1: completedAnimation.style.backgroundImage = 'url("png/jewel_orange.png")'; break;
+ case 2: completedAnimation.style.backgroundImage = 'url("png/jewel_blue.png")'; break;
+ case 3: completedAnimation.style.backgroundImage = 'url("png/jewel_green.png")'; break;
+ case 4: completedAnimation.style.backgroundImage = 'url("png/jewel_red.png")'; break;
+ case 5: completedAnimation.style.backgroundImage = 'url("png/jewel_white.png")'; break;
+ case 6: completedAnimation.style.backgroundImage = 'url("png/jewel_cyan.png")'; break;
+ case 7: completedAnimation.style.backgroundImage = 'url("png/jewel_gray.png")'; break;
+ }
+
+ completedAnimation.style.posTop = Math.floor(Math.random() * document.body.clientHeight);
+ if (completedAnimation.direction === 0) {
+ completedAnimation.direction = 1;
+ completedAnimation.style.posLeft = document.body.clientWidth;
+ completedAnimation.style.webkitTransform = 'rotate(360deg)';
+ } else {
+ completedAnimation.direction = 0;
+ completedAnimation.style.posLeft = -50;
+ completedAnimation.style.webkitTransform = 'rotate(-360deg)';
+ }
+}
+
+function checkLevel()
+{
+ if (levelCompleted === true)
+ return;
+
+ for (var i = 0; i < board.childNodes.length; ++i) {
+ var node = board.childNodes[i];
+ if (node.className !== 'gameobject') {
+ continue;
+ }
+ switch (node.id) {
+ case 'B':
+ case 'Y':
+ case 'A':
+ case 'H':
+ case 'E':
+ case 'G':
+ case 'P':
+ case 'R':
+ return;
+ }
+ }
+
+ levelCompleted = true;
+ clock.style.backgroundColor = 'white';
+ ++currentLevel;
+ var expirationDate = new Date();
+ expirationDate.setDate(expirationDate.getDate() + 365);
+ document.cookie = 'level=' + escape(currentLevel) + ';expires=' + expirationDate.toGMTString();
+ document.cookie = 'score=' + escape(score) + ';expires=' + expirationDate.toGMTString();
+ document.cookie = 'levelLog=' + escape(levelLog) + ';expires=' + expirationDate.toGMTString();
+
+ if (currentLevel == 50) {
+ showCredits();
+ } else {
+ // At the end of this animation loadLevel will be called.
+ endLevelAnimation()
+ }
+}
+
+function getGameElementAt(x, y)
+{
+ for (var i = 0; i < board.childNodes.length; ++i) {
+ var node = board.childNodes[i];
+ if (node.className !== 'gameobject') {
+ continue;
+ }
+ if(node.id === 'cursor') {
+ continue;
+ }
+
+ var ny = node.style.posTop;
+ var nx = node.style.posLeft;
+ if (nx === x && ny === y) {
+ return node;
+ }
+ if (node.id === 'M' && x === nx) {
+ logg(y + ' ' + ny);
+ if (y - ny < size && y - ny > -size) {
+ return node;
+ }
+ }
+ }
+ return NaN;
+}
+
+function clicked_on_board()
+{
+ if (!cursor)
+ return;
+ var node = cursor.selectedElement;
+ if (!node) {
+ return;
+ }
+ var x = parseInt(event.clientX, 10) - parseInt(board.style.marginLeft.split('px')[0], 10);
+ if (x < node.style.posLeft) {
+ moveSelection(-size, 0);
+ } else {
+ moveSelection(size, 0);
+ }
+}
+
+function selectJewel(node)
+{
+ if (document.getElementById('messagebox').style.opacity != '0') {
+ return;
+ }
+
+ if (!node || node.id === 'W') {
+ return;
+ }
+ event.cancelBubble = true;
+ cursor.selectedElement = node;
+ cursor.selected = true;
+ cursor.style.opacity = 1;
+ cursor.style.posLeft = node.style.posLeft;
+ cursor.style.posTop = node.style.posTop;
+ logPlayerActions(node);
+}
+
+function logPlayerActions(node)
+{
+ levelLog += node.style.posLeft + ' ' + node.style.posTop + ' ';
+ levelLog += (new Date().getTime()) - logtimestart + '\n';
+ levelLogDisplay.value = levelLog;
+}
+
+function toggleSelection()
+{
+ if (cursor.selected) {
+ cursor.selected = false;
+ cursor.selectedElement = NaN;
+ cursor.style.opacity = 0.5;
+ } else {
+ var node = getGameElementAt(cursor.style.posLeft, cursor.style.posTop);
+ selectJewel(node);
+ }
+}
+
+function removeJewel(node)
+{
+ if (node && node === cursor.selectedElement) {
+ toggleSelection();
+ }
+
+ var f = function(event) {
+ logg('Removing Jewel' + node.id);
+ changeScore(2);
+ if (node && node === cursor.selectedElement) {
+ toggleSelection();
+ }
+ node.parentNode.removeChild(node);
+ setTimeout(checkLevel, 1000);
+ checkGravity();
+ checkLevel();
+ };
+ node.removeEventListener('webkitTransitionEnd', movmentTransitionDone, false);
+ node.removeEventListener('webkitTransitionEnd', f, false);
+ node.addEventListener('webkitTransitionEnd', f, false);
+ node.style.opacity = 0;
+}
+
+function checkElement(node)
+{
+ logg('checkElement: ' + node.id);
+
+ var x = node.style.posLeft;
+ var y = node.style.posTop;
+ var removed = false;
+
+ var bNode = getGameElementAt(x, y + size);
+ if (bNode && bNode.id === node.id) {
+ logg('match below:' + bNode.id);
+ removeJewel(bNode);
+ removed = true;
+ }
+
+ if (!bNode) {
+ checkGravity();
+ return;
+ }
+
+ var leftNode = getGameElementAt(x - size, y);
+ if (leftNode && leftNode.id === node.id) {
+ logg('match left: ' + leftNode.id);
+ removeJewel(leftNode);
+ removed = true;
+ }
+
+ var rNode = getGameElementAt(x + size, y);
+ if (rNode && rNode.id === node.id) {
+ logg('match right: ' + rNode.id);
+ removeJewel(rNode);
+ removed = true;
+ }
+
+ if (removed) {
+ logg('removed something, so lets remove:' + node.id);
+ removeJewel(node);
+ } else {
+ checkGravity();
+ }
+}
+
+function moveSelection(x, y)
+{
+ if (document.getElementById('messagebox').style.opacity != '0') {
+ return;
+ }
+
+ var allow = true;
+ var newx = cursor.style.posLeft + x;
+ var newy = cursor.style.posTop + y;
+ if (newx < 0 || newy < 0
+ || newx > board.style.width || newy > board.style.height) {
+ return;
+ }
+
+ if (cursor.selected) {
+ var node = getGameElementAt(newx, newy);
+ if (node || y < 0) {
+ allow = false;
+ }
+ }
+
+ if (!allow) {
+ return;
+ }
+
+ cursor.style.posLeft = newx;
+ cursor.style.posTop = newy;
+ if (cursor.selected) {
+ var selectedNode = cursor.selectedElement;
+ selectedNode.style.posLeft += x;
+ selectedNode.style.posTop += y;
+
+ logPlayerActions(selectedNode);
+ }
+}
+
+function keyUpEvent()
+{
+ switch(event.keyCode)
+ {
+ case 32: // spacebar
+ toggleSelection();
+ break;
+
+ case 65: // a
+ case 37: // left arrow
+ moveSelection(-size, 0);
+ break;
+
+ case 68: // d
+ case 39: // right arrow
+ moveSelection(size, 0);
+ break;
+
+ case 83: // s
+ case 40: // down arrow
+ moveSelection(0, size);
+ break;
+
+ case 87: // w
+ case 38: // up arrow
+ moveSelection(0, -size);
+ break;
+
+ case 13: // enter
+ restartLevel();
+ break;
+
+ case 69: // e
+ document.getElementById('editor').style.display = 'block';
+ break;
+
+ // Show the debug form
+ case 75: // k
+ document.getElementById('debug').style.display = 'block';
+ break;
+ }
+}
+
+function loadGame()
+{
+ if (checkForWebKitBrowser() == false)
+ return;
+
+
+ score = 0;
+ size = 40;
+ document.onkeyup = keyUpEvent;
+ scoreDisplay = document.getElementById('score');
+ log = document.getElementById('log');
+ levelLogDisplay = document.getElementById('levellog');
+ levelDisplay = document.getElementById('currentLevel');
+ board = document.getElementById('board');
+ board.style.marginLeft = (document.body.clientWidth / 6);
+ board.onclick = function() { clicked_on_board(); };
+ clock = document.getElementById('clock');
+ cursor = document.getElementById('cursor');
+ document.getElementById('debug').style.display = 'none';
+
+ var credits = document.getElementById('credits');
+ credits.addEventListener('webkitTransitionEnd', restartGame, false);
+
+ var completedNode = document.getElementById('completed');
+ completedNode.addEventListener('webkitTransitionEnd', loadLevel, false);
+ completedNode.direction = 0;
+
+ currentLevel = parseInt(getCookie('level'), 10);
+ if (isNaN(currentLevel) || currentLevel < 0) {
+ currentLevel = 1;
+ }
+ levelLog = getCookie('levelLog');
+
+ var startingScore = parseInt(getCookie('score'), 10);
+ if (isNaN(startingScore) || startingScore <= 0) {
+ startingScore = 50;
+ }
+ changeScore(startingScore);
+ playBackgroundAudio();
+}
+
+function launch(haveAudio) {
+ if (haveAudio) {
+ audio = document.createElement('audio');
+ audio.addEventListener('ended', function () { playBackgroundAudio(); } );
+ audio.id = 'audio';
+ document.body.appendChild(audio);
+ audio.setAttribute('controls', 'true');
+ audio.currentSong = 0;
+ playBackgroundAudio();
+ audio.volume = 0.2;
+ }
+ document.getElementById('launchgame').style.display = 'none';
+ loadLevel();
+}
+
+function restartGame()
+{
+ var credits = document.getElementById('credits');
+ board.style.display = 'block';
+ clock.style.display = 'block';
+ credits.style.display = 'none';
+ currentLevel = 1;
+ loadLevel();
+}
+
+function showCredits() {
+ board.style.display = 'none';
+ clock.style.display = 'none';
+ var credits = document.getElementById('credits');
+ credits.style.top = document.body.clientHeight;
+ credits.style.display = 'block';
+ credits.style.webkitTransitionProperty = 'top';
+ height = window.getComputedStyle(credits, null).height;
+ credits.style.top = '-' + height.split('px')[0] - document.body.clientHeight;
+}
+
+loadGame();
+
View
BIN  audio/04 Without You.mp3
Binary file not shown
View
BIN  audio/All Systems Go.mp3
Binary file not shown
View
BIN  audio/Alpha_C_-_Neon_Aurora.mp3
Binary file not shown
View
BIN  audio/FantomenK - Tiny Tunes.mp3
Binary file not shown
View
BIN  audio/Reflect 2.mp3
Binary file not shown
View
BIN  audio/Siddhis - Wine Walls.mp3
Binary file not shown
View
BIN  audio/Solo City.mp3
Binary file not shown
View
BIN  audio/The Blackbird.mp3
Binary file not shown
View
BIN  audio/aftershocksunrise.mp3
Binary file not shown
View
BIN  audio/first.mp3
Binary file not shown
View
BIN  audio/nullsleep_-_her_lazer_light_eyes.mp3
Binary file not shown
View
2  cgi-bin/.htaccess
@@ -0,0 +1,2 @@
+Options +ExecCGI
+AddHandler cgi-script .cgi .pl
View
25 cgi-bin/getlevel.cgi
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+level="${QUERY_STRING}"
+if [ -z "${level}" ] ; then
+ level=1
+fi
+
+log=`cat`
+if [ -z "${log}" ] ; then
+ level=$level;
+else
+ mkdir logs/$level;
+ file=`date +%m%d%y_%H_%M_%s`;
+ let lastlevel=$level - 1;
+ echo "${log}" > logs/$lastlevel/$file;
+fi
+
+let level=$level+200;
+
+echo "Status: 200";
+echo "Content-type: text/html";
+echo "";
+cat ../levels/${level}.level;
+
+#printenv
View
455 index.html
@@ -1,362 +1,111 @@
<html>
-<head>
-<style type="text/css">
-
-#board {
- position: relative;
- margin: 0;
- padding: 0;
- background-image:url("../pics/graphics/background.png");
- background-position: left top;
- background-repeat: no-repeat;
- background-attachment: absolute;
- color: white;
- clear: both;
-}
-
-div.gameobject {
- width: 20px;
- height: 20px;
- position: absolute;
-}
-
-#W,#M {
- z-index: 0;
- background-image:url('../pics/graphics/wall.png')
-}
-
-#Y { background-image:url("../pics/themes/Default/blue_small.png_") }
-#G { background-image:url("../pics/themes/Default/cyan_small.png_") }
-#B { background-image:url("../pics/themes/Default/green_small.png_") }
-#P { background-image:url("../pics/themes/Default/purple_small.png_") }
-#C { background-image:url("../pics/graphics/broken_wall.png") }
-
-#C,#P,#G,#Y,#B,#M {
- z-index: 2;
-}
-#C,#P,#G,#Y,#B,#selector {
- -webkit-transition: left 1s linear;
- -webkit-transition: top 1s linear;
- -webkit-transition: opacity .5s linear;
-}
-
-#M {
- -webkit-transition: top 1s linear;
-}
-
-div#selector {
- z-index: 1;
- opacity: .5;
-}
-</style>
+<head>
+ <title>Anigma</title>
+ <link rel=stylesheet type="text/css" href="style.css">
</head>
-<body>
-<h1>Anigma</h1>
-<div id="clock">Time left:</div>
+<body>
+<div id="completed"></div>
+<div id="score"></div>
+
+<div id="backgrounddata">
+ <div id="title">Anigma</div>
+ <div id="currentLevel"></div>
+ <div id="css3Logo">CSS3</div>
+ <div id="story">While wondering in the woods Madelina's discovered a cave filled with jewels. Help Madelina collect all of the jewels in each cavern by touching jewels of the same color together.<p>
+ Use the arrow keys or the mouse to select jewels and move them.<p>Hit 'E' to pull up the level editor and make your own levels.</div>
+</div>
<div id="board">
+ <div id="launchgame">
+ <input id="play1" type="button" value="Play Game" onclick="launch(false)"><br>
+ <br>
+ <input id="play2" type="button" value="Play Game with Audio" onclick="launch(true)">
+ </div>
+ <div id="messagebox"></div>
</div>
-
-<script type="text/javascript">
-
-function loadGame() {
- size = 20;
- currentLevel = 1;
- board = document.getElementById("board");
- clock = document.getElementById("clock");
- selector = document.getElementById("selector");
-
- loadLevel();
-}
-
-function tick()
-{
- clock.time -= 1;
- clock.innerHTML = "Time left: " + clock.time + " seconds";
- if (clock.time == 0) {
- clearInterval(clock.clear)
- clock.innerHTML = "Game Over";
- }
- for (var i = 0; i < movers.length; ++i) {
- if (movers[i].direction)
- movers[i].style.posTop = movers[i].startAnimationY;
- else
- movers[i].style.posTop = movers[i].endAnimationY;
- movers[i].direction = !movers[i].direction;
- }
- //checkGravity();
-}
-
-function broken_wall()
-{
- crumble.style.backgroundPosition = 100 - crumble.time * size + " 0";
- crumble.time++;
- if (crumble.time == 6) {
- clearInterval(crumble.clear)
- crumble.parentNode.removeChild(crumble);
- crumble = NaN;
- }
-}
-
-function loadLevel()
-{
- movers = new Array();
- while ( board.childNodes.length >= 1 ) {
- board.removeChild( board.firstChild );
- }
-
- if (window.XMLHttpRequest)
- {// code for IE7+, Firefox, Chrome, Opera, Safari
- xmlhttp = new XMLHttpRequest();
- }
- xmlhttp.open("GET", "levels/" + currentLevel + ".level", false);
- xmlhttp.send(null);
- var level = xmlhttp.responseText;
-
- selector = document.createElement("div");
- selector.className = "gameobject";
- selector.id = "selector";
- board.appendChild(selector);
- selector.selected = true;
- toggleSelection();
-
- var rows = level.split("\n");
- board.style.height = size * (rows.length - 2);
- for (var i = 0; i < rows.length -1; ++i) {
- var row = rows[i + 1];
- for (var j = 0; j < row.length; ++j) {
- board.style.width = size * row.length;
- if (row[j] == '.')
- continue;
- var item = document.createElement("div");
- if (row[j] != 'W') {
- selector.style.posTop = i * size;
- selector.style.posLeft = j * size;
- }
-
-
- if (row[j] != 'B'
- && row[j] != 'Y'
- && row[j] != 'G'
- && row[j] != 'P'
- && row[j] != 'W'
- && row[j] != 'C')
- item.innerHTML = row[j];
- item.innerHTML = row[j];
- item.style.posTop = i * size;
- item.style.posLeft = j * size;
- item.className = "gameobject";
- item.id = row[j];
- item.gametype = row[j];
-
- if (row[j] == 'M') {
- item.direction = true;
- item.startAnimationY = size * i;
- item.endAnimationY = size * parseInt(row[j+3] + row[j+4]);
- var first = row.substring(0, j);
- var second = row.substring(j + 4);
- row = first + second;
- movers[movers.length] = item;
- }
- board.appendChild(item);
- }
- }
- clearInterval(clock.clear)
- clock.time = rows[0].split('-')[3];
- clock.clear = setInterval('tick()', 1000);
-}
-
-
-function checkGravityOnNode(node)
-{
- var x = node.style.posLeft;
- var y = node.style.posTop;
- var bNode = getGameElementAt(x, y + size);
- if (!bNode && !node.animating) {
- node.animating = true;
- node.addEventListener('webkitTransitionEnd', function() {
- node.animating = false;
- checkGravityOnNode(this);
- checkElement(this);
- }, false);
- node.style.posTop += size;
- if (node == selector.selectedElement)
- toggleSelection();
- }
-}
-
-function checkGravity()
-{
- for (var i = 0; i < board.childNodes.length; ++i) {
- var node = board.childNodes[i];
- switch (node.id) {
- case 'B':
- case 'Y':
- case 'G':
- case 'P':
- break;
- default:
- continue;
- }
- checkGravityOnNode(node);
- }
-}
-
-function checkLevel()
-{
- for (var i = 0; i < board.childNodes.length; ++i) {
- var node = board.childNodes[i];
- if (node.className != "gameobject")
- continue;
- switch (node.id) {
- case 'B':
- case 'Y':
- case 'G':
- case 'P':
- return;
- }
- }
- ++currentLevel;
- loadLevel();
-}
-
-function getGameElementAt(x, y)
-{
- for (var i = 0; i < board.childNodes.length; ++i) {
- var node = board.childNodes[i];
- if (node.className != "gameobject")
- continue;
- if(node.id != 'selector'
- && node.style.posTop == y
- && node.style.posLeft == x)
- return node;
- }
- return NaN;
-}
-
-function toggleSelection()
-{
- if (selector.selected) {
- selector.selected = false;
- selector.style.backgroundColor = "white";
- } else {
- var node = getGameElementAt(selector.style.posLeft, selector.style.posTop);
- if (node && node.id != 'W') {
- selector.selectedElement = node;
- selector.selected = true;
- selector.style.backgroundColor = "red";
- }
- }
-}
-
-function removeJewel(node)
-{
- node.addEventListener('webkitTransitionEnd', function() { this.parentNode.removeChild(this); }, false);
- node.style.opacity = 0;
-}
-
-
-function checkElement(node)
-{
- var x = node.style.posLeft;
- var y = node.style.posTop;
- var leftNode = getGameElementAt(x - size, y);
- var removed = false;
- if (leftNode && leftNode.id == node.id) {
- removeJewel(leftNode);
- removed = true;
- }
- var bNode = getGameElementAt(x, y + size);
- if (bNode && bNode.id == node.id) {
- removeJewel(bNode);
- removed = true;
- }
- var rNode = getGameElementAt(x + size, y);
- if (rNode && rNode.id == node.id) {
- removeJewel(rNode);
- removed = true;
- }
-
- if (bNode.id == 'C' ) {
- crumble = bNode;
- crumble.time = 0;
- crumble.clear = setInterval('broken_wall()', 1000);
- }
-
- if (removed) {
- removeJewel(node);
- toggleSelection();
- }
-}
-
-function moveSelection(x, y)
-{
- var allow = true;
- var newx = selector.style.posLeft + x;
- var newy = selector.style.posTop + y;
- if (newx < 0 || newy < 0
- || newx > board.style.width || newy > board.style.height)
- return;
-
- if (selector.selected) {
- if (y < 0)
- allow = false;
- var node = getGameElementAt(newx, newy);
- if (node && node.gametype != ".") {
- allow = false;
- }
- }
-
- if (!allow)
- return;
- selector.style.posLeft = newx;
- selector.style.posTop = newy;
- if (selector.selected) {
- var node = selector.selectedElement;
- node.style.posLeft += x;
- node.style.posTop += y;
- checkElement(node);
- checkLevel();
- }
-}
-
-document.onkeyup = KeyCheck;
-function KeyCheck()
-{
- if (clock.time == 0)
- return;
- var KeyID = event.keyCode;
- switch(KeyID)
- {
- case 32: // Spacebar
- toggleSelection();
- break;
-
- case 37: // left
- moveSelection(-size, 0);
- break;
-
- case 38: // up
- moveSelection(0, -size);
- break;
-
- case 39: // right
- moveSelection(size, 0);
- break;
-
- case 40: // down
- moveSelection(0, size);
- break;
- }
-}
-</script>
-
+<div id="clock"></div>
+
+
+<div id="restartLevel"><a href="javascript:restartLevel();">Restart Level</a></div>
+<div id="about"><a href="about.html">About / Credits</a></div>
+<div id="copyright">Copyright <a href="mailto:ben@meyerhome.net">Benjamin C. Meyer</a> 2010</div>
+
+<form id="debug">
+ <input id="level" type="text" value="101">
+ <input id="restartlevelbutton" type="button" value="Restart Level" onclick="restartLevel()">
+ <textarea id="levellog" cols=20 rows=2></textarea>
+ <div id="log"></div>
+</form>
+
+<form id="editor">
+ <textarea id="levelEditor" cols=15 rows=12></textarea>
+ <div>
+ <ul id="levelTypes">
+ <li>[reserved]-[reserved]-[reserved]-TIME
+ <li>B,R,Y,G,P,A,H,E - Jewels
+ <li>W - Wall
+ <li>T - Trap door
+ <li>F - Firepit
+ <li>C - Breakable Wall
+ <li>M - Elevator (not implemented)
+ </ul>
+ Created a good level? <a href="mailto:ben+anigma@meyerhome.net">E-mail</a> it to me and I will add it to the list.
+ </div>
+ <input type="button" value="Load Level" onclick="loadLevelFile(document.getElementById('levelEditor').value)">
+</form>
+
+
+<div id="creditsbox">
+<div id="credits">
+<img id="whitel" src="png/jewel_white.png">
+<img id="whiter" src="png/jewel_white.png">
+<p>
+<p id = "creditsheader">
+Anigma
+</p>
+<p>
+<img id="blue" src="png/jewel_blue.png">
+Programmed by <a href="http://benjamin-meyer.blogspot.com">Benjamin Meyer</a>
+<p>
+<img id="cyan" src="png/jewel_cyan.png">
+Thanks to Jennifer Meyer for play testing
+<p>
+<img id="gray" src="png/jewel_gray.png">
+Inspired by the Sharp Zaurus game <a href="http://benjamin-meyer.blogspot.com/2007/03/anigma-game.html">Anigma</a> created by Walter Rawdanik
+<p>
+<img id="green" src="png/jewel_green.png">
+Background by Eugene Trounev
+<p>
+<img id="orange" src="png/jewel_orange.png">
+Jewels by Eugene Trounev and Sebastien Delestaing
<p>
-<input type="button" value="Restart Level" onclick="loadLevel()">
+<img id="purple" src="png/jewel_purple.png">
+Music:<br>
+First by <a href="http://8bitcollective.com/members/neil/">Neil</a>
+Tiny Tunes by <a href="http://8bitcollective.com/members/FantomenK/">FantomenK</a>
+Reflect 2 by <a href="http://8bitcollective.com/members/Nanoshine/">Nanoshine</a>
+Neon Aurora by <a href="http://8bitcollective.com/members/Alpha+C/">Alpha C</a>
+Wine Walls by <a href="http://8bitcollective.com/members/Siddhis/">Siddhis</a>
+All Systems Go by <a href="http://8bitcollective.com/members/Emar/">Emar</a>
+Aftershock Sunrise by <a href="http://8bitcollective.com/members/sleepy/">Sleepy</a>
+Solo City by <a href="http://8bitcollective.com/members/Pompei/">Pompei</a>
+Without You by <a href="http://8bitcollective.com/members/Pompei/">Pompei</a>
+The Blackbird by <a href="http://8bitcollective.com/members/sailfish/">Sailfish</a>
+Her Lazer Light Eyes by <a href="http://8bitcollective.com/music/Guest/186/">Nullsleep</a>
+<p>
+<img id="red" src="png/jewel_red.png">
+All artwork is under the GPLv2 license
+<p>
+<img id="yellow" src="png/jewel_yellow.png">
+Javascript is under the BSD license
+<p>
+<img id="white" src="png/jewel_white.png">
+Music is under the Creative Commons BY-NC-SA License
+<p>
+Thanks for playing!
+</div>
+</div>
-<script>
-loadGame();
-</script>
+<script src="anigma.js" language="javascript" type="text/javascript"></script>
</html>
-
View
9 levels/101.level
@@ -0,0 +1,9 @@
+101-11-11-030
+..WWWWW..
+.W.....W.
+W.......W
+W.Y.....W
+WWWW.WWWW
+W.......W
+W...W.Y.W
+.WWWWWWW.
View
11 levels/102.level
@@ -0,0 +1,11 @@
+101-11-11-040
+...WWWW...
+..W....W..
+.W......W.
+W........W
+WY.......W
+WW.......W
+W........W
+W..B...BW.
+.WWW.Y.W..
+....WWW...
View
2  levels/16.level
@@ -3,7 +3,7 @@
RY..BGY
WWWCWWW
WGY..BW
-WWWWCWWW
+WWWWCWW
WB.G.RW
WRCBYBW
WWWWWWW
View
9 levels/201.level
@@ -0,0 +1,9 @@
+001-10-08-001
+WWWWWWWWWW
+WWWWWWWWWW
+WWWBY..WWW
+WWWWW..WWW
+WWW....WWW
+WWWY..BWWW
+WWWWYBWWWW
+WWWWWWWWWW
View
9 levels/202.level
@@ -0,0 +1,9 @@
+002-10-08-003
+WWWWWWWWWW
+WWWWWWWWWW
+WWW..Y..WW
+WWW..B..WW
+WWW.YR..WW
+WWW.BP..WW
+WWWBPR.RWW
+WWWWWWWWWW
View
9 levels/203.level
@@ -0,0 +1,9 @@
+003-10-08-014
+WWWWWWWWWW
+WWWW..WWWW
+WWW....WWW
+WWG.AH.GWW
+WWH.WW.AWW
+WWWH..AWWW
+WWWW..WWWW
+WWWWWWWWWW
View
9 levels/204.level
@@ -0,0 +1,9 @@
+004-10-08-005
+WWWWWWWWWW
+WWWWWWWWWW
+WWWWBWWWWW
+WWWYR.WWWW
+WWWWY.Y.WW
+WWWWR.RWWW
+WWWWWWBWWW
+WWWWWWWWWW
View
9 levels/205.level
@@ -0,0 +1,9 @@
+005-10-08-006
+WWWWWWWWWW
+WWWWY.RWWW
+WWWWP.PWWW
+WWWWW.GWWW
+WWWW..PWWW
+WWWW..GWWW
+WWWWRWYWWW
+WWWWWWWWWW
View
9 levels/206.level
@@ -0,0 +1,9 @@
+006-10-08-008
+WWWWWWWWWW
+WWW.....WW
+WWWG...AWW
+WWWWH..WWW
+WWWHA.BAWW
+WWWGH.ABWW
+WWWWGABAWW
+WWWWWWWWWW
View
9 levels/207.level
@@ -0,0 +1,9 @@
+007-10-08-004
+WWWWWWWWWW
+WWWWWWWWWW
+WWW..YRWWW
+WWW..RPWWW
+WWW..PYWWW
+WWW..YRWWW
+WWWWWWWWWW
+WWWWWWWWWW
View
9 levels/208.level
@@ -0,0 +1,9 @@
+008-10-08-013
+WWWWWWWWWW
+WWWWWWWWWW
+WW.....PWW
+WW.....GWW
+WWB..Y.BWW
+WWYG.G.WWW
+WWGBPWBWWW
+WWWWWWWWWW
View
9 levels/209.level
@@ -0,0 +1,9 @@
+009-10-08-005
+WWWWWWWWWW
+WWWWWWWWWW
+WWWWW.BWWW
+WWWY..RBWW
+WWWWY.BRWW
+WWWWW.RWWW
+WWWWWWWWWW
+WWWWWWWWWW
View
9 levels/210.level
@@ -0,0 +1,9 @@
+010-10-08-025
+WWWWWWWWWW
+WW......WW
+WR....R..W
+WPGP..PA.W
+WGBR..ARBW
+WAGP.WBGHW
+WBAGWWGHPW
+WWWWWWWWWW
View
9 levels/211.level
@@ -0,0 +1,9 @@
+011-10-08-012
+WWWWWWWWWW
+WW....RPWW
+WW..G.WWWW
+WW..W...WW
+WWP.W...WW
+WWWW..ARWW
+WWR..GRAWW
+WWWWWWWWWW
View
9 levels/212.level
@@ -0,0 +1,9 @@
+012-10-08-019
+WWWWWWWWWW
+WWBYR.RYBW
+WWWWW.WWWW
+WWWY...YWW
+WWWW...WWW
+WWWW...WWW
+WWWWBYRWWW
+WWWWWWWWWW
View
9 levels/213.level
@@ -0,0 +1,9 @@
+013-10-08-017
+WWWWWWWWWW
+WYRPR.PRYW
+WWWWW.WWWW
+WWWWW..WWW
+WWWWW..WWW
+WWWWP..WWW
+WWWWW.WWWW
+WWWWWWWWWW
View
9 levels/214.level
@@ -0,0 +1,9 @@
+014-10-08-008
+WWWWWWWWWW
+WWWWWWWWWW
+WWWWG..WWW
+WWWWA..WWW
+WWW.H.HGWW
+WWWWAWGWWW
+WWWWWWWWWW
+WWWWWWWWWW
View
9 levels/215.level
@@ -0,0 +1,9 @@
+015-10-08-004
+WWWWWWWWWW
+WWWWWWWWWW
+WWWWWY.WWW
+WWWY.R.YWW
+WWWW.Y.RWW
+WWWR.WRYWW
+WWWWRWWWWW
+WWWWWWWWWW
View
9 levels/216.level
@@ -0,0 +1,9 @@
+016-10-08-013
+WWWWWWWWWW
+WWWWWWWWWW
+WWBYB.RBPW
+WWWBP.PYWW
+WWWWR.YWWW
+WWWWWPWWWW
+WWWWWWWWWW
+WWWWWWWWWW
View
9 levels/217.level
@@ -0,0 +1,9 @@
+017-10-08-010
+WWWWWWWWWW
+WWWYRP.YWW
+WWWGWGYPWW
+WWWA.AGRWW
+WWWW.WWWWW
+WWWGAWWWWW
+WWWAYWWWWW
+WWWWWWWWWW
View
9 levels/218.level
@@ -0,0 +1,9 @@
+018-10-08-008
+WWWWWWWWWW
+WWWWWG.WWW
+WWWWWA..WW
+WWWH.H.WWW
+WWWA.G.WWW
+WWWW.A..WW
+WWWWWGWWWW
+WWWWWWWWWW
View
9 levels/219.level
@@ -0,0 +1,9 @@
+019-10-08-009
+WWWWWWWWWW
+WWWWB.WWWW
+WWWWW.BWWW
+WWYR..PWWW
+WWPY..BRWW
+WWRP.PRWWW
+WWWW.WWWWW
+WWWWWWWWWW
View
9 levels/220.level
@@ -0,0 +1,9 @@
+020-10-08-008
+WWWWWWWWWW
+WWWWW.WWWW
+WWWWW.YWWW
+WWWW..R.WW
+WWWP..G.WW
+WWWWYRWGWW
+WWWWWWWPWW
+WWWWWWWWWW
View
9 levels/221.level
@@ -0,0 +1,9 @@
+021-10-08-007
+WWWWWWWWWW
+WWWWWWWWWW
+WWWW.BWWWW
+WWWWWYRWWW
+WWWR.BYWWW
+WWWP.RP.WW
+WWWWWWWWWW
+WWWWWWWWWW
View
9 levels/222.level
@@ -0,0 +1,9 @@
+022-10-08-010
+WWWWWWWWWW
+WWH....WWW
+WWWWW..WWW
+WWE...HEWW
+WWWW..WWWW
+WWWWE..WWW
+WWWWH..WWW
+WWWWWWWWWW
View
9 levels/223.level
@@ -0,0 +1,9 @@
+023-10-08-017
+WWWWWWWWWW
+WWWWWWWWWW
+WWWWWWWWBW
+WW....Y.RW
+WWP.G.A.YW
+WWR.B.H.HW
+WWP.A.G.GW
+WWWWWWWWWW
View
9 levels/224.level
@@ -0,0 +1,9 @@
+024-10-08-013
+WWWWWWWWWW
+WWWWWWWWWW
+WWWP.P..WW
+WWWW.G.GWW
+WWWG.A.AWW
+WWWP.WWWWW
+WWWWWWWWWW
+WWWWWWWWWW
View
9 levels/225.level
@@ -0,0 +1,9 @@
+025-10-08-020
+WWWWWWWWWW
+WWWWWWWWWW
+WW.BYRP.WW
+WW.WWWG.WW
+WWG.W.B.WW
+WWP...WGWW
+WWRYWGBPWW
+WWWWWWWWWW
View
9 levels/226.level
@@ -0,0 +1,9 @@
+026-10-08-017
+WWWWWWWWWW
+WWWBY..WWW
+WWWRB..WWW
+WWWYR.PWWW
+WWWWW.RWWW
+WWWRY.BWWW
+WWWPW.YWWW
+WWWWWWWWWW
View
9 levels/227.level
@@ -0,0 +1,9 @@
+027-10-08-009
+WWWWWWWWWW
+WWWWWWWWWW
+WWWWW.RWWW
+WWWW..PRWW
+WWWP.GAWWW
+WWWWRAR.WW
+WWWWWGPWWW
+WWWWWWWWWW
View
9 levels/228.level
@@ -0,0 +1,9 @@
+028-10-08-009
+WWWWWWWWWW
+WWWWWWWWWW
+WWWWW.PWWW
+WWWWWGWWWW
+WWWA.A..WW
+WWWPAWHPWW
+WWPGWWWHWW
+WWWWWWWWWW
View
9 levels/229.level
@@ -0,0 +1,9 @@
+029-10-08-013
+WWWWWWWWWW
+WWWWB.WWWW
+WWWWW..YWW
+WWWY...RWW
+WWWR..YBWW
+WWWP.PRWWW
+WWWR.WWWWW
+WWWWWWWWWW
View
9 levels/230.level
@@ -0,0 +1,9 @@
+030-10-08-014
+WWWWWWWWWW
+WWWWWWWWWW
+WWYW..R.WW
+WWRW..P.WW
+WWG.A.GPWW
+WWWWR.WRWW
+WWWWWYWAWW
+WWWWWWWWWW
View
9 levels/231.level
@@ -0,0 +1,9 @@
+031-10-08-013
+WWWWWWWWWW
+WWW.B.Y.WW
+WWW.YBR.WW
+WWWPRYB.WW
+WWWBGRYGWW
+WWWWPGBYWW
+WWWWWPWWWW
+WWWWWWWWWW
View
9 levels/232.level
@@ -0,0 +1,9 @@
+032-10-08-015
+WWWWWWWWWW
+WWW...WWWW
+WB..YR..WW
+WW..RW...W
+WP..P...BW
+WWY.W..WWW
+WWPWWWRWWW
+WWWWWWWWWW
View
9 levels/233.level
@@ -0,0 +1,9 @@
+033-10-08-019
+WWWWWWWWWW
+WWWWBYWWWW
+WWW.RPGWWW
+WW..AYHGWW
+WW..RPEAWW
+WWW.EHAWWW
+WWWWGBWWWW
+WWWWWWWWWW
View
9 levels/234.level
@@ -0,0 +1,9 @@
+034-10-08-008
+WWWWWWWWWW
+WWR....PWW
+WWWW..WWWW
+WWWRGRWWWW
+WWWWPWWWWW
+WWWWG.WWWW
+WWW.PWWWWW
+WWWWWWWWWW
View
9 levels/235.level
@@ -0,0 +1,9 @@
+035-10-08-015
+WWWWWWWWWW
+WWWWBY.WWW
+WWWWWB.WWW
+WWWWWW.WWW
+WWWPYR.WWW
+WWWWWP.WWW
+WWWBYRBPWW
+WWWWWWWWWW
View
9 levels/236.level
@@ -0,0 +1,9 @@
+036-10-08-010
+WWWWWWWWWW
+WWWYRWWWWW
+WWWWPWWWWW
+WWW.G.WWWW
+WW..R..GWW
+WWR.W..PWW
+WWYRYPGWWW
+WWWWWWWWWW
View
9 levels/237.level
@@ -0,0 +1,9 @@
+037-10-08-012
+WWWWWWWWWW
+WW.B....WW
+WW.Y..R.WW
+WWYWY.WRWW
+WWW.PG.WWW
+WWG.RPGBWW
+WWWYGRBWWW
+WWWWWWWWWW
View
9 levels/238.level
@@ -0,0 +1,9 @@
+038-10-08-011
+WWWWWWWWWW
+WWWWW..BYW
+WWWWW..YBW
+WWW...BRYW
+WWPYWWWWWW
+WWRBWWWWWW
+WWPRWWWWWW
+WWWWWWWWWW
View
9 levels/239.level
@@ -0,0 +1,9 @@
+039-10-08-007
+WWWWWWWWWW
+WWWBY..WWW
+WWWRP.WWWW
+WWWWG.WWWW
+WWWWWGWWWW
+WWWW.YPWWW
+WWW..RBWWW
+WWWWWWWWWW
View
9 levels/240.level
@@ -0,0 +1,9 @@
+040-10-08-023
+WWWWWWWWWW
+WWWWW..BYW
+WWWWW..RBW
+WWWWW.BPYW
+WWRY..WWWW
+WWPBWWWWWW
+WWYPWWWWWW
+WWWWWWWWWW
View
9 levels/241.level
@@ -0,0 +1,9 @@
+041-10-08-006
+WWWWWWWWWW
+WWW..BYWWW
+WWWR.YWWWW
+WWPY.R.YWW
+WWYB.PYWWW
+WWPY.YPWWW
+WWWWYWWWWW
+WWWWWWWWWW
View
9 levels/242.level
@@ -0,0 +1,9 @@
+042-10-08-010
+WWWWWWWWWW
+WWW...WWWW
+WWWRP..WWW
+WWWWGP..WW
+WWWWWR.GWW
+WWWWWW.RWW
+WWWWWWWWWW
+WWWWWWWWWW
View
9 levels/243.level
@@ -0,0 +1,9 @@
+043-10-08-016
+WWWWWWWWWW
+WWY..WWWWW
+WWR.WRWWWW
+WWWP.PGWWW
+WWWG.YPGWW
+WWWW.PYWWW
+WWWWWYWWWW
+WWWWWWWWWW
View
9 levels/244.level
@@ -0,0 +1,9 @@
+044-10-08-012
+WWWWWWWWWW
+WWBY...RWW
+WWPRP..PWW
+WWWBRY.RWW
+WWWWWW.WWW
+WWWWWW.WWW
+WWWWWWWWWW
+WWWWWWWWWW
View
9 levels/245.level
@@ -0,0 +1,9 @@
+045-10-08-010
+WWWWWWWWWW
+WWWBW..YWW
+WWWYW.BRWW
+WWWP.RGBWW
+WWWW.PBGWW
+WWWW.BGWWW
+WWWW.YWWWW
+WWWWWWWWWW
View
9 levels/246.level
@@ -0,0 +1,9 @@
+046-10-08-007
+WWWWWWWWWW
+WWWB.WWWWW
+WWWY....WW
+WWWW...BWW
+WWW..Y.YWW
+WWW..BWBWW
+WWW..YBYWW
+WWWWWWWWWW
View
9 levels/247.level
@@ -0,0 +1,9 @@
+047-10-08-014
+WWWWWWWWWW
+WWWWWWWWWW
+WW.BY.RYPW
+WW.RG.GPWW
+WW.WW.WWWW
+WWRGB.RWWW
+WWWWW.BWWW
+WWWWWWWWWW
View
9 levels/248.level
@@ -0,0 +1,9 @@
+048-10-08-003
+WWWWWWWWWW
+WWW..B..WW
+WWWY.R..WW
+WWWW.W..WW
+WWW..R..WW
+WWWY.Y.RWW
+WWWB.BWWWW
+WWWWWWWWWW
View
9 levels/249.level
@@ -0,0 +1,9 @@
+049-10-08-029
+WWWWWWWWWW
+WWBY.WWWWW
+WWRBP..WWW
+WRWWWW..WW
+WG....G..W
+WR.PBPBYBW
+WWPWWWWWWW
+WWWWWWWWWW
View
9 levels/250.level
@@ -0,0 +1,9 @@
+050-10-08-018
+WWWWWWWWWW
+WWWB.YWWWW
+W..Y.W..RW
+WB.P..RPWW
+WWWW..GWWW
+WWWP.GWWWW
+WWWG.YWWWW
+WWWWWWWWWW
View
9 levels/251.level
@@ -0,0 +1,9 @@
+051-10-08-025
+WWWWWWWWWW
+WWB....YWW
+WRP.BY.GRW
+WAG.WW.RPW
+WWW....WWW
+WWW...AWWW
+WWWWAGWWWW
+WWWWWWWWWW
View
9 levels/252.level
@@ -0,0 +1,9 @@
+052-10-08-010
+WWWWWWWWWW
+WWWW.BWWWW
+WWWW.YWWWW
+W....B.RPW
+WG...Y.PGW
+WWWW.BWWWW
+WWWW.RWWWW
+WWWWWWWWWW
View
9 levels/253.level
@@ -0,0 +1,9 @@
+053-10-08-012
+WWWWWWWWWW
+WWWWBYRWWW
+WWWWPBYWWW
+WWW.RWP.WW
+WW..WWW.YW
+WW..PBP.RW
+WWPRWWWRBW
+WWWWWWWWWW
View
9 levels/254.level
@@ -0,0 +1,9 @@
+054-10-08-017
+WWWWWWWWWW
+WW..BYR.WW
+WW.WWWW.YW
+WW...P..GW
+WWG..G..BW
+WWR.BR..AW
+WWBRGWYAPW
+WWWWWWWWWW
View
9 levels/255.level
@@ -0,0 +1,9 @@
+055-10-08-024
+WWWWWWWWWW
+WWWWWWWWWW
+WBY....RPW
+WPGR..AYGW
+WGBP..GPAW
+WAPB..WAPW
+WWWWWWWWWW
+WWWWWWWWWW
View
9 levels/256.level
@@ -0,0 +1,9 @@
+056-10-08-012
+WWWWWWWWWW
+WW.BWY..WW
+WWRPWWW.WW
+WWPG..W.WW
+WWRAW.W.WW
+WWAGB..YWW
+WWHBR.RHWW
+WWWWWWWWWW
View
9 levels/257.level
@@ -0,0 +1,9 @@
+057-10-08-016
+WWWWWWWWWW
+WWWWWWWWWW
+W.....B..W
+WY..R.P..W
+WG..PRYB.W
+WA..RPBH.W
+WG..AEHBEW
+WWWWWWWWWW
View
9 levels/258.level
@@ -0,0 +1,9 @@
+058-10-08-005
+WWWWWWWWWW
+WWWB.WW..W
+WWWW..A.YW
+WWW.A.Y.WW
+WW..GYB.WW
+WWW.BWA.WW
+WWWGAWYBYW
+WWWWWWWWWW
View
589 levels/259.level
@@ -0,0 +1,589 @@
+059
+001-10-08-004
+WWWWWWWWWW
+WWWWWWWWWW
+WWWBY..WWW
+WWWWW..WWW
+WWW....WWW
+WWWY..BWWW
+WWWWYBWWWW
+WWWWWWWWWW
+
+002-10-08-003
+WWWWWWWWWW
+WWWWWWWWWW
+WWW..Y..WW
+WWW..B..WW
+WWW.YR..WW
+WWW.BP..WW
+WWWBPR.RWW
+WWWWWWWWWW
+
+003-10-08-014
+WWWWWWWWWW
+WWWW..WWWW
+WWW....WWW
+WWG.AH.GWW
+WWH.WW.AWW
+WWWH..AWWW
+WWWW..WWWW
+WWWWWWWWWW
+
+004-10-08-005
+WWWWWWWWWW
+WWWWWWWWWW
+WWWWBWWWWW
+WWWYR.WWWW
+WWWWY.Y.WW
+WWWWR.RWWW
+WWWWWWBWWW
+WWWWWWWWWW
+
+005-10-08-006
+WWWWWWWWWW
+WWWWY.RWWW
+WWWWP.PWWW
+WWWWW.GWWW
+WWWW..PWWW
+WWWW..GWWW
+WWWWRWYWWW
+WWWWWWWWWW