What platform next?

20 Feb

What platform next?

In 2013, Adobe completely dropped the ball on the Flash Player and AIR. All further development has been moved to India. This normally means that the software has been put in what is referred to as "Maintenance mode". Any serious bugs will be fixed, but don't expect much in terms of new features. If you take a look at the Release Notes for AIR 4.0, you'll see what I mean.

AIR will exist for many years still, but it's time to look forward and figure out what's next. What I'm looking for is a platform that will let me create both mobile and standalone apps easily, like Adobe AIR was but with a company that is still committed to the technology. Perferably with a solution that can create smaller and faster apps than AIR.

Some alternatives

For many years I wanted to look into Haxe, but I never got really into it. It was just to "techy" to get going. I really want a one-click installer that gives me all I need to get started. Some of my coder friends spent lots of time with Haxe and said really nice things about it. Other friends have looked towards Java. Joa Ebert has a nice thing going with Defrac and the demo video he published recently looks awesome. I don't want to move in the direction of Java though.

I've also looked at Corona. I really like the idea of using Lua as the main language but Corona only outputs for devices. I've played around with Unity a bit and that I really liked. It's very geared towards games though, so while it's fun, it's also not exactly what I'm looking for.

Ever since I started programming as a kid, I've shyed away from C & C++. Memory handling and pointers always seemed like unnecessary complications, but after playing around with microcontrollers with 2Kb ram and less, I've changed my opinion about that. The last two years I've done lot's of it and I'm really enjoying it. Seems like a good direction to go? Everybody said nice things about C# and Microsoft Visual Studio, but Microsoft don't have much of a story in terms of cross platform app publishing.

This autumn I've done a series of lectures at NITH on the topic "Embedded Systems". Great fun! One day during a break, I got a call from a former NITH student and acquaintance asking if I had any plans after my teaching duties. 

Outracks & Uno

Some days later I were in the offices of a company named Outracks. This is a relatively small company with a massive goal. They're building a complete coding ecosystem from scratch, right here in my hometown of Oslo. With this I mean that they are creating a language called Uno that has compilers so that it can output to iOS, Android, desktop and more. That just sounds like an AIR clone, right? Not quite. Uno is the first programming language to unify GPU and CPU pogramming. You write the app and all the shaders in the same language. The end result will run on both GPU and CPU and in many cases you don't even need to think about that part of it. The export is always a native app (no runtime bloat), but Uno also exports to HTML5/JS with 3D done as WebGL. In other words - you can make GPU accelerated apps for pretty much any platform with Uno.

They're also creating an authoring tool called Realtime Studio that is a complete coding environment with integrated preview, a solid code editor, inspectors, node view for code (loving this one!), drag and drop support, gui for various export targets and more. On top of that they're creating a UI FrameWork and exactly this was what they wanted me to help with.

The plan was that I were to develop a desktop app for a (still secret) client using their complete toolkit. Over a 1.5 month period I worked on the app and provided tons of feedback and I have to say this is shaping up to be one hell of a toolkit! The UI framework is completely GPU based and this does wonders when it comes to speed. Imagine having a slightly scaled down version of the Flex framework running completely on the GPU?

Why it's so cool

Uno is closely related to the C# language. If you already have C# experience, you'll be able to jump right into x-platform development. I however had basically no C# experience when I started the project and that was one of the things they wanted to test. How quickly would I pick up the language? What would I miss from other platforms? What would be the big hurdles?

Despite all the tools being under constant development, I would say that it took only 2 weeks to learn the language. After that I was fairly productive and knew where I was going. The next 2 weeks went by trying to understand and use correctly all the new goodness available to me that I never had in Actionscript. Uno has support for overloading, abstract classes, swizzling, lambda expressions, extension methods and much more. The last two weeks were really productive and we did reach a finished product. That said, it is still being actively developed and polished and I can't wait till I get to tell more about it.

The one thing that I still haven't wrapped my head fully around is writing shaders. While Uno makes this much easier, it is still something that I'll need to learn more about. Something also tells me that this is something that'll take quite some time as it's a quite different mindset. GPU's work in paralell and all operations happen on all pixels at the same time. That takes some getting used to from thinking more or less serially. What I can say is that I'm pretty sure that I've found what I'm looking for. This is actually the only platform that I feel comfortable spending my time on. Worst thing that could happen is that I've learned C#.

Uno will launch with lot's of official API's that are supported on all platforms. In addition there will be several APIs that are available for some platforms that you can download support for. Outracks has made a backend that is extendable, so if there is a feature you need in a specific platform, you can just add it yourself. It's like Native Extensions on stereoids. Want MIDI on the desktop? Find a premade library in the form of a DLL, write some interfacing methods and you're ready to go. This is going to be incredibly useful for those special hardware integration projects that I sometimes do for museums and exhibits.

Bottom line

I could transition in just a few weeks to a completely new platform. That's pretty cool in itself. Not only can I target iOS, Android, browsers & desktop, but Outracks are playing around with support for lots of other devices and platforms. In the office there were FireFox phones, Nvidia-boxes and lots of other interesting hardware. The apps I've made play with blazing speed and I've seen things that I've never before seen running on a mobile GPU. I can't say how much better that feels than seeing things like this go unnoticed. Having spent a lot of time in the Adobe Forums lately, I've seen many hundred important questions go completely unnoticed by Adobe. I need a platform with people that care and I feel that Uno is by far the strongest contender.

A public beta will be launched at FITC this coming week, so be sure to sign up for that. If you're actually at the event, make sure you catch one of the two sessions that Simo is presenting. He's been using Uno longer than anybody and he's made some seriously good looking things with it!

 

Apple is not currently accepting applications built with AIR 3.9

03 Feb

Apple is not currently accepting applications built with AIR 3.9

From the 1st of February, you'll get the following error message when trying to submit your Adobe AIR based app to Apple's App Store:

    Apple's web service operation was not successful
    Unable to authenticate the package: somenumber.itmsp
    ERROR ITMS-9000: "This bundle is invalid. Apple is not currently accepting applications built with this version of the SDK." at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)

From February, you'll have to build your AIR apps using the iOS 7 SDK (comes with XCode 5). In other words - if you are using Flash Builder or the Open Source Flex SDK to make iOS apps, you'll need to upgrade a bit. Adobe added support for this in the 4.0 Beta version of the AIR SDK that is now available on Adobe Labs. I do not know how this affects Windows users, but for Mac users you just download Xcode 5.x and use this instead of XCode 4.x. Next you download the AIR 4.0 Beta SDK and install it. Instructions for how to install/upgrade your AIR SDK can be found here.

With the beta and XCode installed, all you have to do is to up the version number to 4.0 in your App XML and maybe update the path to the new iOS simulator for testing.

Note: this only applies to new submissions. All apps that are already approved are still good.

 

Error occurred while installing the application: Invalid specified

28 Dec

Whenever you get this error, you need to check exactly what devices are connected to the computer. I had the problem that every time one of my colleagues came to the office, Flash Builder would all of a sudden not debug the AIR apps that I built using Flash Builder. The problem affects all ADT-based tools so this might be useful also if you're using Adobe Flash Professional or other tools (like xcode, java) or more to author your Android or iOS apps.

The fix is simple. Open a terminal window and type the following:

/Applications/YourApplicationName/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/bin/adt -devices -platform ios

The path to ADT will vary based on your machine, but if you're using some kind of Flash SDK, it'll be in a subfolder like the above. This command will show a list of the devices currently seen by the ADT and in my case, the phone belonging to my coworker showed up. His device wasn't physically connected to my machine, but since ADT supports debugging via wifi, it can still be used by the tool. For some reason, Adobe's tools will ignore the request to debug via cable and instead tries to connect to the Wifi device.

Pressure sensitive floor

28 May

Pressure sensitive floor

I just came back from the most challenging physical computing project I've ever done. It's a 13 by 8 meter labyrinth where you walk in the dark and get a sensory experience based on more than 300 sensors. The main challenge was actually how much time it took to execute it, but it was such a fun project that I didn't really mind. You can now try it out yourself at Energisenteret in the theme park Hunderfossen (Troll-themed!) near Lillehammer, Norway. I don't know for sure, but I think this is the worlds first "pressure sensitive floor"?

I've worked on several projects with the company SixSides and about a year ago, they asked me if I could build a floor that reacted to the people walking on it. The basic idea was to play back sounds of walking on other surfaces than you really were. Of course I said yes to the challenge!

Read the rest in the hardware blog...

 

VerifyError: Error #1102: Illegal default value for type int

07 May

Stubled across an AS3 compiler bug that I've seen before, but couldn't find a good explanation via Google for. If you get the above error, make sure you don't initialize an "int" to "null". Changing it from:

public function Quad( w:Number, h:Number, color:int = null )

to:

public function Quad( w:Number, h:Number, color:int = undefined )

will remove this stupid compiler error...

Unexplainable errors in Flash Builder 4.7

11 Feb

For reference: if you have unexplainable errors in Flash Builder 4.7 (and other versions) make sure you turn off "Marc Occurences" in the IDE. Turning this feature off holds the key to removing errors such as:

"com.google.common.collect.ComputationException: java.lang.NullPointerException" and several more.

2012 - what a difference a year makes

06 Jan

2012 - what a difference a year makes

The last year was full of changes for me professionally. My focus is still games and entertainment, but I'm drifting towards other languages and platforms than I've been using the last few years. I've changed office and I'm also spending lots of time on my new hobbies: electronics and 3D Printing!

Hardware

I started the year by taking two months off from client work so I could learn electronics and microcontrollers. I had heaps of fun and I've gotten far enough that I can solve pretty much any idea I get. From having just a very basic knowledge of electronics, I can now read datasheets, solder and build circuits that solve problems. Thanks to microcontrollers (such as an Arduino) I can get really far with only limited electronics experience. Throughout the year, I wrote 19 blog entries about Arduino and 9 about electronics.

3D Printing and modeling

In April I got myself an Ultimaker. I built it from scratch based on a kit and at the end of the year, I got myself a second 3D Printer - a Printrbot Jr. Throughout the year I've written 9 entries about 3D Printing and I'm sure it'll be at least twice as many in the year to come. I've always known how to model in 3D, but 2012 was the year I learned Rhino. It's very different from other 3D packages, but I absolutely love it! It's incredibly intuitive and easy to learn. Drop by Thingiverse to check out things I've designed this year.

Projects

I've done several great projects this year. My favorite was the Rock City Project where I got to work with my friends in Back on a huge museum installation. On this project I did 6 of 10 interactive installations and lots of hardware integration. If you're travelling in the Namsos area, it's well worth a visit!

Another favorite what the HTML5 game I made for NASA! The screen was 8x12 metres and anyone with a smartphone could open a URL and then play a game on the big screen using their phone as a controller. Unfortunately, the project was only live for a week. Due to that I can't really show it, but hopefully there will be more projects like this in the year to come.

My Arduino Companion app keeps going strong. It's now surpassed 70k installs on iOS and Android and it just keeps growing. I'm also working hard on another AIR-based game at the moment that I know is going to be a success. Hopefully, we'll have it out mid February.

My new office: Bitraf

I've said goodbye to my architect friends for now and moved to Oslo's biggest Hackerspace -> Bitraf. I share my office space with designers, 3D modelers, illustrators, programmers and other geeks. In the evenings, the office transforms into a lively Hackerspace with an even wider mix of people. It's a really great place with lots of nice people and it's something I've dreamt of for many years.

Bitraf works as a "DoOcracy", meaning that those that DO things there gets to decide what happens there. My biggest contribution this far has been the 3DP weekends, but I hope to contribute even more in the year to come. You'll usually find me there every Build-night (Thursdays).

If you're looking for an office in Oslo and you have an interest in code, creativity and making things - check it out. I don't think you can find a better deal on an office for freelancers in Oslo.

Adobe's lack of interest

I've put anything that has to do with Flash on hold until Adobe (or a new owner) take the platform further. I still do Flash & AIR projects, but when Adobe can't bet on it's own platform, then how can I? I'm looking beyond Adobe tools and I'm liking what I see on the Open Source side. The way Adobe has treated developers the last year clearly shows that they're all about graphics, not code. This also means that Flashmagazine.com is on hold until something new happens to the platform.

2012 is also the year when Flash User Group Norway (FUGN) went silent. The group was started 5 years ago by Paulo, Øystein and me. It's been a hotbed of creativity and inspiration over the years. I have gotten lots of good friends through it, but wouldn't you know - just as we were sitting in a meeting we got an email from Adobe saying that the group had been closed down?

Apparently the reason was that we had less then 50 active members. In other words -> if you run an Adobe User group - you better make sure it's in NYC or other big cities. "Small" cities like Oslo are apparently no longer being tolerated. After all - they do support you with free pens and a single software license per year so they can't waste that on good customers. What can I say… Words fail me…

I still do lots of projects based on AIR and I'll continue to do so as long as Adobe keeps the product up to date. It's by far the best cross-platform solution that I know of, but Adobe really isn't doing much to tell the world how great it is. It's sad…

Installation Error: ApplicationVerificationFailed

04 Dec

For future reference: if you're compiling a mobile app for Adobe AIR and you get this error, it basically means that there's something wrong with the certificate that you're compiling with. The app I'm working on at the moment is using TestFlight for distribution and after pushing a build, I was unable to install to any of my devices. The installation on both iPad and iPhone went as normal until after the install, where it just said that it "Failed to install".

Turns out I had mixed up release and development versions of the certificates. Duhh... Posting it here to help others doing the same and not finding a solution.

Feb 11 2013 update: so got this error again and my own explanation showed up in Google - but - it didn't help me. So some more detail on the problem I had today. I have several identities on some of my accounts. Some are for companies I work for and for some reason - I have two developer identities with Apple.  Let's hope I don't pay for both hmmm

This time, I got the error for trying to export the app, or rather the provisioning file with a company certificate for wich i didn't have the Key (.p12/.cer). As soon as I connected the right certificate to the provisioning file, I was able to install the app on my phone. What made me solve it eventually was to open the Organizer app in XCode. This will actually tell you if the Provisioning profile is valid, whereas Flash Builder will not. It was a bit of a facepalm when i realized it, but I'm posting it here so it can help others.

Here's Organizer showing me what Flash builder should have told me half a day ago...

The slow climb of HTML5

27 Nov

The slow climb of HTML5

Many people I meet these days ask why I still use Flash as a base for development of applications and games. It is downright scary to hear that virtually all these people still don't know that you can author your apps in Actionscript and then easily cross-compile to very performant native code for iOS and Android. Targeting the desktop with Flash has been around for more than 10 years. Using AS3 as the language and Adobe AIR to export gives you great performance and access to really advanced tools that allows for proper debugging, even directly on the GPU.

Using this stack comes with an overhead, but I would say that it's only 5-15% slower than pure native code. Perception of speed is of course subjective, but my Arduino Companion app have now been installed on more than 60.000 devices and both major app stores show a 4.5 of 5 rating. This app is currently not using any form of GPU acceleration, but the users still love it. I am currently in the middle of a cross-platform game that IS using acceleration and I'm really happy with what I'm seeing this far.

When it comes to HTML5, I see lots of good stuff happening on the desktop. HTML5 has replaced Flash for many purposes on the desktop and I don't mind this. In fact, I encourage it. I've always been a huge fan of using the right tool for the job. That's why I switched Flashmagazine to HTML more than ten (!) years ago. Flash became big because there were no good alternatives and it's only natural that it's role should change.

HTML/JS/CSS is part of my toolset and it has always been that along with PHP for the serverside. However, if you are one of those that think that HTML5 is a good solution today, you should read this great article by Ben Savage of Spaceport.io. It summarises most of my experience from the mobile HTML5-game I made for NASA recently. My biggest problem with HTML-based apps is that they're slow and have little contact with the device they run on. I absolutely hate going to a website that asks me to install it "as an app". All this does is add a desktop shortcut and the poor developers can't even know if I already did install the shortcut. Due to the lack of this they keep nagging me with their stupid "install-me" dialogue every time I visit their site (yes - I'm looking at you Google Calendar).

I'm sure that omissions like this eventually will annoy enough mobile vendors so they create a way to reliably detect if a shortcut has already been installed. The problem is just that this is but one of many things that need to fall in place before HTML5 is really useful. I also got a shock recently when a friend bought a brand new MacBook Pro and Safari couldn't show the default HTML5 video. All he got was green flickering squares. The fix was simply to install Chrome, but this highlights a core point in Ben's article - browser vendors have no interest in making Browser apps really good.

My other experience is that doing an app as HTML5 adds development time. I've discussed this with others and their ballpark is about the same as mine. 30-50% extra time is required to make a good cross-platform HTML5-app. Most developers ignore mobile for this very reason, but come on... Isn't the whole point of HTML5 to get that extra reach? To actually make it work Mobile first and fully responsive?

So why do I still use the Flash Platform for apps and games? I use it to deliver on my promise of real crossplatform apps. I can use the very same code-base to make a game for iPhone, iPad, iPod, desktop, Facebook-apps, Web as well as all the funky flavors of Android. All I would want extra at the moment is Windows 8 support. That would make my toolkit complete.

Now if only Adobe could start telling the world how good this stack really is...

SafeFrames for mobile apps

25 Oct

SafeFrames for mobile apps

When designing a mobile app for multiple devices and resolutions, it's important to know how the different aspects can limit the positioning of design elements. For a recent project, I made some SafeFrame images that the designer can overlay to make sure all important elements are within the limits of typical iOS devices and a popular Android tablet that we target. I guess this can be useful to others so here's the image for centered designs and here's the image for Left-adjusted designs (transparent PNGs).