├── .gitignore ├── .resources ├── font.gif ├── step.wav ├── stone.wav ├── diamond.wav ├── sprite.gif └── update.js ├── .github └── screenshot.png ├── README.md ├── Makefile └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | /dist/ 2 | -------------------------------------------------------------------------------- /.resources/font.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutzroeder/digger/HEAD/.resources/font.gif -------------------------------------------------------------------------------- /.resources/step.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutzroeder/digger/HEAD/.resources/step.wav -------------------------------------------------------------------------------- /.resources/stone.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutzroeder/digger/HEAD/.resources/stone.wav -------------------------------------------------------------------------------- /.github/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutzroeder/digger/HEAD/.github/screenshot.png -------------------------------------------------------------------------------- /.resources/diamond.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutzroeder/digger/HEAD/.resources/diamond.wav -------------------------------------------------------------------------------- /.resources/sprite.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutzroeder/digger/HEAD/.resources/sprite.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Digger 2 | 3 | Digger game written in JavaScript using the HTML5 canvas element. 4 | 5 | Use cursor keys, ESC to restart, DEL to jump to the next level. 6 | 7 | [Play](https://lutzroeder.github.io/digger) 8 | 9 | Screenshot 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | publish: 3 | rm -rf ./dist 4 | git clone git@github.com:lutzroeder/digger.git ./dist/gh-pages --branch gh-pages 5 | rm -rf ./dist/gh-pages/* 6 | cp ./index.html ./dist/gh-pages/ 7 | git -C ./dist/gh-pages add --all 8 | git -C ./dist/gh-pages commit --amend --no-edit 9 | git -C ./dist/gh-pages push --force origin gh-pages 10 | rm -rf ./dist 11 | -------------------------------------------------------------------------------- /.resources/update.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const fs = require('fs'); 4 | const path = require('path'); 5 | 6 | const resources = fs.readdirSync('./').filter((file) => file != path.basename(__filename)).map((file) => { 7 | return "'" + file + "': '" + fs.readFileSync(file).toString('base64') + "'"; 8 | }); 9 | 10 | const sourceFile = '../index.html'; 11 | let source = fs.readFileSync(sourceFile, 'utf-8'); 12 | source = source.replace(/(\/\/ BEGIN RESOURCE MAP)([\s\S]*?)(\/\/ END RESOURCE MAP)/gm, function (_, start, body, end) { 13 | return start + "\nvar resources = {\n" + resources.join(",\n") + "\n};\n" + end; 14 | }); 15 | fs.writeFileSync(sourceFile, source); 16 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Digger 5 | 6 | 945 | 946 | 947 | 948 | 949 | --------------------------------------------------------------------------------