diff --git a/.bowerrc b/.bowerrc deleted file mode 100644 index e28246d..0000000 --- a/.bowerrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "directory": "www/lib" -} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c2cf87f --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2015 Richard Davey, Photon Storm Ltd. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.markdown b/README.markdown index 89a7078..4c6423f 100644 --- a/README.markdown +++ b/README.markdown @@ -3,32 +3,25 @@ ChunkMap ![ChunkMap](/docs/images/background.png "ChunkMap") -ChunkMap is a JavaScript implementation of a chunked 2D tilemap using the [Phaser](http://www.phaser.io/) game engine. -The map is procedurally generated using Simplex noise and only the chunks of map neighbouring the camera are rendered, allowing -the creation of potentially infinite maps that perform well. Phaser doesn't support infinite World bounds, so this implementation -has a fixed world size of 8192x8192. +ChunkMap is a JavaScript implementation of a chunked 2D tilemap using the [Phaser](http://www.phaser.io/) game engine. +The map is procedurally generated using Simplex noise and only the chunks of map neighbouring the camera are rendered, allowing the creation of potentially infinite maps that perform well. Phaser doesn't support infinite World bounds, so this implementation has a fixed world size of 8192x8192. Building and Running -------- -ChunkMap requires Bower and an HTTP server. Installation of these dependencies is via npm. If you don't have npm yet: +Installation requires [npm](https://www.npmjs.com/). -`curl https://npmjs.org/install.sh | sh` +Browsers have a lot of security issues when the `file` protocol is used. To make life easier, ChunkMap uses the simple HTTP server [http-server](https://www.npmjs.com/package/http-server). -Run these commands in the project root directory +`npm install` in the project's root directory. +_http-server_ is automatically started after install. -`npm install bower -g` - -`bower install` - -`npm install http-server -g` - -`http-server www` +If you've already used `npm install`, running `npm start` will launch _http-server_. Now you can view the tilemap: -* http://localhost:8080/index.html +* http://localhost:8080 * Click and drag the map to look around TODO @@ -38,5 +31,5 @@ TODO Additional Notes -------- -ChunkMap uses the awesome [Voxel pack](http://kenney.nl/assets/voxel-pack) by Kenney. +ChunkMap uses the awesome [Voxel pack](http://kenney.nl/assets/voxel-pack) by Kenney. ChunkMap takes plenty of inspiration from Anders Evenrud's [Tile Game](https://github.com/andersevenrud/TileGame). diff --git a/bower.json b/bower.json deleted file mode 100644 index bf23dba..0000000 --- a/bower.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "phaser-chunked-tilemap", - "authors": [ - "Marcus Robinson " - ], - "description": "An implementation of a chunked 2D tilemap using the Phaser game engine.", - "main": "", - "moduleType": [], - "license": "MIT", - "homepage": "", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "www/lib", - "test", - "tests" - ], - "dependencies": { - "phaser": "https://raw.githubusercontent.com/photonstorm/phaser/v2.4.4/build/phaser.js" - } -} diff --git a/package.json b/package.json new file mode 100644 index 0000000..5380cf0 --- /dev/null +++ b/package.json @@ -0,0 +1,28 @@ +{ + "name": "phaser-chunked-tilemap", + "version": "1.0.0", + "description": "An implementation of a chunked 2D tilemap using the Phaser game engine.", + "main": "", + "directories": { + "doc": "docs" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "postinstall": "cp -R ./node_modules/phaser/dist/ ./www/lib/phaser/; http-server www", + "start": "http-server www" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/marcus-robinson/chunk-map.git" + }, + "author": "Marcus Robinson ", + "bugs": { + "url": "https://github.com/marcus-robinson/chunk-map/issues" + }, + "license": "MIT", + "homepage": "https://github.com/marcus-robinson/chunk-map#chunkmap", + "dependencies": { + "http-server": "^0.8.5", + "phaser": "^2.4.4" + } +} diff --git a/www/index.html b/www/index.html index 7e3fe62..d133bd3 100644 --- a/www/index.html +++ b/www/index.html @@ -3,7 +3,7 @@ Chunk Map - + @@ -22,4 +22,4 @@ }; - \ No newline at end of file +