I worked with Imotion Media to create this little animated music video…
You can now enroll for the beta testing programme for my forthcoming mobile game, HerdyLand. Initially just for Android, I’ll be focusing on responding to feedback to improve the game before I crank out the iOS version. As you’ll see, it’s not complete, but playable enough to provide feedback I hope. If you’d like to give it a try and leave feedback, I’d appreciate it:
Here’s a sneaky peeky at some early gameplay of my forthcoming mobile game, HerdyLand (previously known as Herd’em):
I used filmed action of Beckham himself and the video alpha channel support of Flash 8, which was rather new at the time. I was consulted on all aspects of filming and production. After we agreed game concepts, I met with the film crew at ‘Off The Radar’; I drew up the shot-list and we decided to shoot on HD at 50p, to get the cleanest possible key.
- Green screen at Flash Studio Norte, Madrid
- Panasonic VariCam (1080p @ 50fps)
- Adobe After Effects
- Adobe Photoshop
- Adobe Flash
- A football
I went to Madrid for the green screen shoot with Beckham as visual effects supervisor and was responsible for treating and editing the footage for game production and related media.
I stitched some of the sequences together with morphs to create almost seamless blends between shots and added real-time lighting filters to the footage to help with the in-game compositing.
I coded a 3-D projection system in Flash and perspective-matched each scene, so that objects move around the screen convincingly. I worked with the designers at DDB, who created the backgrounds and UI elements. I included ‘Express Install’ capability for those users without Flash Player 8, so 95% users could upgrade painlessly from Flash Player 6 or 7. All the games are mouse-controlled and were user tested with children for usability and game balancing.
A high-score table was included and the users with the highest scores were entered into a prize draw to win a training day at the academy with David Beckham. While modern video games only ever motion-capture players and recreate them as 3-D models, the DBA games site still remains a one-of-a-kind.
Having just finished working on the UI for the YouView IPTV Set Top Box, I thought I’d share some of my insights into the best practices when building applications for such resource constrained devices. The YouView UI is AIR based, written in AS3 and runs in Stagecraft 2 (AKA AIR for TV). As the name suggests, AIR for TV is a special version of the AIR runtime for embedded systems, such as Set Top Boxes. The first incarnation of the YouView UI (back when it was code-named ‘Project Canvas’) was for Stagecraft version 1, which means coding in AS2 and suffering the abysmal performance that comes with running ActionScript Virtual Machine 1.
Despite the delays and the need to code the UI from scratch in AS3, I think it was ultimately the right decision. Stagecraft 2 is a much better platform – Stagecraft 2.5.1 to be precise. It was a great opportunity to learn how to write optimal code and use hardware acceleration effectively on a resource constrained device. Regardless of which technology you’re using, here are some key things to be aware of when developing for such platforms:
- Limit your pre-composite calculations
In AIR/Stagecraft we’re talking about limiting display list hierarchy complexity; in HTML5 we’re talking about reducing the DOM complexity. Stagecraft (or whatever display engine you’re using) needs to traverse through the display list (or DOM), working out which areas of the screen to redraw. This is somewhat similar to how the desktop Flash Player handles redraws, but with some key differences to how it decides what needs redrawing, how it tackles moving display objects and how it delegates the work of updating the frame buffer – a subject for another time. Mostly importantly, if you’re developing for a resource constrained device (such as mobile or Set Top Box), you’ll have very limited CPU power, even if the device’s GPU (Graphics Processing Unit) affords you great hardware acceleration capabilities. So, before you can delegate any graphics compositing work to hardware, you must enumerate changes in the display list in software, right? Complex display lists are a headache for some of the low-powered CPUs found in mobiles and Set Top Boxes and this will show up as rocketing CPU usage, low framerates and few spare work cycles – AKA ‘DoPlays’ in Stagecraft. By keeping your display list shallow, with only the bare minimum of display objects on stage at any one time, you’ll be making life easier for the CPU – whether or not graphics are thereafter drawn in software or hardware.
- Benchmark everything
When building an application for a resource constrained device, you should be able to run each component in isolation, to assess its drain on CPU and system/video memory. There’s no point optimising the hell out of one component, when it’s actually another one that is the source of your performance bottleneck.
- Know thine hardware acceleration capabilities
There’s no point blindly using cacheAsBitmap and cacheAsBitmapMatrix everywhere, if it’s not going to speed things up on the target device. Worse still, too many cacheAsBitmaps and you may be just wasting valuable video memory, or causing unnecessary redraws (again, the subject of a future article). A lot of platforms will accelerate bitmaps, even if stretched, but not necessarily if flipped or rotated. Alpha on bitmaps (or anything cached as bitmap) will usually be accelerated too, but this is not necessarily the case with all colour transforms. Benchmarking any component you’re building will quickly tell you where you might have pushed it too far, but you should also have a way of verifying that a particular set of transforms is indeed hardware accelerated. Stagecraft provides this when using its –showblit command line parameter. I’ll be going into more detail about this in another post.
- Mind your memory
When using various hardware acceleration tricks, especially on resource constrained devices, video memory is at a premium and usually in limited supply. You will need to know the limits and have a way of seeing how much video memory your application is using at any one time – ensuring you dispose and dereference any bitmaps you’re finished with too. If your platform uses DirectFB for its rendering, as YouView does, the executable ‘dfdump’ can show you just where your video memory is going. This is something else I’ll get into in another article.
- Blit blit blit
This refers to blitting, where blocks of pixels are copied from one bitmap to another. This technique is used a lot in games, where graphics performance is critical, you should arm yourself with the basics of how old video games used blitting of multiple things to a single bitmap for performance and video memory efficiency.
I’ll probably go into more depth on each of these things in forthcoming posts. Stay tuned…
See also: Bitmap ‘folding’ trick
I thought I’d give a quick insight into how the animation effects in one of my projects were acheived.
Scott Bedford, former Creative Director at Carlson Marketing, posted this video of a project we worked on a while back, for the Lurpak Breakfast campaign. I created all the animation prototypes for the various effects used throughout the site, some of which can be seen here. The site won two DMA awards, but I’m most proud of the crumbs animation and the code-generated interactive steam effect – similar to the one you’ll see on my homepage.
I just finished a new project, called ‘A History of the World in 100 Objects‘, it’s a joint venture between BBC Radio 4 and the British Museum to chart human history in a new way. I developed the concept for the 3-D object explorer with the guys at GT/VML and built it using Flash 10’s native 3-D capabilities. Users are able to explorer objects from throughout human history in a potentially inifitely expanding 3-D time tunnel and even make history by uploading their own objects.
Here’s some footage of the 3-D explorer:
The main challenge facing the development of the 3-D explorer was to build something capable of handling up to 10,000 objects, loading in their images and displaying it all in glorious 3-D… all without crashing the user’s browser. Every object or filter set accessible within the explorer can be bookmarked, shared, or navigated with the browser back/forward buttons. For added accessibility, the explorer’s 3-D view itself can be navigated with the keyboard, mouse wheel or the on-screen controls.
I built the application strictly to optimise performance and memory management, while ensuring maximum stability. Coding techniques such as object pooling, typed arrays, load queueing, render deferral and the flyweight design pattern were used to maximise performance and minimise memory usage.
FreeYourBuddy 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.
You can tell him to do silly stuff too – or just swear at him like I do – whatever floats your boat. Somewhere online there’s a walk-through; but it’s more enjoyable to try and solve the puzzles.
There are a few Easter eggs in there and I also localised the game, so Buddy understands 4 different languages and can hopefully piece together even the worst grammar. He is, however, not the sharpest tool in the box.