harrywatson Posted April 4, 2014 Share Posted April 4, 2014 Hi Everyone, My scene changing in my game in progress 'My Name is Momo' causesthe frame rate to plummet down to 5fps http://harrywatson.altervista.org/momo/index2.html I've used a profiler to isolate it down to the following event listener type (I have a number of these).Everything works fine if the player goes through the game at an expected sort of pace. Butclicking through scenes two, three and four, quickly jams everything up. Is there a kind soulout there who would like to have a look? Regards Harry function Invball(){ if(squareBump(inventory.x, inventory.y, 800, 80, ballclone.x, ballclone.y)){// The Rectangle collision stage.removeChild(ball); ballclone.addEventListener("pressmove",function(eve){ eve.currentTarget.x = eve.stageX; eve.currentTarget.y = eve.stageY; }); ballclone.addEventListener("pressup",function snap(){ ballclone.x = 132; ballclone.y = 570; }); stage.update(); } } createjs.Ticker.addEventListener("tick", Invball); Quote Link to comment Share on other sites More sharing options...
lobsterhands Posted April 29, 2014 Share Posted April 29, 2014 It played fine for me all the way through: FF 28.0, Win 7. What a bizarre game. But, like I said, I played all the way through. It was unique as hell. Quote Link to comment Share on other sites More sharing options...
d13 Posted May 1, 2014 Share Posted May 1, 2014 I love this game.No problem with the frame rate either. Quote Link to comment Share on other sites More sharing options...
harrywatson Posted May 2, 2014 Author Share Posted May 2, 2014 Hi thanks for replies. I isolated the scenes so that one needed to be complete before going onto the next.I'd finished the game by the time you guys saw the question.Thanks for playing and for feedback. I'm encouraged to make my next game weird as well. Quote Link to comment Share on other sites More sharing options...
Skib Posted May 3, 2014 Share Posted May 3, 2014 This game was awesome! Hilarious and a total trip! Nice work. Quote Link to comment Share on other sites More sharing options...
harrywatson Posted May 3, 2014 Author Share Posted May 3, 2014 Wow! Thank you. Quote Link to comment Share on other sites More sharing options...
pixelpathos Posted September 14, 2014 Share Posted September 14, 2014 Bit late to the party , but it looks like you're creating two new functions, and attaching two new event handlers, on every tick, as Invball() is called on every tick event. Can the handler functions be created and attached outside of the update loop? harrywatson 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.