Permalink
Browse files

first

  • Loading branch information...
0 parents commit d39a7a6051adbeff5e5901d0f6744ddbb99cbf40 @Raynos committed Aug 26, 2012
Showing with 657 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. +19 −0 LICENCE
  3. +2 −0 Makefile
  4. +15 −0 README.md
  5. +1 −0 entry/liveReload.js
  6. +7 −0 index.js
  7. +11 −0 map/index.js
  8. +33 −0 package.json
  9. +7 −0 player/index.js
  10. +30 −0 player/input.js
  11. +289 −0 static/bundle.js
  12. +225 −0 static/entry/liveReload.js
  13. +15 −0 static/index.html
@@ -0,0 +1,3 @@
+node_modules
+*.log
+*.err
19 LICENCE
@@ -0,0 +1,19 @@
+Copyright (c) 2012 Raynos.
+
+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.
@@ -0,0 +1,2 @@
+run:
+ browserify-server
@@ -0,0 +1,15 @@
+# Shooter game
+
+A multiplayer top down shooter
+
+## Example
+
+## Installation
+
+`npm install Shooter game`
+
+## Contributors
+
+ - Raynos
+
+## MIT Licenced
@@ -0,0 +1 @@
+require("live-reload")(8081)
@@ -0,0 +1,7 @@
+var Map = require("./map")
+ , Player = require("./player")
+
+var map = Map()
+ , player = Player()
+
+map.addEntity(player)
@@ -0,0 +1,11 @@
+module.exports = Map
+
+function Map() {
+ var map = {}
+
+ map.addEntity = addEntity
+
+ return map
+
+ function addEntity() {}
+}
@@ -0,0 +1,33 @@
+{
+ "name": "Shooter game",
+ "version": "0.0.1",
+ "description": "A multiplayer top down shooter",
+ "keywords": [],
+ "author": "Raynos <raynos2@gmail.com>",
+ "repository": "git://github.com/Raynos/Shooter game.git",
+ "main": "index",
+ "homepage": "https://github.com/Raynos/Shooter game",
+ "contributors": [
+ {
+ "name": "Jake Verbaten"
+ }
+ ],
+ "bugs": {
+ "url": "https://github.com/Raynos/Shooter game/issues",
+ "email": "raynos2@gmail.com"
+ },
+ "dependencies": {
+ "browserify-server": "~1.1.1",
+ "delta-stream": "~0.1.0",
+ "live-reload": "0.0.1",
+ "through": "~0.1.4"
+ },
+ "devDependencies": {},
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://github.com/Raynos/Shooter game/raw/master/LICENSE"
+ }
+ ],
+ "scripts": {}
+}
@@ -0,0 +1,7 @@
+var Input = require("./input")
+
+module.exports = Player
+
+function Player() {
+ var input = Input()
+}
@@ -0,0 +1,30 @@
+var through = require("through")
+ , KEYS = {
+ "37": "left"
+ , "38": "up"
+ , "39": "right"
+ , "40": "down"
+ }
+ , LEFT = 37
+ , UP = 38
+ , RIGHT = 39
+ , DOWN = 40
+
+module.exports = Input
+
+function Input() {
+ var stream = through()
+ , observable = stream.createObservable()
+
+ window.addEventListener("keydown", listenOnKeys)
+
+ return stream
+
+ function listenOnKeys(event) {
+ var key = KEYS[event.which]
+
+ if (key) {
+ stream.write(key)
+ }
+ }
+}

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title> Your title </title>
+ </head>
+ <body>
+ <!-- the main bundle served from index.js -->
+ <script src="bundle.js"></script>
+ <script src="entry/liveReload.js"></script>
+ <!--
+ Other bundles
+ <script src="entry/other-entry.js"></script>
+ -->
+ </body>
+</html>

0 comments on commit d39a7a6

Please sign in to comment.