All posts by admin

Games developer and motion graphics specialist.

Webcam Flames

I played around some more with my webcam today and knocked this out. I also found my webcam already has the IR filter missing (cheap webcam), so it can already see infrared… which will come in handy:


 

Wii Paint

After getting my Wii remote hooked up with the WiiFlash Server, I knocked up this quick Flash demo which draws the blobs of infrared light the Wii remote detects (it can track up to 4 blobs at once), just like the Wii console’s sensitivity setting dialog does. I just gave each blob a different colour and clear the graphics on pressing the ‘A’ button.

Here’s the code to get it working – requires WiiFlash Server:

Dinky Bomb – multiplayer game

Back in 2002 some colleagues and I built one of the web’s first and most popular online multi-user Flash games, Dinky Bomb.

After the dotcom we were working for folded (NOW.com / Gamer TV), it was sold to EA and subsequently acquired by Atari, who have unfortunately done little with it. Gone for now, but not forgotten; there are a few YouTube videos out there, including this one, which features Dinky Bomb as part of a TV game show from way back then… good times! Continue reading Dinky Bomb – multiplayer game

FreeYourBuddy Web game

FreeYourBuddy.comFreeYourBuddy is a video-based ‘advergame’ I produced for GT/VML for a Windows Mobile campaign. It’s a lot like Subservient Chicken, but you need to chat to Buddy and direct him to solve puzzles in order to escape the confines of the computer in which he’s trapped. Continue reading FreeYourBuddy Web game

Mercedes Bend – Physics based banner animation

What I love even more than doing animation, is doing challenging code-driven animation.

This banner actually won some awards apparently, including NMA Campaign of the Month and was shortlisted for Cannes Lions.The line dynamics itself is just Hooke’s law stuff – basic physics. Took some experimentation to get a smooth curve drawn through a series of points (basicaly, the control points of your previous and next points need to be in line).

If you can’t see the demo above because you’re on mobile, or don’t have Flash enabled on your browser, you can see the banner in action below:

 

The cars follow one of the line’s points with differing elasticity and damping, but the real pain in the backside was drawing the dashed line via code, in crummy ActionScript. Luckily, I’m a persistent bastard 🙂 Read more about it on Bannerblog.

Wobbly springy physics

I recently needed to create something where a chain of spring dynamics points is connected with one smooth, seamless curve. After much mathematical wrangling, here’s the result of my efforts – you can grab and drag the grey blobs…

ActionScript performance tips

Here are a few simple tricks that may help the performance of your code/graphics intensive Flash movies. This is not an exhaustive list, by any means, rather some of the more effective performance tweaks to try out on your projects. There are the usual sensible coding tricks, like using local variables for oft-used references within functions, or planning your code loops carefully and breaking out of loops whenever feasible – but you should be doing these already. I’ll be adding to this post as and when I feel necessary, but will generally avoid the more granular tricks, such as bytecode optimisation. Some of those methods are too complex to explain in simple terms here and generally have a low effort-to-benefit ratio anyway:

Use scrollRect in conjunction with cacheAsBitmap. The cacheAsBitmap parameter of a movieclip can improve performance dramatically, but will cause problems if the render area of the movieclip gets too large (e.g. larger than 2880 in width or height), regardless of whether it is cropped by the viewable area of the Flash Player. The solution is to use scrollRect to constrain the rendering area to desired limits, in this example, the stage width/height:

Create bitmap snapshots of complex movieclips. Where you may have a movieclip full of layered graphical effects that isn’t animated, you can save a lot of rendering time by creating a snapshot of the movie. Similar to the cacheAsBitmap parameter, but will improve performance further if your movieclip comprises many lines or alphas. The following function shows a quick and dirty way of duplicating a movieclip as a snapshot of the original:

Use the opaque window mode trick – sparingly! Setting the wmode=opaque HTML parameter of your Flash object can improve rendering performance, but at a potential cost. Not only does it make the rendering order of movieclips and frames more ‘lazy’, but will effect keyboard interaction adversely in some browsers (especially FireFox). Use with caution.

I’ll be updating and tracking back to this post occasionally, so stay tuned…