• Content count

  • Joined

  • Last visited

  1. Navarre

    Phaser unrendered (headless) updates for simulation

    Thanks! I'll give it a try ASAP.
  2. Navarre

    Phaser unrendered (headless) updates for simulation

    Thanks for your reply! What I would like to achieve is running Phaser logic (graphics update - e.g. color transition, world physics, timers, and so on) at a frequency which is NOT limited by graphics rendering but instead it's just the maximum a browser can achieve. This would be useful for e.g. a simulation that I have to execute thousands of times (e.g. a Montecarlo simulation), in which you are just interested in the final results and not in the single realizations. So for your question: no, I never need a rendering. I just need a way to instance a Phaser world, create a game, execute that game in headless mode and "do things" in the update function. "Do things" can be for everything from computing stats for later analysis or change simulation setup. I'd like to know if there's a proper way to do it without modifying Phaser.
  3. I would like to use Phaser in headless mode (i.e. update world at a higher rate than screen update frequency, without anything getting drawn to screen) to simulate many times an environment. I couldn't get anywhere in the docs how to use it: if you set HEADLESS mode in Game creation no update is done: how can one manually call Phaser game ticks? I think even Phaser.CANVAS mode can be suitable for the job: but how can one disable rendering and bind any update to a looping function faster than requestAnimationFrame?