My portfolio site from 2006. Back when every website needed a game!
Using Firebase ML, TensorFlow, and Flutter I have put together a new image recognition app.
I began with teaching the ML Kit the difference between Chickens and Squirrels, it turned out to be very simple, just as my previous version using React and Clarifai had been, however at the moment AutoML is very new and doesn’t yet have Flutter extensions ( could change any day now ), so I changed tack and tried out one of their standard libraries instead.
Firebase ML will create an on-device API for you, it was a surprise to me, you just grab a package from your Firebase project and just import that into your App.
This is a big improvement on the clarifai app in that being local it happily works offline, there’s no usage cap to worry about, just install it on your phone and it will work anywhere anytime.
The initial Squirrel Chicken testing.
And a screenshot from the App. Pretty tricky for the AI this one, the generalised version can’t tell that it’s a Red Panda, I can forgive that, many people wouldn’t know. But I think it’s hedging its bets a bit by saying 82% dog and 64% cat – obviously can’t be both, probably it’s saying it has 82% dog characteristics and 64% cat characteristics. Think I would discard any results with less than 90% certainty but I need to test that.
tl;dr Because of Flutter
Back in 2013, I thought Dart would get traction on the web, Google had added a VM to chrome and I was looking to make the move from Flex and ActionScript 3, I experimented and created a couple of small projects, the first was a ball bouncing demo and the second was a simple Slot reels demo.
The flaw in Google’s plan and subsequently mine was that Chrome only had about 30% browser share and it soon became apparent that the other browser vendors had no intention of integrating the Dart VM into their products and that was enough to kill it, sometime later Google dropped the VM and it seemed Dart was dead.
Skip forward to 2019 and I’m fully in on React and TypeScript, although I now develop in a more functional way, I have a component architecture again and TypeScript and Babel have given me a great programming language.
In the meantime I had developed a couple of Apps using React Native but the developer experience wasn’t great, I’m used to hot-reloading and React Native and Expo felt slow and clunky (This was back in late 2017, since then there’s been several improvements including Fast Refresh – so I will take a fresh look soon ), and there were stories of development teams who had tried and abandoned their efforts and returned to native languages.
Then in December 2019 at the Flutter Interact conference, the 1.12 release was announced.
Flutter uses Dart as its language and has a component architecture.
In many ways, Flutter feels like Apache Flex circa 2005 but this time you don’t need a plugin! Turns out I’m not alone and was very happy to see one of my old flash heroes Grant Skinner take the stage and present some great UX work.
It even has tools which remind me of Flash for example Rive.
Not only can you write once for Android and iOS but now there is beta support for web and alpha support for mac, with the ambition of deployment to any OS! including Fuschia OS.
The write once run anywhere idea is not new, but the idea of compiling everything to native and not using some sort of bridge/wrapper/plugin is ( ignoring game engines such as Unity – license fees might be payable ).
Google is calling this Ambient Computing and if it works then the future may mean that it doesn’t really matter what OS you use, you can use any Flutter app.
I’ve just started my first project, to rebuild Bug Bounce, it’s probably not the best way to make a game ( I’d choose Unity for a serious project ), but it is a great way to learn a new language and framework, data, graphics, UI etc.