Showing posts with label Actionscript. Show all posts
Showing posts with label Actionscript. Show all posts

Tuesday, May 26, 2009

Physics on Pixels


There are so many great Actionscript libraries now that it's hard to find time to experiment with them. This is my first foray into the popular Box2D Physics library. Working through the tutorial-like manual made picking this up a breeze although the API is not as clearly documented as PV3D so a little poking around is required to see what the available options are.


This is a quick experiment so I haven't wired it up with as many options as I'd like yet. At the moment, this is the maximum resolution I can get: there is a limit imposed on how many bodies can be simulated although I'm sure there is a workaround for that. There is no fullscreen button but clicking anywhere in the .swf will expand it for you.

Thursday, May 21, 2009

Cube Grid



I extended the Autofuss Pixel Grid from a couple of posts ago to take advantage of the 3D effect that the corner triangle in the logo hints at. This runs a little slower than the original version as each 'pixel' sprite has more decisions to make on each update.


Thanks to the MVC structure I used for the original I was able to get this working just by extending the pixels view class. This made experimenting a little easier. For example, I created a version using some of Joa Ebert's optimisations including using a linked list for the pixel sprites. However, I didn't notice any significant gains in the speed of the application - perhaps due to running my tests in the debugging version of the player.

Logo Slicer



One of my favourite things I've seen at Autofuss while I've been working there is a logo animation Chris Kelly put together in After Effects. Triangles, like the one in the corner of the logo, slide around behind and in front of various mask layers, eventually coming together to reveal the logo.

I could see how this could be made interactive by allowing the user to slice up the logo themselves. In this simple demo, the logo shatters into triangles when the mouse moves through it. The speed of the movement determines the size, number and velocity of the triangles.

Friday, May 15, 2009

Augmented Reality with Multiple Markers

I've put up a few examples of my work at Autofuss, using the FLAR toolkit to display different models based on the identity of the pattern in view. This was a pretty big project so I won't go into the details here, click this link to go to the project site.

I haven't seen anyone else use the toolkit in this way before so if anyone is interested in seeing how I did this, post a comment and I'll find somewhere to put up the code.

Thursday, May 7, 2009

Pixel Grid



I have been doing some work for a newly formed video production company, Autofuss. These guys are very professional and have been involved in some pretty stunning campaigns which have aired nationally. This pixel grid has come out of my efforts to also get people thinking of Autofuss for interactive media production.

The basic technique expands on David Wicks' dice mirror. It takes advantage of Adobe's Pixel Bender technology to rapidly produced a binary filtered image from the webcam. The resulting 1s and 0s determine which version of the logo is displayed at each location.

I used Flash's native components to build the menu panel which certainly simplifies the task of addding in interactivity. This was nice and easy to add in as this application is built on an AS3 version of the MVC framework I used for the Warhawk widget. I think my favourite settings so far involve a green background, low resolution and a good amount of padding.

I have added a greyscale version of the grid here.

Sunday, April 12, 2009

Warhawk Leaderboard: Version 2



This is the updated version of the Warhawk stats widget I posted a while ago. It's been through a lot of changes with 2 new modes: Head-2-Head and MyStats which let the user chose which players' data to display. There's also more control over how the data is sorted and which fields are displayed. The data itself can be displayed as text values or as a bar chart.

Although I did all of the coding and design myself, I discussed the design and functionality of the widget with people at Eike Consulting before starting this new version of the widget. One thing that was very important was to ensure that this would run on the Playstation 3. This meant I had to work within the constraints of Flash Player 7. We also anticipated this being downloaded thousands of times each day so I wanted to keep the file size as small as possible. By removing the Accordion component, I ended up with a smaller file than the original version.

The whole widget is built on an extension of the MVC framework I used for the Mystery Clock. This should allow me to easily add new or change existing functionality without breaking the widget.

Wednesday, April 1, 2009

Trace statement finder/remover

Having my actionscript code split across different files for each class is great but it does make it harder to find where rogue trace() statements are coming from.

I made this handy Perl tool to scan through all the .as files in a directory looking for these trace statements. It has three modes:

Find - print a report giving the file and line number of all trace statements
Comment - comment out all of the trace statements in the directory
Remove - remove trace statement lines from the file

It will ignore any previously commented out trace statements. You can download the code from here.

Saturday, February 14, 2009

Mystery Clock



The look of this clock is inspired by the Santa Cruz Mystery Spot. The clock uses the Actionscrip2 Model-View-Controller pattern as implemented in Colin Moock's 'Essential Actionscript 2'.


I have added a few of my own ideas to this beyond simply changing the look of the clock. The biggest change is that I have removed the need for the mx.Controls.Button component, reducing the file size from 108Kb to 13Kb. This type of saving would be very useful in a widget application which is deployed across social networks and download many times each day. To make this work, I extended the MovieClip class, allowing listeners to subscribe to the onRelease event. These movieclips act more like ActionScript 3 DisplayObjects in that they now implement the EventDispatcher interface.

Monday, February 2, 2009

Interactive Cat



Taking this as inspiration I am currently developing this interactive cat widget. The current artwork and functionality is obviously very similar to the original (although I have redrawn it myself). However, the point of this widget was to gain a better understanding of Actionscript 3 interaction with the Clearspring platform.

Eventually I intend to make the colours and behaviours of the cat customisable. Hopefully I will have some updates on this soon.

Sunday, November 16, 2008

Warhawk Leaderboard










This is the first example of the viral widgets I made for Eike Consulting. The widgets are currently hosted on the development site so a password is required to download the XML feed which will populate the fields. Hopefully you can imagine the player names and ranks being displayed in the grey accordion headers with the stats for each player displayed in the body of their accordion tab, I am currently working on two further widgets which are configurable to show only the stats for selected users.The widget is distributed using the Clearspring platform and it has been interesting working with this new API. Because the widget is still in development, I would appreciate it if you wait until it is released before making use of the sharing features.


Wednesday, November 12, 2008

Astroman Arcade Game

I made this retro arcade game to get a better understanding of OOP in Actionscript 2. It is played by two players simultaneously at one keyboard and the keys are fully configurable. I plan to add powerups, AI and eventually a remote multiplayer mode with XMLSocket.

Photo Sharing Site

As a means of gathering all of our wedding guests' photos in one place for easy display and distribution, I made this photos sharing site. Guests are given an upload password which they can use with the Flash based uploader which allows multiple files to be transfered with a single transaction. The upload is handled by a Perl script which resizes the images for display and stores them based on the username given during the upload. In order to produce the gallery, Perl scans the storage area for images and produces a web page with the lists of users and images stored in Javascript arrays. The gallery navigation is handled by Javascript. I have started integrating an SQLite server to the application to enhance the storage and retrieval of photos via the PerlDBI.

Wedding Pirates Platform Game

This was the first game I made and under a tight deadline. I made it as an interesting way of informing our wedding guests that the time of the ceremony had changed. It was an interesting learning experience and highlighted the importance of making the objectives clear: a lot of people didn't realise that once you get in the cannon you have to launch yourself out again. Everyone turned up on time though.