From 1097d56d50f00f3a9f2b49e3d9f24d263931f212 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 11 Feb 2014 14:25:35 -0800 Subject: [PATCH 1/3] Increased maxTranslation in box2d to fix arrow max speed limit problem. --- vendor/scripts/Box2dWeb-2.1.a.3.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/scripts/Box2dWeb-2.1.a.3.js b/vendor/scripts/Box2dWeb-2.1.a.3.js index 857be1dcb..bca465363 100644 --- a/vendor/scripts/Box2dWeb-2.1.a.3.js +++ b/vendor/scripts/Box2dWeb-2.1.a.3.js @@ -3705,7 +3705,7 @@ Box2D.postDefs = []; Box2D.Common.b2Settings.b2_velocityThreshold = 1.0; Box2D.Common.b2Settings.b2_maxLinearCorrection = 0.2; Box2D.Common.b2Settings.b2_maxAngularCorrection = 8.0 / 180.0 * b2Settings.b2_pi; - Box2D.Common.b2Settings.b2_maxTranslation = 2.0; + Box2D.Common.b2Settings.b2_maxTranslation = 20.0; Box2D.Common.b2Settings.b2_maxTranslationSquared = b2Settings.b2_maxTranslation * b2Settings.b2_maxTranslation; Box2D.Common.b2Settings.b2_maxRotation = 0.5 * b2Settings.b2_pi; Box2D.Common.b2Settings.b2_maxRotationSquared = b2Settings.b2_maxRotation * b2Settings.b2_maxRotation; From 6505064fb62886a21c4b6c25f613f767cc378139 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 11 Feb 2014 14:38:47 -0800 Subject: [PATCH 2/3] Slightly less aggressively preload workers. --- app/lib/God.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/lib/God.coffee b/app/lib/God.coffee index 4cd1afe00..6a77d3a54 100644 --- a/app/lib/God.coffee +++ b/app/lib/God.coffee @@ -13,6 +13,7 @@ module.exports = class God @ids[@lastID] maxAngels: 2 # how many concurrent web workers to use; if set past 8, make up more names + maxWorkerPoolSize: 2 # ~20MB per idle worker worldWaiting: false # whether we're waiting for a worker to free up and run the world constructor: -> @id = God.nextID() @@ -30,8 +31,10 @@ module.exports = class God fillWorkerPool: => return unless Worker @workerPool ?= [] - while @workerPool.length < @maxAngels + if @workerPool.length < @maxWorkerPoolSize @workerPool.push @createWorker() + if @workerPool.length < @maxWorkerPoolSize + @fillWorkerPool() getWorker: -> @fillWorkerPool() From c29e4d6c9c0034075b3e747f8c7180deb58a5669 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 11 Feb 2014 15:05:54 -0800 Subject: [PATCH 3/3] Stupid casting sound effect. --- app/lib/AudioPlayer.coffee | 2 +- app/views/play/level/tome/cast_button_view.coffee | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/lib/AudioPlayer.coffee b/app/lib/AudioPlayer.coffee index 4b4a3cba1..8301d5295 100644 --- a/app/lib/AudioPlayer.coffee +++ b/app/lib/AudioPlayer.coffee @@ -33,7 +33,7 @@ class Media class AudioPlayer extends CocoClass subscriptions: - 'play-sound': (e) -> @playInterfaceSound e.trigger + 'play-sound': (e) -> @playInterfaceSound e.trigger, e.volume constructor: () -> super() diff --git a/app/views/play/level/tome/cast_button_view.coffee b/app/views/play/level/tome/cast_button_view.coffee index 44d113815..76d1023aa 100644 --- a/app/views/play/level/tome/cast_button_view.coffee +++ b/app/views/play/level/tome/cast_button_view.coffee @@ -54,6 +54,7 @@ module.exports = class CastButtonView extends View onCastSpells: (e) -> @casting = true + Backbone.Mediator.publish 'play-sound', trigger: 'cast', volume: 0.25 @updateCastButton() onWorldLoadProgressChanged: (e) ->