Friday, 30 January 2009

New Flash Dimension

As you may know already Flash has incorporated 3D within its new package, Flash CS4. I thought I’ll test it out to see if its new 3D elements have the potential to help create the 3D game I’m looking to make. I therefore decided to play around with it and later during the week I completed a tutorial to make a box which can be found here http://pixil.info/page/2/.

Flash seems to work quite well on the Z plane, allowing for 3D translations and rotation.  The shapes I made were truly 3D and not make shift 3D as in previous versions of Flash, however it turns out Flash CS4 is unable to import 3D models from 3D software such as Maya or 3ds max. This made me have a little doubt about my expectations for Flash and it was time to scour Flash forums to find out why it doesn’t import 3D models and how I can get around this. 

I had already seen a few 3D games already on Flash and some didn’t seem to look like “make shift” 3D games. The general response from people I chatted to online was that Flash is vector based and only runs fla or swf files but however if I wanted to import 3D models into Flash I would have to use a 3D software called Swift 3D which can open/import 3D files from other software and save/export those files as swf files. This was good news as I planned to make 3D models instead of trying to create them in Flash which would be a great ask. Overall my first impression is making me think that Flash could suffice as a 3D tool in creating my game but it is still early days.

3D box created in Flash CS4




Thursday, 29 January 2009

Wiiflash

Want to use the Wiimote for your Flash applications? Well a combination of a Server and API developed by Thibault Imbert and Joa Ebert for implementing a Wiimote within flash called Wiiflash is available at the Wiiflash site www.wiiflash-bytearray.org.  It‘s been available and developed for a short while but it is only really now that it’s picking up popular recognition.

As part of my final project where I’m designing a game in Flash that makes use of the Wiimote, I decided to test out the Wiimote in flash through downloading the folder from http://wiiflash.bytearray.org/?page_id=50.  Once downloaded I set up the API to Flash. There are two ways of doing this. You could follow the setup tutorial by Imbert on the site and implement it through Flex via its Library path to the SWC folder supplied or you could implement it straight into Flash via the source path to the source folder, please see images to below. Once in Flash or Actionscript 3.0 (Wiiflash only runs on Actioncript 3.0) make sure to import the necessary packages.

Next you have to connect the Wii to the Wiiflash server. This is really simple though I set this up for a PC. As the Wiimote is fitted with a Bluetooth connection, you’ll need a Bluetooth adapter set up on your PC. Once you establish connection between your PC and the Wiimote via Bluetooth go into the Wiiflash download and open the server folder and run the server. The server automatically connects to the Wiimote and now you’re up and running.

The Wiiflash download comes with a few examples. In particular the Wiimote demo example shows how responsive the Wiimote is to movement through displaying values based on a respective motion. Including Angular motions such as Yaw, Roll and Pitch and Planar movement made on the different planes. The Papervision demo is quite good. Here they have a model of a rally car which you can play around with. The controls take getting use to as they’re quite erratic at times when moving the car. When you try to move the car slowly just a little way the car hardly responds, however when you move it a bit faster it over responds. I will keep at tinkering with this for now, and I’ll keep you posted for further developments.


Go to Edit>Preferences> Actionscript(under category)> Actionscript 3.0 settings>


Under Source Path select the plus sign and in the first row type (just a dot):  .  
Select Plus again and type:   $(AppConfig)/Actionscript 3.0/Classes
Select the folder sign and browse to the source classes folder in Wiiflash.
Thats all to it.