From 07858cddc5fc591f7f79c6dc02e3c4bba7ca95fa Mon Sep 17 00:00:00 2001 From: meadowstream Date: Sun, 27 Jul 2014 20:00:54 -0400 Subject: [PATCH] updated wavegen times --- js/checking.js | 2 +- js/main.js | 5 ++--- js/wavegen.js | 26 +++++++++++++------------- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/js/checking.js b/js/checking.js index 89f6a9b..e9a60aa 100644 --- a/js/checking.js +++ b/js/checking.js @@ -69,7 +69,7 @@ function consolidateBlocks(hex,side,index){ // add scores var now = MainHex.ct; if(now - hex.lastCombo < settings.comboTime ){ - settings.comboTime = waveone.nextGen/16* 2; + settings.comboTime = waveone.nextGen/16 * 2; hex.comboMultiplier += 1; hex.lastCombo = now; var coords = findCenterOfBlocks(deletedBlocks); diff --git a/js/main.js b/js/main.js index 75256e5..bf505ca 100644 --- a/js/main.js +++ b/js/main.js @@ -14,7 +14,6 @@ function scaleCanvas() { }; if (window.devicePixelRatio) { - //from https://gist.github.com/joubertnel/870190 var cw = $("#canvas").attr('width'); var ch = $("#canvas").attr('height'); @@ -195,7 +194,7 @@ function setStartScreen() { $('#restartBtn').show(); $('#startBtn').show(); $('#attributions').show(); - showbottombar() + showbottombar(); gameState = 0; requestAnimFrame(animLoop); @@ -262,7 +261,7 @@ function animLoop() { break; case 4: - setTimeout(function(){initialize(1)}, 1); + setTimeout(function(){initialize(1);}, 1); render(); return; diff --git a/js/wavegen.js b/js/wavegen.js index 8e363be..e0206b1 100644 --- a/js/wavegen.js +++ b/js/wavegen.js @@ -1,8 +1,8 @@ function blockDestroyed() { - if (waveone.nextGen > 1000) { - waveone.nextGen -= 7 * settings.creationSpeedModifier; + if (waveone.nextGen > 750) { + waveone.nextGen -= 25 * settings.creationSpeedModifier; } else { - waveone.nextGen = 1000; + waveone.nextGen = 750; } if (waveone.difficulty < 15) { @@ -15,7 +15,7 @@ function blockDestroyed() { function waveGen(hex) { this.lastGen = 0; this.last = 0; - this.nextGen = 2800; + this.nextGen = 2300; this.start = 0; this.colors = colors; this.ct = 0; @@ -27,8 +27,8 @@ function waveGen(hex) { this.dt += 16.6666667; this.computeDifficulty(); if ((this.dt - this.lastGen)*settings.creationSpeedModifier > this.nextGen) { - if (this.nextGen > 1000) { - this.nextGen -= 5 * ((this.nextGen/1300)) * settings.creationSpeedModifier; + if (this.nextGen > 750) { + this.nextGen -= 10 * ((this.nextGen/1300)) * settings.creationSpeedModifier; } } }; @@ -42,19 +42,19 @@ function waveGen(hex) { var lim = randInt(1, 7); if (this.ct > lim) { var nextPattern = randInt(0, 3 + 21); - if (nextPattern > 3 + 17) { + if (nextPattern > 15) { this.ct = 0; this.currentFunction = this.doubleGeneration; - } else if (nextPattern > 3 + 14) { + } else if (nextPattern > 10) { this.ct = 0; this.currentFunction = this.crosswiseGeneration; - } else if (nextPattern > 3 + 11) { + } else if (nextPattern > 7) { this.ct = 0; this.currentFunction = this.spiralGeneration; - } else if (nextPattern > 3 + 8) { + } else if (nextPattern > 4) { this.ct = 0; this.currentFunction = this.circleGeneration; - } else if (nextPattern > 3 + 5) { + } else if (nextPattern > 1) { this.ct = 0; this.currentFunction = this.halfCircleGeneration; } @@ -117,7 +117,7 @@ function waveGen(hex) { addNewBlock((d+i) % 6, colorList[i], 1.5 + (this.difficulty/15) * 3); } - this.ct += 5; + this.ct += 8; this.lastGen = this.dt; this.shouldChangePattern(); } @@ -137,7 +137,7 @@ function waveGen(hex) { this.spiralGeneration = function() { var dir = randInt(0, 2); - if (this.dt - this.lastGen > this.nextGen * (5/9)) { + if (this.dt - this.lastGen > this.nextGen * (2/3)) { if (dir) { addNewBlock(5 - (this.ct % MainHex.sides), colors[randInt(0, colors.length)], 1.5 + (this.difficulty/15) * (3/2)); }