Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
25 changes: 9 additions & 16 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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).
22 changes: 0 additions & 22 deletions bower.json

This file was deleted.

28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -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 <mr.marcus.l.robinson@gmail.com>",
"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"
}
}
4 changes: 2 additions & 2 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<title>Chunk Map</title>
<script src="lib/phaser/index.js"></script>
<script src="lib/phaser/phaser.js"></script>
<script src="js/game/world-sim.js"></script>
<script src="js/game/chunk-tile-factory.js"></script>
<script src="js/game/engine.js"></script>
Expand All @@ -22,4 +22,4 @@
};
</script>
</body>
</html>
</html>