Closed ddh closed 8 years ago
Seems the issue is line 76 in playgame.js, where it calls this.initGoats(). Removing that line seems to get rid of the console output. Can you confirm this fixes the issue?
Tried commenting that line out and it seems to work. PlayGame is a little messy so I'm not sure if there are no side effects of taking that line out. Nothing breaks so far, but then why was it there to begin with?
That's a good question. I'm going to try to redo all of the scene logic. Right now the this.isInTransitionScene variable is being toggled on every scene, which makes the assumption that there will always be a transition scene, then a round scene, then a transition scene, etc. That makes it difficult to add new scenes to the game.
Yeah, try to abstract some of that logic out into functions if you need to and rename some properties/get rid of things. I branched out and tried doing some of it on my own but it was an endless rabbit hole. I'll push it up if you want to take a look. It's far from working but has some better implementations in there.
I'm sure it would be worth taking a look. Can you push that to a separate branch? I'll start working off of that if you've made some progress already.
Sure but some warning, it's a mess. I gave up about halfway and started working on powerups. I'll push it up once I get this last powerup logic finished; say 5-10min?
That's perfect.
Fixed
Need to remove the goats or disable their controls during transition screens (end-round score screens). Leaving this bug in causes poor performance if left on a transition screen due to AI goats continuously charging, then their charge decays which wastes CPU. It causes my macbook to heat-up and kick in its fan (and rarely does that happen unless I'm running something extremely CPU intensive).