dakota11

exporting phaser as movie

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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.