<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>README.textile</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -9,12 +9,15 @@
 &lt;/head&gt;
 &lt;body&gt;
 	&lt;div id=&quot;bd&quot;&gt;
-		&lt;div id=&quot;stage-wrapper&quot;&gt;&lt;div id=&quot;stage&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+		&lt;div id=&quot;stage-wrapper&quot;&gt;&lt;div id=&quot;stage&quot;&gt;&lt;noscript&gt;&lt;span class=&quot;js-warning&quot;&gt;Javascript is required.&lt;/span&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/div&gt;
 		&lt;div id=&quot;info&quot;&gt;
 			&lt;h1&gt;Shapes&lt;/h1&gt;
 			&lt;p&gt;Shoot the angry rotating shapes before they run into you! Three exotic space themed backgrounds!&lt;/p&gt;
-			&lt;p&gt;&lt;strong&gt;Controls:&lt;/strong&gt; W,A,S,D to move, Mouse to aim, Left Mouse button to fire.&lt;/p&gt;
-			&lt;p class=&quot;warning&quot;&gt;This isn't meant to be a complete game. It's a prototype and buggy. That said, it &lt;em&gt;should&lt;/em&gt; be playable in most browsers.&lt;/p&gt;
+			&lt;p&gt;You start with 3 lives and 3 bombs. Bombs will destroy all enemy shapes on the screen. Use them wisely!&lt;/p&gt;
+			&lt;p&gt;Each enemy shape has a different behavior. Learn to use this to your advantage.&lt;/p&gt;
+			&lt;p&gt;&lt;strong&gt;Controls:&lt;/strong&gt; W,A,S,D to move, Mouse to aim, Left Mouse button to fire. Space detonates a bomb.&lt;/p&gt;
+			&lt;p class=&quot;warning&quot;&gt;&lt;em&gt;This isn't meant to be a complete game. It's a prototype and buggy. That said, it &lt;em&gt;should&lt;/em&gt; be playable in most decent browsers.&lt;/em&gt;&lt;/p&gt;
+			&lt;p&gt;&lt;a href=&quot;mailto:&quot;&gt;Questions, comments or flames?&lt;/a&gt;&lt;/p&gt;
 		&lt;/div&gt;
 	&lt;/div&gt;
 	&lt;script type=&quot;text/javascript&quot; src=&quot;js/yahoo-dom-event.js&quot;&gt;&lt;/script&gt;</diff>
      <filename>htdocs/index.html</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,6 @@
 			this.spritev.y = this.def.spritey;
 			this.fire('init', null);
 		}
-		//this.updateSprite();
 	};
 	var proto = G.Actor.prototype;
 	proto.getPoints = function() {
@@ -31,11 +30,14 @@
 		}
 	};
 	proto.updateSprite = function() {
-		// TODO: Improve the peformance of this function; it's taking ~30% of execution time so sayeth Firebug
+		// TODO: Is there any way to improve the performance of this function?
 		var s = this.sprite.style;
-		s.backgroundPosition = -this.spritev.x + 'px ' + -this.spritev.y + 'px';
-		s.left = this.position.x + 'px';
-		s.top = this.position.y + 'px';
+		var pos_x = parseInt(this.position.x) + 'px';
+		var pos_y = parseInt(this.position.y) + 'px';
+		var pos_bg = -parseInt(this.spritev.x) + 'px ' + -parseInt(this.spritev.y) + 'px';
+		if (s.backgroundPosition !== pos_bg) { s.backgroundPosition = pos_bg; }
+		if (s.left !== pos_x) { s.left = pos_x; }
+		if (s.top !== pos_y) {s.top = pos_y; }
 	};
 	proto.getBounds = function(rect) {
 		// TODO: Magic numbers are bad</diff>
      <filename>htdocs/js/actor.js</filename>
    </modified>
    <modified>
      <diff>@@ -64,7 +64,7 @@ Game.ActorDefs.EnemyPinky = {
 	},
 	think:function(me, world) {
 		var p = world.hero.position;
-		if (world.hero !== null &amp;&amp; me.position.within(125, p)) {
+		if (typeof(world.hero) !== 'undefined' &amp;&amp; me.position.within(125, p)) {
 			me.speed = 8;
 			me.direction = me.position.chase(p);
 		} else {
@@ -97,7 +97,7 @@ Game.ActorDefs.EnemyElDiablo = {
 	},
 	think:function(me, world) {
 		var p = world.hero.position;
-		if (world.hero !== null &amp;&amp; me.position.within(75, p)) {
+		if (typeof(world.hero) !== 'undefined' &amp;&amp; me.position.within(75, p)) {
 			me.speed = 14;
 			me.direction = me.position.chase(p);
 		} else {</diff>
      <filename>htdocs/js/actor_defs.js</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,6 @@
 		this.score = 0;
 		this.updateHUD();
 		this.initInput();
-		//this.crosshair = null;
 		this.hud.displayText('press space to begin', null, 100, 640, null);
 		this.accept_input = false;
 		this.state = 'ready';
@@ -57,10 +56,18 @@
 				me.world.killActor(hid);
 				me.lives--;
 				me.updateHUD();
-				me.hud.displayText('you died', null, 30, 640, null, '#f00');
-				me.hud.displayText('reload the page to try again', null, 150, 640, null);
-				//me.world.clean();
-				//me.world.setup();
+				if (me.lives &gt;= 1) {
+					var reset = function() {
+						me.world.killAll();
+						me.world.initHero();
+						me.world.spawning = true;
+						me.accept_input = true;
+					};
+					window.setTimeout(reset, 5000);
+				} else {
+					me.hud.displayText('game over', null, 30, 640, null, '#f00');
+					me.hud.displayText('reload the page to play again', null, 150, 640, null);
+				}
 				return;
 			}
 			me.awardPoints(actor1.getPoints() + actor2.getPoints());</diff>
      <filename>htdocs/js/engine.js</filename>
    </modified>
    <modified>
      <diff>@@ -107,10 +107,10 @@
 	};
 	proto.initSpawns = function() {
 		// TODO: Don't hardocode spawn points
-		this.spawns[0] = new Game.Vector(0, 0);
-		this.spawns[1] = new Game.Vector(this.width - 32, 0);
-		this.spawns[2] = new Game.Vector(0, this.height - 32);
-		this.spawns[3] = new Game.Vector(this.width - 32, this.height - 32);
+		this.spawns[0] = new G.Vector(0, 0);
+		this.spawns[1] = new G.Vector(this.width - 32, 0);
+		this.spawns[2] = new G.Vector(0, this.height - 32);
+		this.spawns[3] = new G.Vector(this.width - 32, this.height - 32);
 	};
 	proto.spawn = function() {
 		if (!this.spawning) { return false; }
@@ -118,11 +118,11 @@
 		for (var x = 0; x &lt; len; x++) {
 			var def = null;
 			switch (Game.util.randomRange(1, 5)) {
-				case 1: def = Game.ActorDefs.EnemyPinky; break;
-				case 2: def = Game.ActorDefs.EnemyTracker; break;
-				case 3: def = Game.ActorDefs.EnemyFlower; break;
-				case 4: def = Game.ActorDefs.EnemyCoward; break;
-				case 5: def = Game.ActorDefs.EnemyGhost; break;
+				case 1: def = G.ActorDefs.EnemyPinky; break;
+				case 2: def = G.ActorDefs.EnemyTracker; break;
+				case 3: def = G.ActorDefs.EnemyFlower; break;
+				case 4: def = G.ActorDefs.EnemyCoward; break;
+				case 5: def = G.ActorDefs.EnemyGhost; break;
 			}
 			var spawn = this.makeActor(def);
 			spawn.position = this.spawns[x].copy();</diff>
      <filename>htdocs/js/world.js</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,10 @@ body {
 	margin-right:4em;
 }
 #stage {
-
+	cursor:crosshair;
+	background:#000;
+	width:640px;
+	height:480px;
 }
 #stage-wrapper {
 	float:left;
@@ -31,5 +34,14 @@ body {
 	width:300px;
 	margin-left:20px;
 }
+.js-warning {
+	display:block;
+	margin:0 auto;
+	padding:1em;
+	color:red;
+	text-align:center;
+	font-weight:bold;
+	font-size:2em;
+}
 
 </diff>
      <filename>htdocs/style.css</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>README</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>eb932c618187e0baf447f21514e15e8c4b130f8a</id>
    </parent>
  </parents>
  <author>
    <name>geoffb</name>
    <email>gmblair@gmail.com</email>
  </author>
  <url>http://github.com/geoffb/shapes/commit/dc1131d0f7aa71a9c5c8d3c21314d38f37512cb9</url>
  <id>dc1131d0f7aa71a9c5c8d3c21314d38f37512cb9</id>
  <committed-date>2009-03-04T01:34:20-08:00</committed-date>
  <authored-date>2009-03-04T01:34:20-08:00</authored-date>
  <message>Added bombs; added level resets after losing a life; other cleanup and things I can't remember</message>
  <tree>82b8db4334708206916b065e622f58e3b351cde4</tree>
  <committer>
    <name>geoffb</name>
    <email>gmblair@gmail.com</email>
  </committer>
</commit>
