Skip to content

Commit

Permalink
readme, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
seanhess committed Nov 11, 2012
1 parent e0bce2e commit 09a925a
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 110 deletions.
9 changes: 7 additions & 2 deletions Makefile
@@ -1,6 +1,11 @@
all: build-ts all: build


build-ts: build:
tsc --out public/main.js public/app.ts tsc --out public/main.js public/app.ts


install:
npm install && bower install





43 changes: 16 additions & 27 deletions README.md
Expand Up @@ -3,42 +3,31 @@ uarbg2


Underwater Adventure Rocket Bazooka Guys v2 Underwater Adventure Rocket Bazooka Guys v2



Install Install
------- -------


* npm install make install
* bower install
* node_modules/.bin/coffee app.coffee



Compiling Compiling
--------- ---------


This should compile EVERYTHING, since app includes the controllers, and the controllers import the services make

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


* 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 Not Yet
* New backgrounds! -------
* Bring the playerCard to the main screen * Update payments
* Logo with padding and looking nicer * matchmaking via geolocation
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -21,4 +21,4 @@
"stylus": "0.30.1", "stylus": "0.30.1",
"nib": "0.8.2" "nib": "0.8.2"
} }
v }
59 changes: 11 additions & 48 deletions public/controllers/GameCtrl.ts
Expand Up @@ -73,20 +73,6 @@ angular.module('controllers')
return null 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 // ignore ALL key presses if they are dead
$scope.keypress = function (e) { $scope.keypress = function (e) {


Expand All @@ -110,42 +96,19 @@ angular.module('controllers')


Players.move(players, players.current); Players.move(players, players.current);


// you need: // WILL I HIT ANY OTHER PLAYERS?
// 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? //var collision = false;

//Players.alivePlayers(players.all).forEach(function(p:IPlayer){
//var collision = false; //if (p.name != players.current.name && p.state != "dead") {
//Players.alivePlayers(players.all).forEach(function(p:IPlayer){ //if (location.axis == "x") {
//if (p.name != players.current.name && p.state != "dead") { //if (p.x == location.location && p.y == players.current.y) collision = true;
//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 (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!
//} //}
//} //}
// } //});
//if (!collision) {
} }
}) })
19 changes: 1 addition & 18 deletions public/directives/sprite.ts
@@ -1,21 +1,5 @@
///<reference path="../def/angular.d.ts"/> ///<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') angular.module('directives')


// simple directive that updates the background-y given a direction // simple directive that updates the background-y given a direction
Expand Down Expand Up @@ -79,8 +63,7 @@ angular.module('directives')
if (frame >= TOTAL_FRAMES) stopWalking() if (frame >= TOTAL_FRAMES) stopWalking()
} }


scope.$watch(attrs.spriteWalking + ".x", startWalking) attrs.$observe('spriteWalking', startWalking)
scope.$watch(attrs.spriteWalking + ".y", startWalking)
} }
}) })


Expand Down
4 changes: 1 addition & 3 deletions public/partials/game.html
Expand Up @@ -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-repeat="player in players.all | filter:{state:'alive'}"
ng-style="player | position" ng-style="player | position"
sprite-direction="player.direction" 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 class="taunt triangle-border left" ng-show="players.taunt">{{players.taunt}}</div>
</div> </div>
<div ng-repeat="missile in missiles.all"> <div ng-repeat="missile in missiles.all">
Expand Down
16 changes: 5 additions & 11 deletions public/services/Players.ts
Expand Up @@ -23,10 +23,6 @@ interface IPlayer {


// alive or dead // alive or dead
state:string; state:string;

// move this off of player
walking?:bool;
sprite?:number;
} }


// only variables // only variables
Expand Down Expand Up @@ -115,7 +111,6 @@ angular.module('services')


player.x = Board.randomX() player.x = Board.randomX()
player.y = Board.randomY() player.y = Board.randomY()
player.sprite = 1
player.direction = Board.DOWN player.direction = Board.DOWN
player.state = STATE.ALIVE player.state = STATE.ALIVE
player.wins = player.wins || 0 player.wins = player.wins || 0
Expand Down Expand Up @@ -225,12 +220,11 @@ angular.module('services')
state.gameRef.child('winner').remove() state.gameRef.child('winner').remove()


state.all.forEach((player) => { state.all.forEach((player) => {
player.x = Board.randomX() player.x = Board.randomX()
player.y = Board.randomY() player.y = Board.randomY()
player.sprite = 1 player.direction = Board.DOWN
player.direction = Board.DOWN player.state = STATE.ALIVE
player.state = STATE.ALIVE FB.update(state.playersRef.child(player.name), player)
FB.update(state.playersRef.child(player.name), player)
}) })
} }


Expand Down

0 comments on commit 09a925a

Please sign in to comment.