Jump to content

Phaser making my Mac run hot


Gorpomon
 Share

Recommended Posts

Hi all, I'm making a game in phaser and it is making my mac run very hot. I'm looking to find out what might be the cause.

I noticed the first time it happened was when I made a shooter game that did not cache bullet objects, but instead just created new ones. After maybe 20 refreshes the game was causing my mac to run very hot (so much that you wouldn't want it on your lap). I fixed that and it cooled down.

The second time was when I was logging 'this' in an update function, which I don't think should result in that but it was.

Outside of not reusing objects what else can be a really big memory/processor suck in your game?

Link to comment
Share on other sites

Google Chrome has excellent profiling tools that can really help you see what your game is doing cpu/mum wise:

For CPU: https://developer.chrome.com/devtools/docs/cpu-profiling

And memory: https://developer.chrome.com/devtools/docs/javascript-memory-profiling

These should help you find any cause of memory and/or cpu leaks.

Don't forget to run them on un-minified code so you get the best result!

Link to comment
Share on other sites

For me setting rendering to Phaser.CANVAS when initialising game helped to lower temperature and increased fps specifically on MAC
 

var game = new Phaser.Game(sizeX, sizeY, Phaser.CANVAS);

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...