Skip to content
Browse files

readme, cleanup

  • Loading branch information...
1 parent e0bce2e commit 09a925ab88073ad74d16786ca166610ff4b5afc9 @seanhess committed Nov 10, 2012
Showing with 42 additions and 110 deletions.
  1. +7 −2 Makefile
  2. +16 −27 README.md
  3. +1 −1 package.json
  4. +11 −48 public/controllers/GameCtrl.ts
  5. +1 −18 public/directives/sprite.ts
  6. +1 −3 public/partials/game.html
  7. +5 −11 public/services/Players.ts
View
9 Makefile
@@ -1,6 +1,11 @@
-all: build-ts
+all: build
-build-ts:
+build:
tsc --out public/main.js public/app.ts
+install:
+ npm install && bower install
+
+
+
View
43 README.md
@@ -3,42 +3,31 @@ uarbg2
Underwater Adventure Rocket Bazooka Guys v2
-
Install
-------
-* npm install
-* bower install
-* node_modules/.bin/coffee app.coffee
-
+ make install
Compiling
---------
-This should compile EVERYTHING, since app includes the controllers, and the controllers import the services
-
- tsc --module amd public/app.ts
-
-You still need to add everything to public/main.js to get it to load
-
-Todo
-----
-
-* matchmaking via geolocation
-
-* Skinning the main screen
+ make
-* Boot old players! Save your player version
+Hit List
+--------
+* Fix rounds / winning
+* Fix closed-lid players
+* Explosion
+* DONE move/fire after dead
+Next Features
+-------------
+* facebook / twitter login
+* invite only
-HitList
-------
-* Winning Bug/ Dead player moves. Too many points
-* Explosion
-* Unlocking Payments
-Skinning
-* New backgrounds!
-* Bring the playerCard to the main screen
-* Logo with padding and looking nicer
+Not Yet
+-------
+* Update payments
+* matchmaking via geolocation
View
2 package.json
@@ -21,4 +21,4 @@
"stylus": "0.30.1",
"nib": "0.8.2"
}
-v
+}
View
59 public/controllers/GameCtrl.ts
@@ -73,20 +73,6 @@ angular.module('controllers')
return null
}
- function getSprite(newDirection) {
- var slide,
- previousDirection = players.current.direction,
- previous = players.current.sprite;
-
- if(previousDirection === newDirection) {
- slide = ++previous % 3;
- } else {
- slide = 1;
- }
-
- return slide;
- }
-
// ignore ALL key presses if they are dead
$scope.keypress = function (e) {
@@ -110,42 +96,19 @@ angular.module('controllers')
Players.move(players, players.current);
- // you need:
- // a list of updates: { x: 1, y: 2, direction: 'down' }
-
- //players.current.walking = true;
-
- //setTimeout(function(){
- //$scope.$apply(function() {
- //players.current.walking = false;
- //Players.move(players, players.current);
- //});
- //}, 500);
-
- /*players.current[location.axis] = location.location;
- players.current.direction = location.direction;
- players.move(players.current);*/
+ // WILL I HIT ANY OTHER PLAYERS?
- // WILL I HIT ANY OTHER PLAYERS?
-
- //var collision = false;
- //Players.alivePlayers(players.all).forEach(function(p:IPlayer){
- //if (p.name != players.current.name && p.state != "dead") {
- //if (location.axis == "x") {
- //if (p.x == location.location && p.y == players.current.y) collision = true;
- //}
- //if (location.axis == "y") {
- //if (p.y == location.location && p.x == players.current.x) collision = true;
- //}
- //}
- //});
- //if (!collision) {
-
-
- //} else {
- //// we can play a collision sound here!
+ //var collision = false;
+ //Players.alivePlayers(players.all).forEach(function(p:IPlayer){
+ //if (p.name != players.current.name && p.state != "dead") {
+ //if (location.axis == "x") {
+ //if (p.x == location.location && p.y == players.current.y) collision = true;
+ //}
+ //if (location.axis == "y") {
+ //if (p.y == location.location && p.x == players.current.x) collision = true;
//}
//}
- // }
+ //});
+ //if (!collision) {
}
})
View
19 public/directives/sprite.ts
@@ -1,21 +1,5 @@
///<reference path="../def/angular.d.ts"/>
-/*
-
-// sprite-walking="player.walking"
-// sprite: generic, plays through different sprites on a sheet
-// hmm... I'd like to reuse some stuff
-
-
-SPRITES: in general, make them change vertically, so you just change the background-y
-
-... this should be defined in the CSS, no?
-
-PERSON: bind to direction
-PERSON: play through multiple states
-*/
-
-
angular.module('directives')
// simple directive that updates the background-y given a direction
@@ -79,8 +63,7 @@ angular.module('directives')
if (frame >= TOTAL_FRAMES) stopWalking()
}
- scope.$watch(attrs.spriteWalking + ".x", startWalking)
- scope.$watch(attrs.spriteWalking + ".y", startWalking)
+ attrs.$observe('spriteWalking', startWalking)
}
})
View
4 public/partials/game.html
@@ -34,11 +34,9 @@ <h1 class="winner" ng-show="players.winner">{{players.winner.name}} Wins!</h1>
ng-repeat="player in players.all | filter:{state:'alive'}"
ng-style="player | position"
sprite-direction="player.direction"
- sprite-walking="player"
+ sprite-walking="{{player.x}} {{player.y}}"
>
- <!--sprite-walking="player.x + player.y"-->
-
<div class="taunt triangle-border left" ng-show="players.taunt">{{players.taunt}}</div>
</div>
<div ng-repeat="missile in missiles.all">
View
16 public/services/Players.ts
@@ -23,10 +23,6 @@ interface IPlayer {
// alive or dead
state:string;
-
- // move this off of player
- walking?:bool;
- sprite?:number;
}
// only variables
@@ -115,7 +111,6 @@ angular.module('services')
player.x = Board.randomX()
player.y = Board.randomY()
- player.sprite = 1
player.direction = Board.DOWN
player.state = STATE.ALIVE
player.wins = player.wins || 0
@@ -225,12 +220,11 @@ angular.module('services')
state.gameRef.child('winner').remove()
state.all.forEach((player) => {
- player.x = Board.randomX()
- player.y = Board.randomY()
- player.sprite = 1
- player.direction = Board.DOWN
- player.state = STATE.ALIVE
- FB.update(state.playersRef.child(player.name), player)
+ player.x = Board.randomX()
+ player.y = Board.randomY()
+ player.direction = Board.DOWN
+ player.state = STATE.ALIVE
+ FB.update(state.playersRef.child(player.name), player)
})
}

0 comments on commit 09a925a

Please sign in to comment.
Something went wrong with that request. Please try again.