Ubuntu Edge: convergence in action

Hi everyone, I’ve been talking to a lot of you in the comments on the Indiegogo page, so I thought I’d come on here with a little video of my own computing setup.

I’m going to show you convergence. Although the hardware is getting a lot of the attention, it’s the Ubuntu Edge’s ability to be your phone and your PC that will have the biggest impact. How do I know this for sure? Because I’m already experiencing it.

For over two months I’ve been running Ubuntu for Android on a Nexus 4 phone, and even with its much slower processor and smaller storage than the Edge will have, it’s still made my working life so much simpler. With just a phone I can do pretty much anything that I could do before on my laptop.

I’ve made a quick video to show you a few examples. Remember this code is still in beta – with the final production code and the much more powerful hardware of the Ubuntu Edge, the desktop will really fly.

If you can’t see the video – click here

We’re doing great so far but there’s a long way to go, so please keep on sharing our campaign with everyone you know. You’re our best chance of making this happen!

[Ubuntu QML] F22 Dogfight Beta

So a few months later, the game I was working on has now got to Beta stage. Since last time, I have added a few extra things:

  • Proper dogfight with a T50 fighter
  • Plane shadows
  • Scaling for multiple size screens
  • Revamp and multitouch controls
  • Collisions and explosions
  • Full keyboard control
  • Added 13 levels, loaded from level.txt JSON file
  • Tutorial walkthrough
  • and lots of bug fixes

Still only a Beta, but all the game play is now completed, now it is just fixing bugs 😉 All the code is here, and some screen shots.

https://code.launchpad.net/~vtuson/+junk/dogfight

screenshot2
screenshot3
screnshoot1

[Ubuntu QML] Writting a game.. Alpha Version

Since my first steps into QML when the Ubuntu SDK was launched, I have become a bit addicted to it. I decided to try to write a QML declarative game, and I settle on a shooting fighter jet game. Finally had enough content to put out an alpha. Here is the video:


The code for it in on my LP Junk branches, not really ready for review yet 😉 but happy to have help!

You might notice that I am using the keyboard to drive the game in my computer, I have also build a touch joystick that so far works ok in the Nexus 7, but needs some calibration.

PS: if you have some problems with playing the video, try jumping a head 10 secs, it also helps if you play it in HD 🙂

[Ubuntu QML] SimpleToDo.. done!

Last week I wrote about my first impressions on working with QML vs Android as I tried to translate a SimpleTodo application.

This week, I managed to find a few more spare hours to finish it. Not only that, but I have been able to go beyond what I had for Android. Specially on the UI part, QML makes it really simple to build in transitions and animations. I also found that defining States for the application had simplified the complexity of the program.

I don’t think that today there are official menus published for Ubuntu qml components, so I have implemented my own menu “a la” Ubuntu for phones. Here is a small video of the app:

or you can access the link here: http://www.youtube.com/watch?v=T-gDv-vDMhg

Overall, I highly recommend everyone to play with QML. Here are two very useful links if you are new to it:

And of course, lets not forget the awesome developer.ubuntu.com pages!

[Ubuntu QML] ToDo Android vs Ubuntu

A few months back, I decided to write a Simple ToDo app for Android, then I hooked it up to a cloud backend, using Juju. That was my first Android application, so I got to experience first hand the latest developer documentation and development environment.

Last month, Canonical launched Ubuntu for Phones, that gave me the idea to re-write the same application on QML using the Ubuntu Components.

Clearly comparing a new SDK-Alpha with a stable platform like Android will seem hardly fair, however, keep reading as you might be surprised of the results.

QML vs Dalvik Java

Lets start with QT/QML vs Dalvik/Java – I found QML really easy to get to grips with and be productive. I had the UI (see picture below) running in no time and I would say much faster than with Android.  QML is a very flexible declarative environment that allows you to embedded quick logic into the layout. This is a blessing and  a curse.

While with Android, it was very easy to keep a nice MVC  separation, I struggled to stop the leaks in QML. So while it is very easy to quickly write a functional application, it does not impose what you would consider as good development practices.

In summary, they are both very powerful development environments.

todoapp

IDE: Eclipse vs QtCreator

Part of the development experience is the IDE. I must say that I simply love the QTCreator. Possibly not as polish as Eclipse but you don’t need to read a manual to use it. Also, with a quick integration with the HUD, it is just very simple to use.

So what is QTCreator missing? A good emulator. The Android Development Kit (ADK) provides a really good user experience to develop mobile solutions. QMLScene gives you similar functionality but does not simulate a phone environment. However, all the technology is there, and  I am sure that will be included in the v1.0 version of the SDK.

Documentation

I can’t fault Android developer documentation, but taking into account its popularity, you  wouldn’t expect anything else.

I was very surprise of the quality of information on http://developer.ubuntu.com/ and specially with the component showcase.

componentshowcase

The only thing to watch out for is that in Android you can get all the info you need from a single website. With QML you quickly end up pinging between Digia, Nokia and Ubuntu pages.

The Code

The code is on my launchpad repos. The actual source functionality is not finished as I am still trying to figure out how to add menu options to access Done items. Anyway, the whole thing is pretty compact compare to the Dalvik code. The actual logic is almost identical in both. A ListView that is populate from an List model. All the data is persisted in SQLite db.

Conclusion

Both environments have been equally painless to work with, the difference is that the Ubuntu environment has *just* been released as an Alpha. I think this is the start of a very vibrant App development ecosystem.

[Ubuntu Nexus7] Keeping up with progress

To make it easier to keep up with the work and progress on the Nexus 7 , I have set up a topic in status.ubuntu.com and a wiki page with the performance goals for the release:

If there is  a missing Blueprint that should be track under this topic, please let me know.

 

[Ubuntu Nexus7] 7 hours battery life whilst browsing

I stumbled upon a Chrome OS test case that includes a chromium-browser extension that simulates user browsing. The extension does a 1 hour test split by:

  • [First 60% of the test] Browsing: a new website is loaded every minute.  The web page loaded is scrolled down one page every second, then scrolled back up one page every second.
  • [Next 20%] Email: Gmail is loaded in the foreground tab and audio is streamed from a background tab.
  • [Next 10%] Documents: Various Google Docs are loaded.
  • [Final 10%] Video: A full screen 480p YouTube Video is played.

Besides the fact that the audio requires flash, everything else worked in the Nexus 7. After a few tweaks to the extension, I had it running on a loop for 24 hours. Also, I changed it so the auto-browsing would start as soon as you launch chromium.

The next thing to do was to write a simple bash script that would launch the browser and log battery life and screen brightness to a file every 15 min. The assumption was that as the system run out of battery it would shutdown, and that last entry in the file would give me the battery life whilst browsing.

  • Battery levels can be read from here (thanks ogra!): /sys/class/power_supply/battery/capacity
  • Brightness levels can be read from here: /sys/class/backlight/pwm-backlight/brightness

I set it to run overnight at a screen brightness of 99. The good news is that the system suspended rather than just run out of juice at about 4:51 AM (according to the browser history).  3 hours later, I resumed it to find it in a good state.

All and all – the Nexus 7 with Ubuntu was browsing for just over 7 hours (7 hours and 12 minutes), so I am pretty happy with that. Although, for any reliable benchmarking, I would need at least 10 samples of the test run. If you want to check out the test, you can find all the code here: http://bazaar.launchpad.net/~vtuson/+junk/load_test_nexus7/

Here is a graphical representation of the results:

The brightness “auto-dim” was a bit disappointing, not to say erratic, and I have filed a couple of bugs against it.