From 7a35d5190a2a3b807c9a2359c5b9bb1550001b61 Mon Sep 17 00:00:00 2001 From: Philipp Abraham Date: Mon, 17 Feb 2014 00:37:35 +0100 Subject: [PATCH] difficulty adjustments --- src/bird.js | 2 +- src/difficulty.js | 16 +++++++++++----- src/pipe.js | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/bird.js b/src/bird.js index df53ab8..11801f4 100644 --- a/src/bird.js +++ b/src/bird.js @@ -10,7 +10,7 @@ define([], function() { // --- constants // circle with r=w and offset=(x,y) at current position var boundingBox = {x:6, y:10, w:28}; - var GRAVITY = 30; + var GRAVITY = 35; var JUMP_HEIGHT = 60; var MAX_VELOCITY = 200; diff --git a/src/difficulty.js b/src/difficulty.js index 16d4206..353b0fb 100644 --- a/src/difficulty.js +++ b/src/difficulty.js @@ -16,15 +16,21 @@ define([], function() { }, { minPoints: 8, - pipeDistance: 210, + pipeDistance: 220, pipeGap: 110, - speed: 2 + speed: 2.2 }, { minPoints: 15, - pipeDistance: 210, - pipeGap: 100, - speed: 2.2 + pipeDistance: 220, + pipeGap: 90, + speed: 2.8 + }, + { + minPoints: 30, + pipeDistance: 220, + pipeGap: 80, + speed: 3.2 } ]; diff --git a/src/pipe.js b/src/pipe.js index 2eed615..7eb3832 100644 --- a/src/pipe.js +++ b/src/pipe.js @@ -12,7 +12,7 @@ define(['difficulty'], function(difficulty) { this.gap = difficulty.getPipeGap(); var newX = lastX + difficulty.getPipeDistance(); lastX = newX; - this.position = {x:newX, y: Math.random()*210+210}; + this.position = {x:newX, y:Math.random()*150+210}; }; Pipe.prototype.tick = function() { };