It's been quite a slow summer workwise, so I've had plenty time on my hands.
I've been toying with an idea to create a "digital pop-up book", that is to say a book that comes complete with a google cardboard headset, and combines a story with Augmented and Virtual Reality.
I created the first version in AIR, and did manage to get everything working. However, performance was not great. I was using four Stage3D Proxies, which worked fine on my own phone, an Oppo 7 Find, but on smaller phones some levels would disappear for no apparent reason, though I suspect there wasn't enough VRAM available. The Oppo has a dedicated graphics chip, and can easily fool you into thinking everything's pukka.
So, time to look at alternatives. I've messed with Unity since the very early days, when I actually talked with David Helgason, one of the founders, and got a free license. The whole thing started in Denmark, and I was a member of the Web3D Consortium, still trying to make solutions with X3D. At this time Flash ruled supreme, so there was no point (for me) to learn Unity. I'd made a javascript bridge between Flux Player (a then open-source X3D engine) and Flash Player, and was having a whale of a time programming in ActionScript and seeing results in 3D. Made a few good solutions on that basis, before Flux player suddenly became a closed technology, and carried a very hefty license fee.
Just when I thought I would have to drop Flash, in order to carry on working with Web3D, Stage3D came along and I've rarely looked back since. But it's time to look forward.
Now, as then, when I open Unity I can't help feeling I've gone back to the Flash MX days.
Attaching scripts to actual graphical objects the way we used to, each MovieClip having an onClipEvent(load) and onClipEvent(enterFrame). I wonder if that was the inspiration for Unity's Start(), Update() template?
In Unity the MovieClip is loosely replaced by the GameObject. That's another thing that put me off Unity. It assumes you're making a game, which generally I'm not.
Unity allows you to program in JavaScript or C#. I was tempted to go with the JavaScript approach, but that seemed like a step backwards after all that AS3 OOP goodness, so I've learned to use C#.
The transition has been completely painless, for apart from slight differences in syntax, everything is quite familiar.
I'm used to sitting with pages of code in FlashDevelop, and only seeing my 3D creations after compiling. I actually wanted a similar workflow in Unity, though now I am getting used to the way Unity works, and the ability to create structure, without necessarily having a "Main" class.
(I found out how to do that too, but don't need my comfort blanket quite as much any more :)
In Unity you do set a lot of variable and properties through the User Interface, but the user interface is created from your own code, so basically if you work the way I do, you are building a custom user interface for Editing and tweeking your application as you go along. This is actually a very cool approach. I just never got that far in my previous brief attempts to master Unity.
Once you discover the power of a full blown 3D engine, it's easy to go mad.
As I work primarily on Mobile and tablet, I have had to tone it down a bit, but it's fantastic to be able to work in a WYSIWYG environment again, the way we used to in the early Flash years.
Visual Studio is a pleasure to code in. Once I got the intellisense working, I've been able to use it to discover all the properties and methods available on different types of objects and I'm now feeling just as at home as in FlashDevelop.
Unlike most Flashers, I'm not quitting AS3 to take up a new technology, just adding to my toolbox.
Now I'm feeling comfortable with C# a whole new world has opened up and I'm excited to see where it takes me.
My first experiments have been in "Mixed Reality", that is a combination of Virtual and Augmented reality using the Vuforia library. Sometimes it's so easy it feels like cheating. While ActionScript has always been a challenging platform to master (and therefore in itself very satisfying when getting something to work!!), the combination of Unity and C# provides a powerhouse of new possibilities, as all the simple stuff is taken care of. I'm not used to anything being "under the hood", and even libraries like Away3D, I've customised and modified for my own ends.
Though I've had to go from Flash Hero to Unity Zero, I'm quickly clawing my way up to where I can call myself a Unity Developer.
Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts
Sunday, 28 August 2016
Thursday, 22 October 2009
My HERO

A few days ago I recieved my new phone. With all the recent hype about CS5 and iPhone it may have escaped some flash developers attention that the HERO already ships with Flash player. Currently this only runs AS2, although video is running perfectly (YourTube, TED) in fullscreen, and the F10 player is on the way. What can I say, the HTC HERO is the best phone I've ever seen. It has all the polish and easy of use of the iPhone, but the operating system is open source, and the majority of apps are free. Some of those free apps blew me away. Layar is the first usable Augmented reality app I've tried, though I know there are similar apps out there. The phone comes all rigged up to several Google services, search (naturally), maps, mail and my favourite, a Google app called Sky Map, that instantly turns you into an expert on the constellations. I always wanted to learn the night sky and with this app you just point the phone in any direction and it shows you the names of the stars you're looking at. The first thing I saw looking south out of the window was Uranus. I never knew you could see Uranus with the naked eye ;O)
I am impressed. There was an app I couldn't find though, a magnifying glass, so today I downloaded the SDK and built it! Depsite the fact I've never actually written a Java application before, this evening I made my first Android application, using completely free tools. The Android phone emulator makes developing for Android phones a doddle. When you're used to Flex, using Eclipse for Java is a no brainer. Once you get over the initial differences in syntax, developing Java is very similar to making AS3 projects in Flex and I would encourage any Flashers turned Flexers to give it a try. You never know, it may be the start of a new career...
Over the weekend I intend to get the app finished and on the app store. If that proves possible, it will be the absolute fastest "from-idea-to-market" cycle ever!
If like Bonnie Tyler you've been holding out for a Hero, wondering whether to buy one or not, my advice is go for it, 100%. Apparently the first version with HTC "TouchFLO" was a bit choppy, but that's been fixed and mine came with the very latest BIOS already pre-installed.
Subscribe to:
Posts (Atom)