Commits

Tao Chen committed fa50330

changed the basket and rebound board to make direct shot a little bit easier, this may need further fix

  • Participants
  • Parent commits 488dbfa

Comments (0)

Files changed (4)

 						y = other.top - height;
 						// hit bottom
 						velocity_y = - velocity_y * 0.7;
+						if (other.name == "edge")
+						{
+							// give a bonus fraction
+							velocity_y *= 0.8;
+							GameWorld.world.effects.edge_effect(other);
+						}
+						
 						if (other is Ground && state == SHOOTED)
 							tricks.push("ground");
 					}
 package
 {
+	import flash.utils.Endian;
+	
 	import net.flashpunk.Entity;
 	import net.flashpunk.FP;
 	import net.flashpunk.Graphic;
 		public var sensor2:Entity;
 		public var sensor3:Entity;
 		
+		public var edge1:Entity;
+		public var edge2:Entity;
+		public var edge3:Entity;
+		
 		
 		public function trigger(sensor:Entity):Boolean
 		{
 			
 			// add corresponding hit boxes
 			var world:GameWorld = GameWorld.world;
-			world.add_block(212, 53, 2, 5, "block");
-			world.add_block(230, 36, 4, 18, "block");
-			world.add_block(212, 107, 2, 5, "block");
-			world.add_block(230, 90, 4, 18, "block");
-			world.add_block(212, 161, 2, 5, "block");
-			world.add_block(230, 144, 4, 18, "block");
+			edge1 = world.add_block(212, 53, 2, 5, "block");
+			world.add_block(230, 36, 4, 13, "block");
+			world.add_block(234, 50, 5, 5, "block");
 			
-			sensor3 = world.add_block(213,  55, 14, 3, "sensor");
-			sensor2 = world.add_block(213, 109, 14, 3, "sensor");
-			sensor1 = world.add_block(213, 163, 14, 3, "sensor");
+			edge2 = world.add_block(212, 107, 2, 5, "block");
+			world.add_block(230, 90, 4, 13, "block");
+			world.add_block(234, 104, 5, 5, "block");
+			
+			edge3 = world.add_block(212, 161, 2, 5, "block");
+			world.add_block(230, 144, 4, 13, "block");
+			world.add_block(234, 158, 5, 5, "block");
+			
+			// abuse the name attribute
+			edge1.name = edge2.name = edge3.name = "edge";
+			
+			
+			sensor3 = world.add_block(213,  55, 16, 3, "sensor");
+			sensor2 = world.add_block(213, 109, 16, 3, "sensor");
+			sensor1 = world.add_block(213, 163, 16, 3, "sensor");
 			
 			reset();
 		}
 			}
 		}
 		
+		public function edge_effect(edge:Entity):void
+		{
+			emit.emit("score", edge.x, edge.y);
+		}
+		
 		public function Effects(ball:Ball)
 		{
 			emit = new Emitter(ImgParticles, 6, 6);
 1. a loader, fix sound files and reduce sound size
-2. find a way to fix collision, give less missed good shots
----
-use current position and last frame position to calculate collision
-so it will avoid some quirky pre rebound
-fix y collison so if aball is on a platform it will stay on it rather than falling thru it
+2!. find a way to fix collision, give less missed good shots
+3. figure out why 'direct' is so rare
+--
+after score collision is ruining all the direct shot fun, figure out a way to solve this
+maybe redesign the basket 
+AVOID POST SCORED COLLISION
 
-
-
-3. figure out why 'direct' is so rare
 4. detailed background, player sprite overhaul
-5. give basket a bigger rebound fraction so it is more easy to score
+5!. give basket a bigger rebound fraction so it is more easy to score
 6. add more trick types, enchance tricks parsing and score calculates
 7. fix alley oop velocity, now it is quite weird. also fix alley oop lines, when doing a high shot the lines are hard to see, try to interpolate more points
+8. reduce ball size to see if it would looks better
 
 
 bugs