Archive for February, 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.
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.
The guys over at Flashbang Studios, a web game development studio in phoenix, az, and some of the most visible developers in the Unity3d space with Blurst, released something that may interest both FlashDevelop users and Unity3d developers.
FlashDevelop, is by far the best Flash / Flex /haXe IDE in my opinion so it is really great to release this for Unity. I hope one day I or someone has the time to port to Mono so it can be used on Macs even with the 140 pinvokes, it would be a good spread mechanism for mono.
With Unity3d coming to windows soon, UnityDevelop could be a good go to IDE for unity if you aren’t using solely C# with VS.NET. Currently this is based on FlashDevelop2 source code.
- Sample iPod iTouch Mesh data (meshdata.js) – contains models
- Code from the main engine (parpevision.js)
- Sample Viewport and main app (touch.js from demo 3)
Here is the code for the parpevision.js file and the mini engine, it is an MIT license. (more…)
Box2D is responsible for inspiring many 2d physics engines including Motor2, Box2DFlashAS3 and others. Box2D the original toolkit is a solid c++ physics engine that has many great examples and features including real collision.
How to use
- Download a zip file and extract it.
- Copy js/ and lib/ directories from the extracted directory to your app directory.
- Copy script tags in the header part of index.html in the extacted directory to your html file where you want to simulate physics.
Because this library does not have a lazy-loading system now, you should load all classes before starting your simulation. To make things worse, each library has a bit complicated dependency each other so that loading libraries in wrong order may cause a fatal error. To avoid such a trouble, it is strongly recommended to copy the header part of this file or `index.html’ including the downloaded zip file.
- Utilizing Box2D APIs, simulate the newton world as you like.
The Box2DJS APIs are completely same as those of Box2DFlashAS3. Please refer information about it.
Video of Box2DJS in Chrome
Video of Box2DJS in FF3
Basically these engines look to be micro and provide pretty nice features while being so small. Micro tweening engines like GTweeny (3k), ByteTween (1.7k), TweenLite (2.7k), TweensyZero (2.9k) and Tweener (9k) have varying levels of support of features (Tweener being the most loaded with color and filter support without other kits just init, also TweenLite with a nice configurator to include only what you need). Micro kits have benefits when used for banners, animated assets (where you have many assets and the per asset savings is worthwhile) and other places you just want really small output.
This kit has a c# version as well as a small as3 bytetween version.
The ByteTween static class eats only 1.7K of compiled clip! With this size it supports:
- Creation of tweens of any numeric property (not color/uint properties).
- Pause,Unpause,Cancel operations based on the tween target and property.
- Overlap system that cancel tweens of same property in order to avoid erroneous behavior
- Alpha tween with negative alpha support (negative alpha sets the MovieClip visibility to false)
- ’scale’ tween of both ’scaleX’ and ’scaleY’ properties.
- OnComplete callback with any number of parameters
- Easy interface for creating new tweens!
- SPEED – I’m not aware of any popular tweening engine with a similar feature set that’s as fast as TweenLite. See the speed comparisons yourself.
- Feature set – In addition to tweening ANY numeric property of ANY object, TweenLite can tween filters, hex colors, volume, tint, saturation, contrast, frames, and even do bezier tweening, plus LOTS more. TweenMax extends TweenLite and adds even more capabilities like pause/resume, rounding, event listeners, timeScale, and more. Overwrite management is an important consideration for a tweening engine as well which is another area where the GreenSock tweening platform shines. You have options for AUTO overwriting or you can manually define how each tween will handle overlapping tweens of the same object.
- Expandability – With its new plugin architecture, you can activate as many (or as few) features as your project requires. Or write your own plugin if you need a feature that’s unavailable. Minimize bloat, and maximize performance.
- Management features – TweenGroup makes it surprisingly simple to create complex sequences and groups of TweenLite/Max tweens that you can pause(), resume(), restart(), or reverse(). You can even tween a TweenGroup’s “progress” property to fastforward or rewind the entire group/sequence.
- Ease of use – Designers and Developers alike rave about how intuitive the GreenSock tweening platform is.
- Updates – Frequent updates and feature additions make the GreenSock tweening platform reliable and robust.
- AS2 and AS3 – Most other engines are only developed for AS2 or AS3 but not both.
Here are some simple steps to help you get started with creating your first animations with TweensyZero. TweensyZero is a light weight version of Tweensy most core features found in Tweensy are available to TweensyZero. Documentation for TweensyZero can be found under the folder ‘documentation/zero’ or online
gTweeny is gTween‘s lightweight younger sibling. It strips a lot of the secondary features of GTween (proxy, timing modes, etc) in favour of smaller file size. It is currently under 3kb…
Here is a list of all open AS3 “Micro” Tweening engines < 5k
Here is a list of all open AS3 Tweening engines and base kits
- Animation Package
- AS3 Animation System 2.1
- Go (base animation kit – create your own tween engine)
- Tweener (9k)
- TweenLite (TweenMax)
The decision on which to use can be affected be features you want, how it feels (many use the same object syntax so it is dynamic), what performance do they have (all are orders of magnitude faster than the built in tween (flash) or transitions (mx/flex)), which size is ok, author/community support needed (some are more active than others adding features or simplifying and tweaking performance methodically), and many other factors. There are definitely plenty to choose from.
Speed Tests for many Tween Engines
- Green Sock Tweening Comparison Tool
- Moses Benchmarking Tool (relative comparison against SimpleAS3Tween sample)
For more on each features see their sites or these previous lists on tweening engines:
Don’t know how I missed this but just this last month a new site has launched called wonderfl that allows quick as3 compilation side by side that is encouraged by community and similar to a demo scene.
This could be great for generating new ideas much like machima and demo scenes have done in the past. This stype of stuff goes down with the flash community anyways but being able to do it on a site and fork and evolve scripts and game it is a great idea.
Effects with filters, bitmaps, pixel manipulation, pixel bender and papervision would benefit greatly from the type of innovation that could happen here quickly in small doses. See what you can throw down, maybe some fireworks.