Main | LLJS: Low-Level JavaScript »
Tuesday
Jul092013

Latest Shumway Demos

Shumway is a Flash player and runtime written entirely in JavaScript. It uses HTML5 Canvas to render Flash content and JavaScript to execute ActionScript code. Shumway is NOT an ahead-of-time Flash to HTML5 translator, instead it is meant to be a complete drop in replacement for the Flash player and thus needs to execute .SWF files directly.

http://www.youtube.com/watch?v=LE2LIFJBptE

The first video shows off the following demos (in order):

  • Racing Game: A very simple ActionScript 3 racing game, most notable feature here is path hit testing which is used by the game to implement collision detection.
  • Box2D Demo 1: A demo of the Box 2D physics engine ported to ActionScript3. Shumway uses a JIT compiler to translate ActionScript 3 (bytecode) to JavaScript. You will notice a slight pause right before the first box lands on the floor, this is the Shumway JIT compiling the Box 2D code required to compute collision response.
  • Box2D Demo 2: A few more complicated Box 2D scenes. There is a sight delay at startup while the JIT compiles the code, but then the simulations are fairly smooth.
  • Box2D Truck Demo: Same as above.
  • Truck Game: This is a fairly complex Flash game that uses Box2D internally and has a lot of graphic assets. The short stutter at the beginning is because of a very large SVG shape that is displayed briefly, it however takes a long time to parse and render. During the loading screen (right before the game starts) the game renders all of its vector graphic assets into bitmaps which are then composited during the game. The game itself is definitely playable.  

http://www.youtube.com/watch?v=oe1diSzcFiU

The second video shows off Shumway running the YouTube Flash player. It doesn't work completely right but it is able to at least display the video. This is using a special build of FF that uses GStreamer.

 

Reader Comments (1)

Wow, that's impressive. Last time I looked at Shumway (a few months ago) it wasn't even remotely close to being able to play video. None of the video playing api's were implemented. I believe this is becoming pretty useful.

I hope this project sticks around long enough to become a way to view legacy Flash content long after Adobe has dropped support for it. It would be phenomenal if devices with mobile hardware (Smartphones/Tablets/HDMI dongles) could make use of this in the near future but I'm too realistic to see that as a possibility.

July 11, 2013 | Unregistered CommenterJeffrey

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>