Today I want to talk about Minko’s API. Whats it looks like and how it feels to work with it. This is the first time ever I show some actual code using Minko. There is a great buzz around Molehill and the next release of the Flash Player in general. Please note that evet if – for obvious reasons – this post does not use the Molehill-powered version of Minko, the APIs look “pretty much” the same.
The goal of the post is for people to see what it looks like. Feedbacks are very much welcome and would be greatly appreciated!
Before we start, here is the (very) simple application we will build:
Drawing (a lot of) triangles is nice. But making them move is another problem… even harder: making them move like objects would move in real life! This is what a “physics engine” is about:
“A physics engine is computer software that provides an approximate simulation of certain simple physical systems, such as rigid body dynamics (including collision detection), soft body dynamics, and fluid dynamics, of use in the domains of computer graphics, video games and film. Their main uses are in video games (typically as middleware), in which case the simulations are in real-time. The term is sometimes used more generally to describe any software system for simulating physical phenomena, such as high-performance scientific simulation.”
Flash is no exception and has a few physics engine libraries available. Nothing like a “high-performance scientific simulation” though…
Still, jiglibflash is one of those libraries. It is free and open-source. It provides a 3D-capable physics engine and exposes a rather simple API to make it work with any 3D graphics engine. Which brings me to the good news: Minko now supports jiglibflash!
I’m really excited to announce Minko (which is, by the way, the final name for my 3D library) has reached a new level: pixel shader integration! Pixel shaders are little programs that run on each pixel and can modify their final color. They are often written in C-like languages and in this precise case we use Pixel Bender, the shader language introduced with Flash 10.
In this post I will:
Explain how any 3D scene is built when using Minko
Explain how pixel shaders are integrated in the 3D scene
Explain how pixel shaders are built using Pixel Bender
Show you a very simple demo of the kind of effects pixel shaders will provide
“We look forward to delivering Flash Player 10.1 for Android smartphones as a public preview at Google I/O in May, and then a general release in June. From that point on, an ever increasing number and variety of powerful, Flash-enabled devices will be arriving which we hope will provide a great landscape of choice.”