Jump to content

exporting phaser as movie


dakota11
 Share

Recommended Posts

Yeah, I want create an animation and output as a string of PNGs.  I've done it with Processing, running it server side and saving to the local disk.  The issue with Phaser is that it only runs client side, so there is no local disk access as far as I can tell.

Link to comment
Share on other sites

Yeah, I want create an animation and output as a string of PNGs.  I've done it with Processing, running it server side and saving to the local disk.  The issue with Phaser is that it only runs client side, so there is no local disk access as far as I can tell.

I think you can cache a few GB in Chrome locally using their Offline Storage API [ https://developer.chrome.com/apps/offline_storage ] - ofcourse you still have to get the data out of there later, maybe you could concatenate a few thousand PNGs together in Offline Storage then expose these using saveAs() to allow them to be saved out?

Or upload the images back to the locally running webserver using XHR, and save them "server side".

Or write a Firefox addon in JavaScript which your game can communication with to save files (be careful this would be a security hole by design so don't forget and leave it enabled). Addons don't have the same pesky security limitations regular scripts on webpages have to live with so you can probably use something like OS.File to save data out with abandon...

Or as DrHayes suggested, just use screen capture software, it works well enough for millions of YouTubers...

Note: 3 of these 4 suggestions aren't really things I think you should try, and are instead explained in the hope that it makes it clear why this is so.

Link to comment
Share on other sites

If server rendering is what your re looking for, you should check out some implementation of html canvas on nodejs. I found something like this on google: https://changelog.com/node-canvas-render-and-stream-html5-canvas-using-node-js/

You can just run phaser on server and render all the frames completely on server. No need to work around the limitations of browser client.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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