diff --git a/Makefile b/Makefile index 32a1b50..bf23723 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ compile: clean for file in `cat compile.order`; do coffee -b -p -c src/$$file >> build/game.js; done - cp index.html build/index.html + cp src/index.html build/index.html clean: rm -rf build/* + +alle: compile \ No newline at end of file diff --git a/build/game.js b/build/game.js index 1bf0c8d..53be68f 100644 --- a/build/game.js +++ b/build/game.js @@ -1,459 +1,495 @@ // Generated by CoffeeScript 1.6.3 -(function() { - var add_level, blocks, break_walls, calculate_lightray, calculate_lights, canvas, colors, config, context, current_level, draw_hud, draw_level, draw_lights, draw_player, enemy_layer, illuminate, init_level, inventar, keymap, level, levels, load_level, main_loop, map_range, parse_levelentities, pixel, player, rect, reset_layers, shadow_layer, toxy, update_canvas, update_player_position, write, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; +var pixel, rect, toxy, write; - canvas = document.getElementById('canvas'); +toxy = function(position) { + return { + x: position % config.map.width, + y: Math.floor(position / config.map.width) + }; +}; - context = canvas.getContext('2d'); +rect = function(x, y, w, h, color) { + context.fillStyle = color; + return context.fillRect(x, y, w, h); +}; +pixel = function(position, w, h, color) { + var x, y; + x = config.pixelsize * toxy(position).x + config.map.origin.x; + y = config.pixelsize * toxy(position).y + config.map.origin.y; + return rect(x, y, w, h, color); +}; + +write = function(x, y, text, size, color) { context.textAlign = 'center'; + context.fillStyle = color; + context.font = 'normal ' + size + 'pt Verdana'; + return context.fillText(text, x, y); +}; +// Generated by CoffeeScript 1.6.3 +var map_range, update_canvas; - config = { - gamewin: false, - gameover: false, - pixelsize: 15, - debug: false, - lights: true, - map: { - width: 60, - height: 40, - origin: { - x: 0, - y: 50 - } +update_canvas = function(width, height) { + canvas.width = width; + return canvas.height = height; +}; + +map_range = function(from, to, s) { + return to[0] + (s - from[0]) * (to[1] - to[0]) / (from[1] - from[0]); +}; +// Generated by CoffeeScript 1.6.3 +var blocks, canvas, colors, config, context, current_level, enemy_layer, gamestates, inventar, level, levels, player, shadow_layer; + +canvas = document.getElementById('canvas'); + +context = canvas.getContext('2d'); + +context.textAlign = 'center'; + +gamestates = { + RUN: 'RUN', + WIN: 'WIN', + OVER: 'OVER' +}; + +config = { + gamestate: gamestates.RUN, + pixelsize: 15, + debug_available: true, + debug: false, + lights: true, + map: { + width: 60, + height: 40, + origin: { + x: 0, + y: 50 } - }; + } +}; - player = { - position: 0, - lightrange: 10 - }; +player = { + position: 0, + lightrange: 10 +}; - blocks = { - walkable: [1, 0, 4, 6, 7, 8], - entities: [1, 2, 7, 5, 6, 8] - }; +blocks = { + walkable: [1, 0, 4, 6, 7, 8], + entities: [1, 2, 7, 5, 6, 8] +}; - colors = { - floor: '#eeeeee', - wall: '#333333', - player: '#850091', - key: '#ffe91a', - door: '#0883fd', - exit: '#07fd0f', - breakable: '#bf7d0b' - }; +colors = { + floor: '#eeeeee', + wall: '#333333', + player: '#850091', + key: '#ffe91a', + door: '#0883fd', + exit: '#07fd0f', + breakable: '#bf7d0b' +}; - levels = []; +inventar = { + key: false +}; - current_level = 0; +levels = []; - level = null; +current_level = 0; - update_canvas = function() { - canvas.width = config.map.width * config.pixelsize + config.map.origin.x; - return canvas.height = config.map.height * config.pixelsize + config.map.origin.y; - }; +level = null; - update_canvas(); +shadow_layer = enemy_layer = null; +// Generated by CoffeeScript 1.6.3 +var add_level, draw_level, init_level, load_level, parse_levelentities, reset_layers; - toxy = function(position) { - return { - x: position % config.map.width, - y: Math.floor(position / config.map.width) - }; - }; +add_level = function(map) { + return levels.push(map); +}; - rect = function(x, y, w, h, color) { - context.fillStyle = color; - return context.fillRect(x, y, w, h); - }; - - pixel = function(position, w, h, color) { - var x, y; - x = config.pixelsize * toxy(position).x + config.map.origin.x; - y = config.pixelsize * toxy(position).y + config.map.origin.y; - return rect(x, y, w, h, color); - }; - - write = function(x, y, text, size, color) { - context.textAlign = 'center'; - context.fillStyle = color; - context.font = 'normal ' + size + 'pt Verdana'; - return context.fillText(text, x, y); - }; - - add_level = function(map) { - return levels.push(map); - }; - - shadow_layer = enemy_layer = level = null; - - inventar = { - key: false - }; - - draw_hud = function() { - var color, i, name, _results; - rect(0, 0, config.pixelsize * config.map.width, config.map.origin.y, '#222222'); - rect(0, config.map.origin.y - 2, config.pixelsize * config.map.width, 2, '#333333'); - i = 0; - _results = []; - for (name in inventar) { - color = '#aaaaaa'; - if (inventar[name]) { - color = colors[name]; - } - rect(i * 43 + 15, 8, 25, 25, color); - write(i * 43 + 15 + 12, 45, name, 7, color); - _results.push(i++); - } - return _results; - }; - - add_level([3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 6, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 3, 3, 0, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 0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, 0, 0, 0, 3, 0, 0, 0, 3, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 3]); - - draw_level = function(level) { - var block, color, position, _i, _len, _results; - _results = []; - for (position = _i = 0, _len = level.length; _i < _len; position = ++_i) { - block = level[position]; - switch (block) { - case 0: - color = colors.floor; - break; - case 3: - color = colors.wall; - break; - case 1: - color = colors.key; - break; - case 2: - color = colors.door; - break; - case 7: - color = colors.exit; - break; - case 5: - color = colors.breakable; - } - _results.push(pixel(position, config.pixelsize, config.pixelsize, color)); - } - return _results; - }; - - reset_layers = function() { - var _i, _j, _ref, _ref1, _results, _results1; - shadow_layer = (function() { - _results = []; - for (var _i = 0, _ref = config.map.width * config.map.height; 0 <= _ref ? _i <= _ref : _i >= _ref; 0 <= _ref ? _i++ : _i--){ _results.push(_i); } - return _results; - }).apply(this).map(function() { - return 0; - }); - return enemy_layer = (function() { - _results1 = []; - for (var _j = 0, _ref1 = config.map.width * config.map.height; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; 0 <= _ref1 ? _j++ : _j--){ _results1.push(_j); } - return _results1; - }).apply(this).map(function() { - return 0; - }); - }; - - init_level = function() { - var _i, _ref, _results; - level = (function() { - _results = []; - for (var _i = 0, _ref = config.map.width * config.map.height; 0 <= _ref ? _i <= _ref : _i >= _ref; 0 <= _ref ? _i++ : _i--){ _results.push(_i); } - return _results; - }).apply(this).map(function() { - return 0; - }); - return inventar.key = false; - }; - - load_level = function(number) { - if (number === levels.length) { - return config.gamewin = true; - } else { - init_level(); - level = levels[number]; - return parse_levelentities(level); - } - }; - - update_player_position = function() { - var new_position, _ref; - new_position = player.position; - if (keymap[37] && toxy(player.position).x > 0) { - new_position = new_position - 1; - } - if (keymap[39] && toxy(player.position).x < config.map.width - 1) { - new_position = new_position + 1; - } - if (keymap[38] && toxy(player.position).y > 0) { - new_position = new_position - config.map.width; - } - if (keymap[40] && toxy(player.position).y < config.map.height - 1) { - new_position = new_position + config.map.width; - } - switch (level[new_position]) { - case 7: - current_level++; - load_level(current_level); - return; - case 2: - if (inventar.key) { - inventar.key = false; - level[new_position] = 0; - } +draw_level = function(level) { + var block, color, position, _i, _len, _results; + _results = []; + for (position = _i = 0, _len = level.length; _i < _len; position = ++_i) { + block = level[position]; + switch (block) { + case 0: + color = colors.floor; + break; + case 3: + color = colors.wall; break; case 1: - inventar.key = true; + color = colors.key; + break; + case 2: + color = colors.door; + break; + case 7: + color = colors.exit; + break; + case 5: + color = colors.breakable; + } + _results.push(pixel(position, config.pixelsize, config.pixelsize, color)); + } + return _results; +}; + +reset_layers = function() { + var enemy_layer, shadow_layer, _i, _j, _ref, _ref1, _results, _results1; + shadow_layer = (function() { + _results = []; + for (var _i = 0, _ref = config.map.width * config.map.height; 0 <= _ref ? _i <= _ref : _i >= _ref; 0 <= _ref ? _i++ : _i--){ _results.push(_i); } + return _results; + }).apply(this).map(function() { + return 0; + }); + return enemy_layer = (function() { + _results1 = []; + for (var _j = 0, _ref1 = config.map.width * config.map.height; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; 0 <= _ref1 ? _j++ : _j--){ _results1.push(_j); } + return _results1; + }).apply(this).map(function() { + return 0; + }); +}; + +init_level = function() { + var level, _i, _ref, _results; + level = (function() { + _results = []; + for (var _i = 0, _ref = config.map.width * config.map.height; 0 <= _ref ? _i <= _ref : _i >= _ref; 0 <= _ref ? _i++ : _i--){ _results.push(_i); } + return _results; + }).apply(this).map(function() { + return 0; + }); + return inventar.key = false; +}; + +load_level = function(number) { + var level; + if (number === levels.length) { + return config.gamestate = gamestates.WIN; + } else { + init_level(); + level = levels[number]; + return parse_levelentities(level); + } +}; + +parse_levelentities = function() { + var block, position, _i, _len, _results; + _results = []; + for (position = _i = 0, _len = level.length; _i < _len; position = ++_i) { + block = level[position]; + switch (block) { + case 4: + player.position = position; + _results.push(level[position] = 0); + break; + default: + _results.push(void 0); + } + } + return _results; +}; +// Generated by CoffeeScript 1.6.3 +add_level([3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 6, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 3, 3, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 3, 3, 0, 0, 3, 3,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 3, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 3]); +// Generated by CoffeeScript 1.6.3 +var draw_hud; + +draw_hud = function() { + var color, i, name, _results; + rect(0, 0, config.pixelsize * config.map.width, config.map.origin.y, '#222222'); + rect(0, config.map.origin.y - 2, config.pixelsize * config.map.width, 2, '#333333'); + i = 0; + _results = []; + for (name in inventar) { + color = '#aaaaaa'; + if (inventar[name]) { + color = colors[name]; + } + rect(i * 43 + 15, 8, 25, 25, color); + write(i * 43 + 15 + 12, 45, name, 7, color); + _results.push(i++); + } + return _results; +}; +// Generated by CoffeeScript 1.6.3 +var break_walls, draw_player, update_player_position, + __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + +update_player_position = function() { + var new_position, _ref; + new_position = player.position; + if (keymap[37] && toxy(player.position).x > 0) { + new_position = new_position - 1; + } + if (keymap[39] && toxy(player.position).x < config.map.width - 1) { + new_position = new_position + 1; + } + if (keymap[38] && toxy(player.position).y > 0) { + new_position = new_position - config.map.width; + } + if (keymap[40] && toxy(player.position).y < config.map.height - 1) { + new_position = new_position + config.map.width; + } + switch (level[new_position]) { + case 7: + current_level++; + load_level(current_level); + return; + case 2: + if (inventar.key) { + inventar.key = false; level[new_position] = 0; - } - if (enemy_layer[new_position] > 0 && !config.debug) { - config.gameover = true; - } - if (_ref = level[new_position], __indexOf.call(blocks.walkable, _ref) >= 0) { - return player.position = new_position; - } - }; + } + break; + case 1: + inventar.key = true; + level[new_position] = 0; + } + if (enemy_layer[new_position] > 0 && !config.debug) { + config.gamestate = gamestates.OVER; + } + if (_ref = level[new_position], __indexOf.call(blocks.walkable, _ref) >= 0) { + return player.position = new_position; + } +}; - draw_player = function(position) { - return pixel(position, config.pixelsize, config.pixelsize, colors.player); - }; +draw_player = function(position) { + return pixel(position, config.pixelsize, config.pixelsize, colors.player); +}; - map_range = function(from, to, s) { - return to[0] + (s - from[0]) * (to[1] - to[0]) / (from[1] - from[0]); - }; +break_walls = function(position) { + if (level[position - 1] === 5 || config.debug) { + level[position - 1] = 0; + } + if (level[position + 1] === 5 || config.debug) { + level[position + 1] = 0; + } + if (level[position - config.map.width] === 5 || config.debug) { + level[position - config.map.width] = 0; + } + if (level[position + config.map.width] === 5 || config.debug) { + return level[position + config.map.width] = 0; + } +}; +// Generated by CoffeeScript 1.6.3 +var calculate_lightray, calculate_lights, draw_lights, illuminate, + __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - calculate_lightray = function(x1, y1, x2, y2, type) { - var dx, dy, hit_wall, pixel_x1, pixel_x2, pixel_y1, pixel_y2, s, selected_layer, t, _ref, _results; - switch (type) { - case 'enemy': - selected_layer = enemy_layer; +calculate_lightray = function(x1, y1, x2, y2, type) { + var dx, dy, hit_wall, pixel_x1, pixel_x2, pixel_y1, pixel_y2, s, selected_layer, t, _ref, _results; + switch (type) { + case 'enemy': + selected_layer = enemy_layer; + break; + default: + selected_layer = shadow_layer; + } + pixel_x1 = x1 * config.pixelsize + (config.pixelsize / 2); + pixel_y1 = y1 * config.pixelsize + (config.pixelsize / 2); + pixel_x2 = x2 * config.pixelsize + (config.pixelsize / 2); + pixel_y2 = y2 * config.pixelsize + (config.pixelsize / 2); + dx = Math.abs(pixel_x1 - pixel_x2); + dy = Math.abs(pixel_y1 - pixel_y2); + s = 0.99 / (dx > dy ? dx : dy); + t = 0.0; + if (config.debug) { + context.beginPath(); + context.strokeStyle = 'blue'; + context.moveTo(pixel_x1 + config.map.origin.x, pixel_y1 + config.map.origin.y); + context.lineTo(pixel_x2 + config.map.origin.x, pixel_y2 + config.map.origin.y); + context.stroke(); + } + hit_wall = false; + _results = []; + while (t < 1.0) { + dx = Math.round((1.0 - t) * pixel_x1 + t * pixel_x2); + dy = Math.round((1.0 - t) * pixel_y1 + t * pixel_y2); + dx = Math.floor(dx / config.pixelsize); + dy = Math.floor(dy / config.pixelsize); + if (level[dy * config.map.width + dx] === 0) { + if (hit_wall && !config.debug) { break; - default: - selected_layer = shadow_layer; - } - pixel_x1 = x1 * config.pixelsize + (config.pixelsize / 2); - pixel_y1 = y1 * config.pixelsize + (config.pixelsize / 2); - pixel_x2 = x2 * config.pixelsize + (config.pixelsize / 2); - pixel_y2 = y2 * config.pixelsize + (config.pixelsize / 2); - dx = Math.abs(pixel_x1 - pixel_x2); - dy = Math.abs(pixel_y1 - pixel_y2); - s = 0.99 / (dx > dy ? dx : dy); - t = 0.0; - if (config.debug) { - context.beginPath(); - context.strokeStyle = 'blue'; - context.moveTo(pixel_x1 + config.map.origin.x, pixel_y1 + config.map.origin.y); - context.lineTo(pixel_x2 + config.map.origin.x, pixel_y2 + config.map.origin.y); - context.stroke(); - } - hit_wall = false; - _results = []; - while (t < 1.0) { - dx = Math.round((1.0 - t) * pixel_x1 + t * pixel_x2); - dy = Math.round((1.0 - t) * pixel_y1 + t * pixel_y2); - dx = Math.floor(dx / config.pixelsize); - dy = Math.floor(dy / config.pixelsize); - if (level[dy * config.map.width + dx] === 0) { - if (hit_wall && !config.debug) { - break; - } - if (selected_layer[dy * config.map.width + dx] === 0) { - if (t > 0.5) { - selected_layer[dy * config.map.width + dx] += map_range([0.5, 1], [1, 0], t); - } else { - selected_layer[dy * config.map.width + dx] += 1; - } - } - } else if (level[dy * config.map.width + dx] === 3) { - if (type === 'enemy') { - break; - } + } + if (selected_layer[dy * config.map.width + dx] === 0) { if (t > 0.5) { selected_layer[dy * config.map.width + dx] += map_range([0.5, 1], [1, 0], t); } else { selected_layer[dy * config.map.width + dx] += 1; } - hit_wall = true; - } else if (_ref = level[dy * config.map.width + dx], __indexOf.call(blocks.entities, _ref) >= 0) { - if (t > 0.5) { - selected_layer[dy * config.map.width + dx] += map_range([0.5, 1], [1, 0], t); - } else { - selected_layer[dy * config.map.width + dx] += 1; - } - if (!config.debug && level[dy * config.map.width + dx] !== 1 && level[dy * config.map.width + dx] !== 8) { - break; - } + } + } else if (level[dy * config.map.width + dx] === 3) { + if (type === 'enemy') { + break; + } + if (t > 0.5) { + selected_layer[dy * config.map.width + dx] += map_range([0.5, 1], [1, 0], t); } else { - selected_layer[dy * config.map.width + dx] = .5; - if (!config.debug) { - break; - } + selected_layer[dy * config.map.width + dx] += 1; } - _results.push(t += s); - } - return _results; - }; - - illuminate = function(x1, y1, range, type) { - var r, x2, y2, _results; - if (type == null) { - type = 'shadow'; - } - r = 0; - _results = []; - while (r < Math.PI * 2) { - x2 = range * Math.cos(r) + x1; - y2 = range * Math.sin(r) + y1; - calculate_lightray(x1, y1, x2, y2, type); - _results.push(r += 0.03); - } - return _results; - }; - - calculate_lights = function() { - var block, position, _i, _len, _results; - illuminate(toxy(player.position).x, toxy(player.position).y, player.lightrange); - _results = []; - for (position = _i = 0, _len = level.length; _i < _len; position = ++_i) { - block = level[position]; - switch (block) { - case 8: - _results.push(illuminate(toxy(position).x, toxy(position).y, 4, 'enemy')); - break; - default: - _results.push(void 0); + hit_wall = true; + } else if (_ref = level[dy * config.map.width + dx], __indexOf.call(blocks.entities, _ref) >= 0) { + if (t > 0.5) { + selected_layer[dy * config.map.width + dx] += map_range([0.5, 1], [1, 0], t); + } else { + selected_layer[dy * config.map.width + dx] += 1; + } + if (!config.debug && level[dy * config.map.width + dx] !== 1 && level[dy * config.map.width + dx] !== 8) { + break; + } + } else { + selected_layer[dy * config.map.width + dx] = .5; + if (!config.debug) { + break; } } - return _results; - }; + _results.push(t += s); + } + return _results; +}; - draw_lights = function(type) { - var alpha, brightness, color, position, selected_layer, _i, _len, _ref, _results; - switch (type) { - case 'enemy': - color = '255, 0, 0'; - selected_layer = enemy_layer; +illuminate = function(x1, y1, range, type) { + var r, x2, y2, _results; + if (type == null) { + type = 'shadow'; + } + r = 0; + _results = []; + while (r < Math.PI * 2) { + x2 = range * Math.cos(r) + x1; + y2 = range * Math.sin(r) + y1; + calculate_lightray(x1, y1, x2, y2, type); + _results.push(r += 0.03); + } + return _results; +}; + +calculate_lights = function() { + var block, position, _i, _len, _results; + illuminate(toxy(player.position).x, toxy(player.position).y, player.lightrange); + _results = []; + for (position = _i = 0, _len = level.length; _i < _len; position = ++_i) { + block = level[position]; + switch (block) { + case 8: + _results.push(illuminate(toxy(position).x, toxy(position).y, 4, 'enemy')); break; default: - color = '0, 0, 0'; - selected_layer = shadow_layer; + _results.push(void 0); } - _results = []; - for (position = _i = 0, _len = selected_layer.length; _i < _len; position = ++_i) { - brightness = selected_layer[position]; - switch (type) { - case 'enemy': - alpha = brightness * .5; - break; - default: - alpha = 1 - brightness; - } - if (_ref = level[position], __indexOf.call(blocks.entities, _ref) >= 0) { - if (alpha < 0.4) { - alpha = 0; - } - } - _results.push(pixel(position, config.pixelsize, config.pixelsize, 'rgba(' + color + ', ' + alpha + ')')); - } - return _results; - }; + } + return _results; +}; - break_walls = function(position) { - if (level[position - 1] === 5 || config.debug) { - level[position - 1] = 0; +draw_lights = function(type) { + var alpha, brightness, color, position, selected_layer, _i, _len, _ref, _results; + switch (type) { + case 'enemy': + color = '255, 0, 0'; + selected_layer = enemy_layer; + break; + default: + color = '0, 0, 0'; + selected_layer = shadow_layer; + } + _results = []; + for (position = _i = 0, _len = selected_layer.length; _i < _len; position = ++_i) { + brightness = selected_layer[position]; + switch (type) { + case 'enemy': + alpha = brightness * .5; + break; + default: + alpha = 1 - brightness; } - if (level[position + 1] === 5 || config.debug) { - level[position + 1] = 0; - } - if (level[position - config.map.width] === 5 || config.debug) { - level[position - config.map.width] = 0; - } - if (level[position + config.map.width] === 5 || config.debug) { - return level[position + config.map.width] = 0; - } - }; - - keymap = []; - - addEventListener('keydown', function(event) { - keymap[event.keyCode] = true; - if (event.keyCode === 187) { - config.pixelsize += 2; - update_canvas(); - } - if (event.keyCode === 189) { - config.pixelsize -= 2; - update_canvas(); - } - if (event.keyCode === 68) { - config.debug = !config.debug; - } - if (event.keyCode === 32) { - break_walls(player.position); - } - if (event.keyCode === 76) { - return config.lights = !config.lights; - } - }); - - addEventListener('keyup', function(event) { - return keymap[event.keyCode] = false; - }); - - parse_levelentities = function() { - var block, position, _i, _len, _results; - _results = []; - for (position = _i = 0, _len = level.length; _i < _len; position = ++_i) { - block = level[position]; - switch (block) { - case 4: - player.position = position; - _results.push(level[position] = 0); - break; - default: - _results.push(void 0); + if (_ref = level[position], __indexOf.call(blocks.entities, _ref) >= 0) { + if (alpha < 0.4) { + alpha = 0; } } - return _results; - }; + _results.push(pixel(position, config.pixelsize, config.pixelsize, 'rgba(' + color + ', ' + alpha + ')')); + } + return _results; +}; +// Generated by CoffeeScript 1.6.3 +var keymap; - load_level(current_level); +keymap = []; - main_loop = function() { - if (config.gamewin) { - rect(0, 0, config.map.width * config.pixelsize, config.map.height * config.pixelsize + config.map.origin.y, '#ffffff'); - write(250, 100, 'You won, awesome!', 20, '#000000'); - } else if (config.gameover) { - rect(0, 0, config.map.width * config.pixelsize, config.map.height * config.pixelsize + config.map.origin.y, '#ff0000'); - write(150, 100, 'Oh noes!', 20, '#ffffff'); - } else { - reset_layers(); - calculate_lights(); - draw_level(level); - update_player_position(); - if (config.lights) { - draw_lights('shadow'); - draw_lights('enemy'); - } - draw_player(player.position); - draw_hud(); - } - return setTimeout(main_loop, 50); - }; +addEventListener('keydown', function(event) { + keymap[event.keyCode] = true; + if (event.keyCode === 187) { + config.pixelsize += 2; + update_canvas(config.map.width * config.pixelsize + config.map.origin.x, config.map.height * config.pixelsize + config.map.origin.y); + } + if (event.keyCode === 189) { + config.pixelsize -= 2; + update_canvas(config.map.width * config.pixelsize + config.map.origin.x, config.map.height * config.pixelsize + config.map.origin.y); + } + if (event.keyCode === 68 && config.debug_available) { + config.debug = !config.debug; + } + if (event.keyCode === 32) { + break_walls(player.position); + } + if (event.keyCode === 76 && config.debug_available) { + return config.lights = !config.lights; + } +}); - main_loop(); +addEventListener('keyup', function(event) { + return keymap[event.keyCode] = false; +}); +// Generated by CoffeeScript 1.6.3 +var loop_gameover, loop_gamewin, loop_main, loop_run; -}).call(this); +loop_run = function() { + reset_layers(); + calculate_lights(); + draw_level(level); + update_player_position(); + if (config.lights) { + draw_lights('shadow'); + draw_lights('enemy'); + } + draw_player(player.position); + return draw_hud(); +}; + +loop_gamewin = function() { + rect(0, 0, config.map.width * config.pixelsize, config.map.height * config.pixelsize + config.map.origin.y, '#ffffff'); + return write(250, 100, 'You won, awesome!', 20, '#000000'); +}; + +loop_gameover = function() { + rect(0, 0, config.map.width * config.pixelsize, config.map.height * config.pixelsize + config.map.origin.y, '#ff0000'); + return write(150, 100, 'Oh noes!', 20, '#ffffff'); +}; + +loop_main = function() { + switch (config.gamestate) { + case gamestates.RUN: + loop_run(); + break; + case gamestates.WIN: + loop_gamewin(); + break; + case gamestates.OVER: + loop_gameover(); + } + return setTimeout(loop_main, 50); +}; + +update_canvas(); + +load_level(current_level); + +loop_main(); diff --git a/build/notsoaloneinthedark-game.html b/build/notsoaloneinthedark-game.html deleted file mode 100644 index 0e1019d..0000000 --- a/build/notsoaloneinthedark-game.html +++ /dev/null @@ -1,470 +0,0 @@ - - - - jar - - - - - - - \ No newline at end of file diff --git a/src/config.coffee b/src/config.coffee index 2763c47..f5bac55 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -3,9 +3,9 @@ context = canvas.getContext '2d' context.textAlign = 'center'; gamestates = - RUN = 'RUN' - WIN = 'WIN' - OVER = 'OVER' + RUN: 'RUN' + WIN: 'WIN' + OVER: 'OVER' config = gamestate: gamestates.RUN diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..a307c28 --- /dev/null +++ b/src/index.html @@ -0,0 +1,11 @@ + + + + jar + + + + + + + \ No newline at end of file