Thursday, October 23, 2008

Learning Flex From Scratch

I found this awesome video about learning flex from scratch, this guys have done a great job of how learning actually works.

Monday, October 20, 2008

Flash 10 may also suck

I tried the Flex 3.2 SDK, with the Flash Player 10 debugger version. It turns it everything worked quite well, according to adobe labs page. I forgot to set the target player to 10.0.0, hence i got a bug by the player not recognizing rotationY properties. but that worked fine after a few hours of messing around.

What really took me away is how easy it was to play around with the new 3D api. x,y,z, rotationX, rotationY, rotationZ. the new Matrix3D, Graphics 2.0 API e.t.c They worked quite well. One glitch was flex would not recognize the GraphicsTrianglePath Class. The compiler would complain and say that the class did not exist at all.

I then tried playing with the new sound API, but i was welcomed with a cold shoulder. The Event.SAMPLE_DATA property was undefined. (Seemed it was a coding bug. Somone might have forgot to name the property to "sampleData".). You could have a work around this however it seemed that the "sampleData" event was only fired once, and it would sample properly. That kinda really sucks. there is no way you could harness the power of the new dynamic sound API. :(

Flex had problems with code completion in graphics, Bitmap, e.t.c. It would not import the BitmapData class. :( Wierd stuff all around.

I tried experimenting with the Adobe Pixel Bender 1.0, It has good support of libraries, functions, for loops e.t.c , however it seems that from tinic's blog, that the flash player doesn't use any sort of GPU acceleration, and only suppports a really small subset of Pixel Bender Specification. :(, you cannot have while/for loops, no function calls e.t.c

I would have loved adobe to keep flash player in beta, and not make a release version , with all this bugs, it kinda spoils the image of Adobe.

Further Adobe released the CS4 Suite without letting the trial version out, so I could confirm if the Flash CS4, also has similar bugs.

Overall Pixel Bender has alot of potential, so does the new Graphics API, although I would really love to give us the full power of openGL in flash, by making something like a openGLSprite. flash still does not support z-depth-buffering. All the libraries out there have to make hacks by using z-sorting, BSP Trees, Quad Trees e.t.c

openGL works on windows, linux, macs. I see no reason why Adobe would have cross-platform problems with that. Come on Adobe give us openGL power.

As much as I agree the crap API of openGL, Flash engineers could revamp the way we do 3D, by adding some libraries such as native physics engines e.t.c

The Gaming Market makes as much money as Hollywood market, Adobe should seriously consider this, and not let M$ make the first move with silverlight with its DirectX.

Thursday, October 9, 2008

Om Media Player

Yesturday A bunch of my friends doing SENG(Software Engineering) were doing a project which involved creating a media Player. They were doing it in JAVA, and they seemed very pissed off. So I showed them the Awesomeness of Flex. Basically drew a small sketch in a paper, and quickly coded in mxml the layout in 20 mins. (they were like wtf!! that was so quick!!)

I then went home, and created worked on the interface, and about 3-4 hours, I had something that just worked. Visualizations, Media Library Search on the fly(winamp like!), Playlist, and basic media controllers.

I don't really know how to upload swf's to blogspot, so i Just put some screenshots. If you do know, please tell me. To load the media library its basically asking php to read all the media tags with the PHP-reader library, and create a dynamic .json Array of files. I use the corelib to Json.decode(jsonStr) into array, and make it the dataProvider of the Datagrid . Thanks to lee brimelow for helping out on how to create a audio Visualizer.

Ohhh and I forgot in the last post that Flash Player 10 now allows you to access the SoundTransform of the microphone, so anyone willing to build a voice recognition library for flash, go for it. Adobe has given the toys. You could use the Pixel Bender to do processor intensive stuff in the GPU. Yes!! using the GPU to process sound. A GPU is very concurrent, so you could do alot of creative stuff with it. (Can't wait for Flash Player 10 to be stable, and get some market penetration.)

Why is Flash 10 Super Awesome

I just downloaded the flash 10 documentation today. Downloading Source code from google code, or sourceforge is a great thing to do . It shows how big projects are organised, what are the best practices e.t.c

After looking at the Documentation I found some things very very useful.
1) All the 3D Buzz. Matrix3D, vector3D, perspectiveTransform, GraphicsTrianglePath e.t.c. Because all this are implemented down in c++, and are optimised. You get to do alot of drawing without worrying about the frame rate. Even though there is alot of code, the API is very very simple, well documented and clean. (One thing I've always admired about adobe)

2) Shaders. With the Shader Class, GraphicsShaderFill Class, you can acheive great eye candies. The Shader is actually code that is written with PixelBender Toolkit. It is then compiled into byteCode. With flash player 10 you can then load it into Shader.byteCode, and pass in input object. I haven't played with the shader, to say how much input the Shader can take. I'm not so sure whether you can do RayTracing. For those who don't know what RayTracing is, Its a technique used in graphics, that outputs images so real, that the human eye cannot differentiate whether they were taken by a camera, or drawn in a computer.

3) One of the features which just took me away is Templates. I just said to myself. "Oh wow!! best of JAVA + best of C++ + best of ECMAScript = ActionScript3). You have the powerful Vector class. e.g a vector of Strings looks like Vector. = new Vector("Hello","World"); This is much faster than Array Class. (An Array Class of flash is actually a HashTable).

What Next. I have a Graphics Assignment due next week. Most people are doing it with openGL (whose API really sucks!!). I like learning what goes on behind openGL, so I'm set out building my own 3D engine from scratch. As soon as Flash Goes out of Beta, Gona make a port to it. I have to be the first one though, before Away3D, sandy3D, or papervision3D make it. Lol!!!

Sunday, September 28, 2008

My First Post

After seeing all the great blogging going on in the flex world, I decided to have my own blog. I usually don't write alot of english as Actionscript is my native language and Gujurati my second, and then english. Not forgetting I was born in kenya so I am also fluent in Kiswahili. My parents are from India, so I can also speak and Hindi.

Quite fluent in php/python/C/C++/Java.

but no language is as awesome as AS3.

I have done a few experiments over some time. Implemented a small text rendering engine, a mini screen saver which act like fireflies embedded within letters, and some other random stuff.
I don't know where the source code of some of the files are, as I have changing a few computers. Whatever i found to be cool, is in the folder.

I am not as cool as andre-michelle or the other dudes in actionscripthero.org, but wana be like them before I die :)

here is the folder with the experiments. If you are seriously interested in the source code, send me an e-mail, and I'll see what i can do. Probably go to garage and go through alot of crap (and cockroaches!! they like As3 too!!!)



omg, I think i am also getting addicted to blogging.