Jump to content

Flash to HTML5 canvas


Akis
 Share

Recommended Posts

Adobe did an announcement today about html5 inside the latest version of Flash. You can read it more here: https://blogs.adobe.com/flashpro/2013/12/03/new_html5_canvas/

and see the video http://www.youtube.com/watch?v=ciDyHsEQXQY

 

 

I think this is really great for big team where some artists uses Flash to rapidly create prototypes or animations, but the issue is that it only output CreateJS code. I'm wondering if it could be possible to plug another graphic library in there ^^

Link to comment
Share on other sites

I've been using this for 4 months now (as part of the Flash pre-release team) and it works quite nicely, but has some major caveats:

 

1) As you state it's designed for CreateJS. Exported animations use the cjs encoded method, so you'd need to write your own decoder (or bastardise theirs), which will include using their Tween engine and MovieClip implementation. Possible, but a load of work.

 

2) It writes direct to its own canvas. If your game is running in WebGL that means a continuous texture upload to the GPU, which can be pretty slow on some systems (depending on volume of data).

 

3) It uses native canvas commands to build up scenes. So it'll use lineTo, arc, fill, etc. It combines this with tweening bitmaps to re-create the Flash animation. This is great in the sense that it means you don't need to worry about massive sprite sheets, but you also take a performance hit there the more complex the scene gets.

 

4) It works on a whole scene basis. By that what I mean is that you cannot use this to animate say just one sprite for your game. It literally takes over the whole canvas. So it could be really useful for cutscenes, intros, etc, but that's about it.

 

I've been working on implementing it into Phaser for a while now (as part of a client project) and it's been a bit of a slog, but will carry on. Then the source will be open for anyone who needs it.

Link to comment
Share on other sites

4) It works on a whole scene basis. By that what I mean is that you cannot use this to animate say just one sprite for your game. It literally takes over the whole canvas. So it could be really useful for cutscenes, intros, etc, but that's about it.

 

Yep, that's what I thought.. But still be a good way to easily have cutscenes as you say.

Link to comment
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...
 Share

  • Recently Browsing   0 members

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