Archive for the 'Wii' Category

Folkert wins a Wii with SWX-based Twimpa

If you've been playing with SWX, you will no doubt have heard of Folkert Hielema. Folkert has been very active in playing with SWX since the earliest alphas and he has contributed (and continues to contribute) so much to the project. And now, he's won a Nintendo Wii from Numpa.nl for his Twimpa application.

Twimpa uses SWX PHP along with the SWX Twitter, Jaiku, and Numpa APIs along with Adobe AIR. (Folkert is also the author of the Jaiku and Numpa SWX APIs). Numpa is a Netherlands (Dutch) version of Twitter.

Congratulations, Folkert! Very well deserved!

You can see more of Folkert's work, and those of other SWX developers, in the SWX Showcase.

Rediscovering Fun at FITC 2007

Fitc 2007

News Flash: I just changed the session I'm presenting at Flash in the Can (FITC 2007) this month to Rediscovering Fun! (Big ups to Shawn and Naomi for scrambling to implement my last minute change!)

What? Why? How? Huh? You're going to love the new session -- here's the low-down:

Hack it! Mash it up! Mix your SWX with your JSON with your XML with your Flash Remoting. Suck up that API. Put it on your phone, slap it on your Wii, throw it on your PS3. Break it. Fix it. Play! Have fun!

Aral Balkan loosens his collar and goes barefoot to share his recent experiences in rediscovering the fun side of Flash.

Expect a first hand introduction to SWX, Aral's new data exchange format for Flash that works with SWF files and lets you loadMovie()your data, APIs, mashups, some spaghetti code, mobiles and consoles.

Join Aral for an honest, relaxed and inspirational presentation on letting go and having fun with geekery.

I initially presented this session last week, after launching SWX, and it was really well received (and I had a blast!) I'm going to be updating it with new examples and hopefully more devices for Canada.

Flash in the Can is only 16 days away! *Gasp* Where does the time go? I can't wait!

Find out more on the FITC web site.

FlashForward KeyNote at MacWorld

I took notes during the FlashForward keynote at MacWorld today but couldn't post them since I didn't have WiFi in the room. It was a nice keynote and we got some cool sneak peeks at Flash CS3 and Apollo and a fun presentation on Flash on the Wii by Justin. Here are my notes:

I'm sitting in at the FlashForward keynote at MacWorld. Lynda just gave the opening speech and introduced Mike Downey.

Mike: We will be shipping the full production studio for the Mac, including Premiere, Encore and Sound Booth. (This was announced last week.) On Friday, we announced that we have finished and shipped Flex Builder for the Mac. About a month ago we released Photoshop CS3 in beta on Adobe Labs.

Flash Player Adoption update. Flash Player 9 is projected to reach over 70% penetration in its first six months. In comparison, Flash Player 8 took 9 months to reach over 80% and Flash Player 7 took twelve months to break 70% penetration. Basically, the adoption rate of the Flash Player is accelerating with each player release and continues to do so with Flash Player 9.

What's new in the Flash Player 9? Mike focusses on the new virtual machine with ActionScript 3 support and its performance improvements. AS3 is an ECMAScript implementation that uses the W3C DOM Level 3 event model, E4X (ECMAScript for XML), Regular Expressions and runtime error checking.

Mike is showing some example sites that showcase Flash Player 9. He starts with Kuler, Adobe's own online color utility.

In Flash Player 9.1, Adobe added a fullscreen feature. Mike shows the full screen demos linked to from the Labs Wiki. He demos the full-screen panorama made with Papervision 3D, which of course, you can find on OSFlash.

Flash Video has an unbelievable momentum which has mostly picked up following the release of Flash Player 8. Taking Flash Player 7 as the starting point, use of Flash video has grown 800x in the past three years, with the steepest rise taking place in 2006.

Mobile is another area that Flash has a presence in, especially in Japan. In September 2006, FlashLite was deployed on over 150 million handsets. In the US, in partnership with Qualcomm and Verizon, Adobe can distribute the FlashLite player to handsets over the air.

Flash can Wii

Now Justin Everett-Church takes the stage and he's going to talk about the Nintendo Wii. He is showing the Opera browser for the Wii, which, of course, comes with Flash Player 7. He is showing a mashup he did with Yahoo maps. He mentions the resolution of the browser (800x500) can make it difficult to read things and that he is actually doubling the size of his UI to make it more legible on the screen. Good tip.

Now he's showing YouTube and playing back some YouTube video.

Next, he is showing a 3D pool game from TeaGames to show the performance of the player. Looks good.

Now he's showing a game he created a while back called Insane in the Membrance. He loaded a SWF directly. It's not an 800x500 SWF but since it is vector, it scales. The game runs really well. This mirrors my own experience with the Flash Player on the Wii, which is that the player performance is very good.

Mike's returned to the stage now. He's mentioning that the Flash Player is also available on other game consoles. Mike Chambers is now taking the stage to show Flex and Apollo. To recap, Apollo is a cross-operating system runtime that allows developers to leverage their existing web development skills (Flash, Flex, HTML, Ajax) to build and deploy desktop RIAs.

He's demoing Ascension, an Apollo-based MP3 player that integrates with the desktop. For example, he's importing the iTunes Music Library from his Mac and using that as a data source for Ascension. He hasn't showed it yet but the coolest thing with Apollo is how easy it is to make cross-platform applications. For example, using Flex Builder, it is as simple as choosing your platforms and compiling. That's it. There is no platform-specific code whatsoever (those of you who have used Zinc, for example, will understand how much easier this will make their lives.)

Ascension also displays HTML pages to show the lyrics for songs. Apollo can do this. In fact, you can create Apollo applications using HTML as a top-level element. Basically, as has been mentioned to death elsewhere, Apollo allows you to use HTML, Flash and PDF in a transparently cross-platform development workflow. Flash and include HTML and Flash, HTML can include Flash and PDF. In short, it's mucho cool!

Now he's showing Flex Builder 2.0.1 on the Mac. The version he's showing has built-in support for Apollo which is not available in the released version. A version with Apollo support will apparently be released in a couple of months.

He shows how easy it is to compile a Flex application into an Apollo application. His sample application has an HTML control that is fully interactive and yet you can apply any Flash-based transformation, effects, etc. to the HTML control.

Now he is showing a mapping application called Maptacular that uses Google Maps, built by Christian Cantrell. It has an HTML control that loads in google maps. He overlays Flex on top the HTML control -- a tree control that is populated by the VCards on his system. He then drags a VCard to the map and it displays its location. Apollo is going to make a whole new type of mashup possible. A dashup, if you will, that combines data from your desktop with web services and the sorts of rich interfaces and interactions made possible with Flash.

Finally, he is showing a tool that is being built by eBay that makes it very easy to create eBay listings. For example, it uses your webcam to create images for your listing, etc.

You can find more information about Apollo at www.adobe.com/go/apollo.

Adobe plans to have a public beta available on Labs in a couple of months so it's getting close. They plan to have a 1.0 release mid to second-half of this year.

Flash CS3 Sneak Peek

Mike Downey is back on stage. OH NO IT'S THE UGLY NEW ICON! (His slide has the new icon for the next release of Flash.)

New UI

He is showing the new UI for Flash CS3. It's beautiful (apart from the icon and the splash screen.) And consistent. The toolbar icons match Photoshop and Illustrator, for example. He relates how they went out to talk to Adobe customers about how to integrate Flash with the existing Adobe tools. One thing many people have not liked about Flash was the Pen Tool. "Drawing with Flash's pen tool is like drawing with your feet" -- a customer quote! So they changed it. Flash CS3 has the same Pen Tool as Illustrator.

Now he is talking about the unique way that Flash treats shapes. This hasn't changed (since it's actually great for animators.) However, they have introduced primitive support to Flash CS3. There are now new tools such as the Rectangle and Oval primitives. (So you can, for example, add rounded corners to a rectangle very easily.)

About the workspace: They've focussed on making the content be the focus of the UI. For example, it's very easy to collapse the timeline and the PI. The toolbar is now a single column (and that saves some screen real-estate itself). You can expand and collapse the Palettes (when collapsed, it comes a single column toolbar where clicking on the buttons displays the Palette for that panel.)

There is also a new workspace drop-down that gives you quick access to your various panel layouts.

Automatic animation to code conversion

Now he is showing the new automatic animation to code feature developed by Robert Penner. Basically, this feature allows you to create a timeline-based animation (with guide layers, etc.), right-click the timline and select Copy Motion as ActionScript 3 and have Flash convert it to time-based ActionScript code that plays back exactly the same way as your timeline animation. The actual animation is written out as XML (using the native E4X support in Flash Player 9). So you can easily modify the settings of an animation without touching the animation engine itself. The only thing it doesn't work with is shape tweens. If nothing else, this feature alone will make it worth the upgrade.

New Photoshop (and Illustrator) importers

Finally, he is showing the new Photoshop importer (they also have the same feature for Illustrator). The new importer tool gives you access to all of the layers in the Photoshop document, including layer folders and layer comps. It recognizes layers with blend modes, text layers, etc. and allows you do to different things depending on the type of the layer. You also have options to Convert layers to Flash Layers, you can selectively choose which layers (or folders) you want to import and you can choose what type of content you want to convert a layer into.

For example, with a Bitmap layer in Photoshop, you can either import it as a flattened bitmap or as a bitmap image with editable layer styles. You can give it an instance name and set its registration point and set compression settings. You can also choose to set the stage size in Flash to match the canvas size in Photoshop and have the importer place the imported layers at their original coordinates.

The compression engine in Flash is now the same quality as the one in Photoshop.

Grant Skinner on the new V3 components in Flash CS3

He mentions that Flash finally understands how to maximize itself correctly.

V3 Components are built for Flash. They are 25%-40% smaller. 10kb smaller base than the Version 2 components (~15kb). Performance: Lower CPU, higher capacity. Customizability: Skinning (visual and programmatic) is made easier, extending the components is much simpler.

He is now doing a simple performance demo with a List component on stage. He is populating it with a million records. He just selected 200,000 records without delay and is scrolling through without any lag. They've also solved the problem that the earlier components had where external content (eg. images) would flicker when scrolled. Now they don't.

Now he's talking about how it is much easier in the Version 3 components to customize the components using skinning. I'm so happy that we finally have a Flash component set that gets skinning right. To skin a component, you just double click the component and you get a skinning dialog box. Select a skin and you can edit it on stage. The skins use Scale-9 so that corners are maintained and skins scale intelligently.

The style manager now also has massively improved performance and you can do runtime style changes on any number of components without lag. You can also use instances in styles so you can use external media, for example, as icons, etc.

He is now showing how they used skinning to create the color sliders in Kuler.

You also get the performance improvements in ActionScript 3. AS3 gives you development productivity using E4X, RegEx, display list, event model, debugging. He is showing a demonstration of E4X with an example of the Yahoo Maps code where a method with over 20 lines of code in ActionScript 2 is reduced to one line of code with E4X. Performance in AS3 is 10x-100x faster. As a demonstration of the performance, Grant is showing a demo by John Grden, with AS2 and AS3 versions. In AS2, it lags with a single model of a ship. In AS3, there are 10 ships flying by. Finally, there are API additions in AS3 such as BinarySocket, ByteArray, computeSpectrum, etc. He is now showing a computeSpectrum demo with some music and a flaming Blaze demo.

Lynda is now taking the stage again and ending off the keynote.

The understated genius of Mario!

Mario has solved the Wiimote problem on the Flash Player in an ingenious way. He sets the scale of one SWF to the keycode captured in JavaScript and uses the resize event of the Stage to capture this value and pass it to the actual movie using LocalConnection. Rock on, as John would say! :)

Read Mario's post on the subject.

Note: Some of the issues that I mentioned earlier are still present so the ideal solution, of course, would be for Nintendo to implement these key events natively in the Flash Player.

Using the Wiimote buttons in Flash

WiiNintendo.net has posted a list of key codes that the various buttons on the Wiimote generate, stating that they work in Flash and JavaScript. Well, that's half accurate: They do work in JavaScript but not in Flash. Adding a Key listener in Flash doesn't register anything when the buttons on the Wiimote are pressed.

My first thought was to use the Flash/JavaScript Integration Kit (since the player in the Wii is version 7, we can't use ExternalInterface) to relay the key events that the buttons generate from JavaScript to Flash. Easier said than done.

After some fiddling, I got the key codes to transfer to Flash but there are three show stoppers with this method:

First and foremost, it doesn't work when the Flash movie has focus. I tried every method I know of capturing events in JavaScript and none of them results in the JavaScript event handler being called when the Flash movie has focus and a key is pressed.)

Secondly, you cannot have a full screen Flash movie and use this method due to the way Flashjs works (it creates embeds a new SWF every time you call a method in Flash and passes the uid, method to call and its arguments as FlashVars to it. This SWF then uses the uid and LocalConnection to talk to your actual SWF.) So if your actual SWF takes up the whole screen, this additional SWF will result in a vertical scroll arrow displaying on the Wii.

Finally, even if the first two show stoppers could somehow be resolved, when the Flash/JS communication does work (i.e., when the page has focus), there is lag that would probably be unacceptable for games and even for interface items.

Also, the list of key codes given in the WiiNintendo.net article has two typos. The A button has a key code of 13, not 170 and the 2 button has a key code of 173, not 17. So the actual list of key codes for the Wiimote is:

↑ 175
↓ 176
→ 177
← 178
A 13
B 171
- 170
+ 174
1 172
2 173

The next thing I'm going to try is plain old SetVariable. But first a bout of tennis on the Wii with Dave! :) If anyone has other ideas, I'm all ears. Please leave a note in the comments.

Update: So the tennis game can wait: SetVariable doesn't work on the Wii. Damn.

OK, so maybe I can use FSCommand to poll the JavaScript instead... *Doh!* Of course, I can't because functions called from FSCommand can't return values.

OK, so that's it from me. Ideas?

How about: Nintendo, please implement Key events for the Wiimote controller buttons like there are in JavaScript. Pretty please?

Flash performance on the Wii

Here's a startling observation: the Flash Player on the Wii appears to run better than the one on my MacBook Pro (2.16 Core Duo). At least for this simple test SWF.

With the movie's frame rate set to 60 fps, I'm getting frame rates in the range of 41-52 FPS on my notebook (FireFox). Under Safari, the average rates are higher (49-52 FPS). On Windows, under Parallels, I'm getting 39-42 FPS for FireFox, 38-41 on Opera and a pretty steady 50 FPS on IE (49-51 FPS).

On the Wii? The darn thing is staring at me at 61 FPS at the moment! :)

Now, here's the craziest thing: In the sample SWf, if I move the cursor to the top-left corner of the screen, the frame rate drops to about 34 FPS.

What can cause such a drop in frame rate?

Not having tested with another SWF, I don't know whether this behavior is a quirk of the player or the specific test SWF. If it's the latter, could it mean that Math.sin() and Math.atan2() -- which are used in the enterFrame loop that updates the position and orientation of the arrow pointer -- are somehow more computationally intensive with smaller numbers? Needless to say, I can't observe this same behavior on my Mac.

Granted, this is a very simple example but it looks like the Flash player's performance on the Wii isn't that bad at all.

Have you done any performance tests for the Flash Player on the Wii? Feel free to share your observations in the comments.

See also: Flashing the Nintendo Wii.

Flashing the Nintendo Wii

Wiiflash

One of the most exciting pieces of news in the last few days was the release of the Opera-based browser for the Nintendo Wii. Why? Because it has Flash support. Flash 7, to be precise.

This means that Flash developers are now automatically also Wii developers if they want to be. You have to love a platform that adds to your skill set without your having to do anything! :)

So, today, I started playing around with my Wii. Sorry, I'll stop now. It won't happen again.

Initially I wanted to know what resolution the Wii browser supported. There are a number of online references, like the Web design guide for Opera Browser on Wii, that state that the browser supports a resolution of 640 x 480 and that you should design for a safe area of 608 x 456. My own findings with Flash contradict this, however.

System.capabilities tells me that the system resolution on the Wii -- at least what is reported to Flash -- is 800 x 600. On a test SWF, set to 100% width and height, you get Stage dimensions of 784 x 484 with the default Macromedia HTML and 800 x 500 by hitting the SWF directly. Setting all of the margins to zero on the HTML page removes the 16x16 border and gives you the same 800 x 500 resolution.

I start to wonder whether the supported resolution is affected by the display settings in the Wii Options and decide to test it out.

Initially, I test with the TV Type set to 60Hz (480i) and the widescreen settings set to Standard (4:3). This results in the browser's controls appearing slightly cut off on my screen (46" Sony Bravia W series/1080p). Next, I try it at 50Hz (576i), again with Standard (4:3), and that gives me the same results.

Next, I change the widescreen settings to Widescreen and hit the same test page. This time, the system resolution is again reported at 800x600 but the Stage width and height defaults to 1024 x 500 (100% width, 100% height, stage set to noScale and align TL). The grid I'm drawing, however, looks all wrong. The aspect ratio is way off and there's definite antialiasing.

Update: I just tested with pixel values (the movie set to 800px by 500px) and I can confirm that this is the largest movie size that the browser will display without showing the scroll arrows. I also included a mock Wii safety image from IconFactory.com in the test file that is 800 x 500 px.

I'd love to hear what results you get with your TV set. If you have a Wii and the browser, hit the Flash resolution test file for the Nintendo Wii (http://aralbalkan.com/wiipii/arrow_wii.html) and report your results in the comments.

When leaving a comment, it would help greatly if you can mention the following information:

  • TV Brand
  • Standard or Hi-def
  • Max res. (eg. 720p, 1080i, 1080p, etc.)
  • Wii settings (4:3 or 16:9 and whether you're running at 576i, 480i or 480p)

So, does anyone else have information they'd like to share on developing for the Wii?






Bad Behavior has blocked 0 access attempts in the last 7 days.