Popular contentToday's:All time:NavigationUser login |
blogsBuilding a realtime Flash 3D animation (Part Two)Now I have my models and textures (see part one), simple though they are, in place. The next stage is to write some code to make of use them. In this section I will take a look at setting up papervision and the Tweener engines and gathering my models and textures into a AS3 Project (via FLEX Builder). (read on) Building a realtime Flash 3D animation (Part One)I posted last month, a new game I had just completed. One of the primary reasons for building this game was to try and get to grips with the new work-flows required in a 3D project. Over the next couple of posts, i'm going to take a look at how I achieved this, focusing on the end of game moon animation. I'm a beginner with all these 3d technologies, and it was very much a learning process, but one which was immensely satisfying also. I'll be taking a look, at Preparing models and textures, Collada file format, Loading into AS3/Flex, rendering with Papervision3D, and animating with Tweener. First up models... (read on) View Source now illegal
Crazy people out there. This story on techdirt tells of a nasty little law firm - which is claiming it is both illegal to link to their site and view source of their webpages!!!
Wow i wonder what a user of lynx the linux text based browser would have to do - just look away quickly.
Oddly with one of code :
file_get_contents("http://www.cybertriallawyer.com/"), i can grab the entire home page of the site - and place it into a text box (which ive done below) - i wonder if that is allowed as im not using the view source 'feature; of my browser.. hmmm
Music Producers I know and loveMusic plays a big part in most of my projects, and im always looking to make new colobarations with producers. Recently ive been collaborating with some great producers and i thought id share a link back to their other works. First up Kolektor1. Kolektor is very active in both the French and Brazilian underground scenes, and donated the short loop I have used on the outro scene in Space Invaders - Episode IV : A new hope. The Tune is part of his recent live set, and brings a fantastic twisted retro feel to the animation, its melody is almost chip music in its tones. Hopefuly I will get hold of the full live set this is taken from soon, in the meantime check out his brazilian crew here Secondly, Esther Ofei. Musically Esther presents a classic split personality, as she branches out of genres refusing to be pigeon holed by any of them. As Estehr Ofei, shes a well respected DJ/Producer of banging but genuinely soulful techno. Recently as Rehtse, shes turned not just her name inside out but the tempo and flavor of her beats - producing some achingly beautiful down tempo vocal excursions. Les Trolls, hail from Toulouse in Southern France and have been producing bizarre and wonderful underground noise and sonic tapestries for ever (or so it seems). Recently they have been active in bringing the underground flavor to the middle east, including beirut!! Check out some latest middle east inspired goodness here Space Invaders - Episode IV : A New Hope![]() Its Space Invaders, Jim - but not as we know it. Actually, its my new game that ive just put up on a relaunched 99lives site (needs flash 9). Have your microphone handy as well so you can record a voice clip for the high score table! 123reg.co.uk have no customer serviceIts always a shame when you have to leave a company you have been with for some time. It happened to me a while back when my webhost, a lovely little outfit called geekhosting got bought out by siteocity. After this I could never get decent support or resolutions to problems. Domain name registrations is one those areas where its nice to use one company, otherwise the management and renewing of URLS can get too complex. Ive always used a company called 123reg.co.uk , initially because i had a mate who worked there - but continually because they had great value for money - and importantly a fantastic web interface for management of DNS. However they are now part of the pipex group. Not a bad thing in itself, but it seems like so many other smaller companies they seem to be transforming into a purely email based support system. I can understand this for support - come on - its only domain names -however, theres not even phone number to contact sales. This is a crazy thing! Instead you have to navigate a bizare web based system - and leave a support ticket, in this case my payments are being continually refused. After this, anywhere between 3 days and one week later you will get an automated email informing you to, for example, check your details. You do follow the advice, and after the 20th time of checking - look for a way to follow up the inquiry. There is none. You have to open a new ticket. You do, and get an identical automated response (worse im sure the automated repose is actually chosen by - a massively overworked im sure - human being). This is to try and PAY - to give the company MONEY!! The sad thing is, ive spoken to a few other people who use 123 and they report a similar problem with making payments also. Id be happy to help - but who do you speak to? Bring on the Kafka. Ironically - I then went straight to to their biggest competitor UKREG and registered my domain in seconds with the exact same card and details. Sorry about the rant - but other than this I feel so hopeless when confronted with such a wall of corporate mismanagement. Final leaving email included below . Bye 123reg :(
Well i'm sorry to say I've had to leave your service.
All of your (very late) late responses to my requests for help have been extremely purile in nature - for example "ensure you have entered your details correctly" or todays "check use stored card details" I am an adult, and find these responses insulting to my intelligence, however the reason it has degenerated into making me unhappy, is the sheer inability to reach a human being in decent space of time to discuss things. Unfortunately when you chase the bottom line - its usually the case you end up on the floor. I Am a technical Director of a web design company, and have always in the past recommended your company to both clients and friends. However like so many smaller internet companies it seems you have been unable to survive your recent acquisition with anything resembling workable customer service. Interestingly - I entered the *EXACT* same card details into UKREG and had NO PROBLEMS. As I have mentioned previously (although im sure you have ignored it) - I have spoken to other contacts within the Web Industry, and i'm not alone in having problems with your payment system. It would be interesting to see some figures on how many payments are being REFUSED by your system - and how many come from stored card details. Please feel free to send me a final automated response to this mail Back from outer spaceWowsers. No entries for a while... I took a little break from all things flash for a while and had a focus on a few other things i'm interested in. I help maintain a site called network23 - and have made a documentary film for that site. If your interested, in some UK free party action - you can check it out at http://www.network23.org.uk/basslinemovie It was a massive learning process completing this - and although it tells fairly coherent story - technically it was a bit of a disaster - However it *was* all about learning - and now I know a fair bit about different HD film formats - AVID and Final Cut incompatibility's - and - well - if you think we have it tough in the web world matching pixels between IE and firefox - rest assured all other industries have their similar standard breaking propriety lock in scams going on... brilliant. Ive got some new flash stuff about to be complete next week. See you then :) WiiFlash ReleasedThe WiiFlash project have just posted their first public release. Check out their blog entry here http://www.bytearray.org/wiiflash/?p=28. External interface still too slowI've been aware that using External Interface in flash 8 was rather slow, although I never had the need to test it myself. Unfortunately the general speed improvements in AS3/AVM2 . Don't seem to of helped external interface. I don't have any old speed stats to compare to, but in my recent tests AS3 external interface seems to begin to choke at around 3Kb/s . Once this limit gets hit, events start to queue up and fire at some (much) later time. Fortunately Binary Socket rocks. With very little pain, i've manged to implement a Socket Server/Client solution, which quite happily flies along consuming 13Kb/s of Wiimote Data. This Has had no noticeable effect on frame-rate of the test movie, on my machine it belts along at a nice 55Fps. The great thing here is I can cut the 13KB/s figure drastically by implementing smoothing of wii data at either the C or Haxe level of Flii. The current wiimote drivers only support one wiimote, but i'm imaging that with smoothing implemented like this, it would certainly be possible to support a full roster of four of them. Controling Papervision 3D with Ninitendo Wiimote in Flii
Theres been a lot of action occurring in Flash / Wiimote integration while I was away on holiday. A couple of other projects have sprung up. Firstly WiiFlash Seems to be a collaboration between Joa and Thibault Imbert of ByteArray.Org. Ive been following the crazy experiments coming out of byteArray, and Joa's work on the Imageprocessing Library, is very impressive, so i'm very much looking forwards to seeing what these two produce.
Secondly we have FWiidom.org Setup by Adam of Dusty Pixels. Hopefully myself and Adam will be merging our systems together over the next few weeks, and producing a cross platform solution. so this should be the final version of Flii.
Converting the Focus example to FliiTo get the current papervision Focus example working with Flii is pretty simple, requiring only two changes to the existing code. Firstly, all key handling code is removed from driveCar. The new version is simply,
private function driveCar():void
{
speed -= ( speed - topSpeed ) / 10;
steer -= ( steer - topSteer ) / 2;
}
Then two Flii handlers are written. Here we want to translate movement with the nunchuck joystick to movement of the car, while wiimote position will alter camera angle. Our handlers are,
//flii handlers
private function onAC(e:FliiEvent):void {
if (e.data["type"] == 0) {
smoothX +=e.data["x"];
smoothY +=e.data["y"];
smoothCount++;
if (smoothCount == 5) {
smoothX /= 5;
smoothY /= 5;
camera.z += (128 - smoothX) *4;
camera.y += (128 - smoothY) *4;
smoothX = 0;
smoothY = 0;
smoothCount = 0;
}
}
}
private function onJOY(e:FliiEvent):void {
topSpeed = e.data["y"]-128;
topSteer = e.data["x"]-128;
//Flii.fliiData(topSteer.toString());
}
onAC is fired when Acceleration data is received, both the nunchuck and wiimote transmit this data, so a type variable is transmitted, which s checked first to ensure only the wiimote is processed. Here the data is also smoothed by averaging 5 values, this works very well, and will be moved out of the AS code in the next version, and into the driver code.
onJOY, receives events from the nunchuck joystick position. Here X and Y values are translated directly into forwards/backwards motion (y) and steering (x).
Finally we grab an instance of flii, and add our event handlers:
flii = Flii.getInstance();
flii.addEventListener("onAC",onAC);
flii.addEventListener("onJOY",onJOY);
Heres a little video demo of the modified file in action. You can also see the current flii framework, which consists of FLEX based app, and some wiimote monitoring panels. If any body is interested in playing with this Mac only version drop me a mail for copy.
By pete at 2007-02-20 11:33 | pete's blog | 1 comment
LcBroadcast v1.0.1Added a small update to LcBroadcast class. Ive added a single string parameter to the constructor;
var my_lcb:LcBroadcast = new LcBroadcast("com.freesome.demo");
The string is a unique identifier for your application. I would recommend a java style package string such as the one in the example. Adding this identifier will allow different applications to use LcBroadcast without effecting each other. For example a podcast player and a video player may both use LcBroadcast to control their individual instances. In v1.0.0 messages would be broadcast to both podcast and players, the unique ID will ensure messages will only reach instances of your own choosing. Holiday :)Heading off to Argentina tomorrow! Cant wait - i'm not even taking a laptop :) Having said that - its an indication of how exciting things are at the moment that i have even a slight tinge of regret to be off the radar for three weeks. Personally i've got a couple of projects very near to release. Work wise, theres some interesting happenings. And i'm constantly seeing mind blowing work in the world of open source flash. Its been great to watch and be part of this platforms maturing from universal hate magnet - in its days of ubiquitous banner ads - to something capable of producing projects like papervision and HaXe. Its a shame to ever have to come back from holiday. But i guess its not going to be *so* bad :) By pete at 2007-01-20 20:28 | pete's blog | 2 comments
Are you ready for a 3D web?I'm not by nature a flash evangelist actually. I have in the past (and i'm sure in the future), had innumerable rows with creative directors who still believe things like flash based shop fronts are a good idea. However where flash shines, it really shines. Web video delivery has been revolutionized thanks to youtube's flash based player, and myspace did the same thing for audio. Since last year though there has been a completely new Virtual Machine being shipped with the latest flash version 9 plug ins. This new VM has such incredible speed improvements over the old that I think we are on a cusp of a whole new set of web applications, which I think flash may come to dominate. There's three factors involved here as I see it. 1) Flex. Flex makes developing RIA's so simple, that anyone from pretty much any coding background, can have a beautiful looking RIA up in less than a week. Its a bold claim, but download the demo and try it. 2) The Flash Open Source Community. In a very short space of time sites such as OSFLash have evolved into mature hosts of some incredible open source software. 3) The emergence of high performance 3D API's. Why 3D? The turning point for me is the demo at MacWorld of John Grden's Paper Vision 3D AS3 Demo. By all reports jaws had to be scraped of the floor, but why, its only 3D right? You would think that with every home having a playstation in the front room, people would be pretty unimpressed by 3D. However this is the web, and here we're still stuck 10 years behind the rest of the world in terms of real time 3D. Sure it can be done, we've al seen JAVA based apps out there do some wonderful things, however only flash right now has the near total penetration to truly deliver this to the masses. And before the new VM it just wasn't possible. I don't think as yet the killer App for 3D Web exists. I would be tempted to say Second Life, but its still maybe too geeky and not mass market enough to fit. I do think there is a very real chance of the killer app being written in flash when it is written. Don't get me wrong, I believe we're gong to see a thousand unneeded and weird 3D interfaces and effects, but its going to be a learning process for everyone, as to just what we are supposed to be doing, and how best to do it. And if you want an environment to experiment, both quicker to develop with than other solutions and with less associated costs, then Flash with its propriety and OS tools is going to be a very tempting solution. By pete at 2007-01-11 13:51 | pete's blog | 2 comments
Papervision Sprite ExtruderI wanted to have a play with creating programmatic models in Papervision 3D. My Flash 9 demo takes as input a transparent GIF OR PNG, and parses through this file, creating a 3D cube, for each pixel, which i can then fully control, in this case I slowly explode the sprite. Theres a few Sprites in there - just hit refresh to see a different one. Introducing FliiFlii, as a desktop application which allows a Nintendo wii controller, or "wiimote" to be fully accessed from a flash movie. This allows the full range of 3D movement to be utilized from within flash. Flii is very different to the flash integration method developed by Mario Klingemann Mario's solution is for accessing the Wiimote buttons from within a flash movie running in the wii web browser. Flii however, requires a standard computer with a bluetooth port, and enables access to the full 3 axis movement of the wiimote and nun-chuck. Flii, is based on wiimote framework for OSX, and as such can only be run so far on a mac, this will be expanded to include windows based machines in time. In fact at present Flii is just at a proof of concept stage (i wouldn't even call it a 0.0.1 release :), and there is still a lot of work to be done. As such im not uploading any binaries right now. If your interested in this project then there's a fair chance you may want to help in some way, so please contact me directly. My hopes for Flii are to provide a simple environment for developers to experiment with the new possibilities offered with Nintendos invention. In time hopefully this will lead to a better understanding of how best a 3D controller can be used to provide new and innovate user experiences. Ultimately it would be great if Flii can become a fertile breading ground for quickly prototyping control ideas for actual Wil games, without the cost of a Wii development kit. In using Flash, I hope to create the most immediate and accesable gateway possible, as flash through its rich Actionscript scripting language, provides a wonderfully rapid environment to experiment with ideas. It is my plan to closely integrate the new Actionscript 3D API, Papervision which although currently in beta is showing the promise of really delivering a useable and beautifully speedy flash 3D experience. Im very interested in hearing from anybody interested in getting involved with the project, I could do with assistance in the following areas Windows: The wiimote api's are implemented on windows, help is needed to write a c based wrapper for them. Otherwise, if you just want to get hold of the application , watch this space. Flii in action. As yet not much to see. The Blue circle responds to motion form the wiimote, moving left and right while growing or shrinking based on forward/backward motion This is a dump from the osx terminal, showing the Neko traces. notice at 3.34:11.107 the wiimote is discovered and then begins transmitting its positional data.
An evening alone with AS3 after [fotb]After coming back from flash on the beach and listening to Brandon Hall, and Keith Peters great sessions on AS3, I've been quite eager to have a play around. Personally I always find the best way to learn any new language is to make a game, and I thought my blog could also do with a little more colour, so i downloaded the FLEX 2 Beta from Adobe labs and got cracking. I wanted to make something which used the new AS3 specific features, but also some of the Flash 8 features, such as bitmaps and filters, which I have dabbled with only briefly. I while ago a made a nice little demo with some circle things that build doozer constructions into the sky, this had always suffered from a bit of slowdown once i got to a certain amount of onscreen content so I figured this would be a good base for conversion. Im also pretty excited by what Nintendo are doing with the Wii, so though i could ditch my yellow circle creatures, and paste a little homage to Mario in there. Each mario is a movieclip, this allowed me to import a animated GIF directly. To get him facing left, i just set scaleX to -1 (remembering scale has change to 0-1 for 0-100%) When you click on a character, I create several Bitmap instances, and again use the copyPixels command to create the animated exploding tiles. This time a drop shadow filter is applied to give the 2.5D effect. You can see the finished thing in banner form, on the blog http://www.freesome.com, for the banner version I use the stage.StageHeight property to detect Im in banner mode, then disable the theme tune playback until mouse over. In full screen mode, you can resize the window and refresh to make the movie fit the window. Not really a game as such, see how long you can stop them reaching the top of the screen - but i find it oddly enjoyable... I guess you just dont get enough chance to shoot Mario normally :) What did i enjoy about AS3? I love the eclipse based Flex environment. The code completion is, if anything, even better than FlashDevelop, an especially cool feature is the automatic adding of import statements. Its also a Mac native application, where as FlashDevelop is .NET only. The speed is cool - I've tested with 1000 of the little critters on screen and still found very little slowdown. Looking at some of the papervision 3D AS3 demos that are circulating on the beta list, i think we've about reached the level Atari ST/ Commodore Amiga power now.. . exciting. There isn't so much to learn. Introducing AS2 when they did was a good move by Macromedia - even if it did not change the underlying architecture it gave us lots of time to practice with the typing variables and so on. If you've been doing this for a while now, and it really does make your life simpler so there no reason not to, most of the transition work is no hassle for you. All the new import statements and re-jigging of classes and properties will take a little while, but its not so bad. For example it took me quite a while to figure out how to change the mouse pointer to a pointing hand (its DisplayObject.buttonMode = true by the way). A couple of things I found i was a little unsure which related to AS3. Different types of displayObject. We have, MovieClip, Sprite, and Bitmap classes. I'm still not one confident when to use one over the other, i'm sure i could optimize better if i did. Garbage collection. Grant Skinners articles on this subject has made me sure this is going to be a problem for many. I definitely found some some slowdown if I've got lots of exploding objects on screen. Im not sure, but this may be related to how i remove the parent objects. I need to have another read of Grants articles i think :( I found the way to load things like sound a little long winded, you need three separate classes to load a sound which seems a little excessive.. but I guess once I get all this functionality into a class of its own it will be simple, but yeah, a quick and dirty loadSound - takes six lines of code now... You can find the source here. Fisix and PapervisonThe Fisix API is released today at http://www.fisixengine.com/ The 3D api, Papervision is currently also in a very active Beta stage, to obtain beta versions for AS2 and AS3 you will need to sign up to the beta list at osFlash http://www.osflash.org/papervision3d New Parallels Beta...Wow!Parallels, is the piece of software that convinced me to buy a mac. For a web developer, it really makes a Mac a must have, as theres no other way to test a site on all popular browsers... And it is a fantastic piece of kit, especially when combined with the wonderfully free VirtueDesktops switcher utility - ohhhhh what fun amazing people with tilt sensor switching :) It would of been quite simple I think for Parallels to just sit back on their laurels, as I havn't seen any intel mac owners not running it... but.. check this out... the new beta has a whole host of pretty cool features, but its one called coherence thats completely bowled me over. Coherence allows a windows app to launch on the OSX desktop, as opposed to within the VW window. Now combine this with full drag and drop functionality for things like file moving...and..well...i'm in heaven. Oh, did I mention you can now boot from your bootcamp partition? :) Theres a much less gushing and coherent write up here. By pete at 2006-12-14 23:44 | pete's blog | 2 comments
New home with media templeJust completed a move to Media Temple Hosting. I have been with a company called geekhosting for many years, but eventually, like so many of the smaller indie's they got swallowed up by a larger host. And to be honest it was never really the same. The final straw came last week, when i was asking for ssh access, i had wanted to set up a symlink on my drupal installation as doing ths you can use one install to serve many sites. Unfortunately the hosts have decided to deny ssh access to users as , "it created unacceptable security risks" They did kindly offer to do the shell work for me, but i dont really have a list of tasks to do, i need to get my hands dirty with a bit of trial and error... The think that really worried me though, is that here you have a webhost claiming they dont cant lock down ssh access? I dont know does this seem odd to you? It does to me. My first experience with *NIX security was 14 years ago as sixth form student. We used an old terminal based unix system, and while browsing through a library unix guide i spotted i could set a process running from account in the background even while logged off. Dutifully i logged in and wrote a quick program which just continually wrote to a file. My intentions where primarily driven by curiosity, and i wondered if next week when i returned, i would find a red faced admin waiting for me to throw me out of college for crashing the network with my huge file. Of course not - i proved that the same user limits where in place for me manually creating files, as there was for a process a launched creating them - and all that had happened was my user area was full and i had to delete the file :) Well, this is just a rambling way of saying *nix based systems have a long history of people trying to break/crash or destroy them , and they have evolved some pretty good methods to protect them selves. Dont let anyone tell you their server cant be made secure, instead you have to hear it as "*I*" cant do it. For me this is really what a webhost is and should be doing. If they *cant* do this - i'm off. See ya :) |