Posts Tagged ‘llvm’

Sunday, July 25th, 2010

Alessandro Pignotti’s project looks to be the start of something good to come. Lightspark Open Source Flash Player [github]has some really nice features that should influence the Flash Player and maybe even draw some interest from Adobe?  Maybe it can be like the Moonlight player for Silverlight only broader.

One such awesome feature is OpenGL GLSL hardware rendered shaders for elements of flash. Flash has Pixel Bender which is pretty nice but having GLSL shaders and the use of OpenGL directly is great.


  • JIT compilation of ActionScript to native x86 bytecode using LLVM
  • Hardware accelerated rendering using OpenGL Shaders (GLSL)
  • Very good and robust support for current-generation ActionScript 3
  • A new, clean, codebase exploiting multithreading and optimized for modern hardware. Designed from scratch after the official Flash documentation was released.
Monday, October 5th, 2009

Well good news for Flash developers, Flash CS5 will finally compile to native iPhone and Touch Applications. This is great news for many developers out there who have stuck with the Flash platform.  I am sure there will still be limitations to what you can do with Flash on the iPhone and it will probably be mostly 2D games and apps but this is a great start to getting the Flash platform truly mobile and up to the rest of the industry.

Flash Professional CS5 will enable you to build applications for iPhone and iPod touch using ActionScript 3. These applications can be delivered to iPhone and iPod touch users through the Apple App Store.*

A public beta of Flash Professional CS5 with prerelease support for building applications for iPhone is planned for later this year. Sign up to be notified when the beta starts.

I have been questioning why they have not moved to this model before when others are doing so such as haXe, Unity3D and MonoTouch.  Getting Flash on the web browsers on a mobile is hard because Flash is pretty CPU intensive on embedded devices which is really where computers were in the late 90′s and close to 400-600 MHz processors.  Today these machines wouldn’t be able to run Flash very well and that is the same effect you get on a mobile phone.  But cross-compiling to native, similar to how Unity 3D does it or other solutions like MonoTouch and XNATouch, this is the best solution until mobile/embedded devices have 1GHz processors and more than 500MB of memory. Adobe is using LLVM, much like the Alchemy model, to achieve getting AS3 content onto an iPhone/Touch with AOT or Ahead of Time compilation rather than JIT compilation.

So how do you build an application for the iPhone? It’s simple, really. The forthcoming beta of Adobe Flash Professional CS5 incorporates the ability to create an iPhone application. You have access to nearly all the AIR 2.0 and Flash Player 10.1 APIs. For example, you can use APIs such as RTMP, Remote Shared Objects, and AMF as well as AIR APIs like SQLite and filesystem access. For more information see the developer FAQ on Adobe Labs.

I am glad to see Adobe finally moving on mobile platforms beyond Flashlite.  Flashlite is a poor solution in most cases on embedded devices because they really need native apps to perform, again due to the hardware limitations and it is a whole new platform to learn. Adobe is doing the hard work to make it easy to get developers content on the new embedded devices that are storming the world such as the iPhone and Touch.

Saturday, February 28th, 2009

Alchemy is going to shake things up a bit.  As witnessed before from Quake running in flash and now ODE compiled to run in flash using Alchemy (LLVM based). It is an early test but shows what could be possible.

Mihai Pricope has a post with sources on how he got the ODE (Open Dynamics Engine) a great open source physics engine for 3D, running on the AVM2 Flash Player virtual machine.

I’ve took Alchemy for a test and decided to compile ODE (Open Dynamic Engine). Just to add yet another physics engine to the Flash World. It was a hell of a ride but I finally got to produce some bouncing balls :). For a still unknown reason some as 3d libraries have been very slow to render 6 translucent walls and 2 balls. Papervision3D seems to move quite decent.

You can download the ode sources from here. To recompile them do (you need to have the Alchemy environment turned on):

Flash 10 will become mainstream shortly and with that the possibilities of using Alchemy in your projects is becoming a reality for production.  But what specifically can you do with Alchemy, a project that helps to compile C/C++ code into AVM2 capable files?

Alchemy described from Adobe:

With Alchemy, Web application developers can now reuse hundreds of millions of lines of existing open source C and C++ client or server-side code on the Flash Platform.  Alchemy brings the power of high performance C and C++ libraries to Web applications with minimal degradation on AVM2.  The C/C++ code is compiled to ActionScript 3.0 as a SWF or SWC that runs on Adobe Flash Player 10 or Adobe AIR 1.5.

Alchemy is based on the LLVM Low Level Virtual Machine that allows new levels of code translation.  Maybe this can lead to more effective and performing code to run on the iPhone with flash player 10. Or some type of system that allows flash developers to code in AS3 or take projects and get them ready to run on the iPhone much like some of the Java to Cocoa compilation systems and Unity3D using mono to compile down to iPhone capable code.