The QML core team down under gained a new friend for Qt 5. We finally have the privilege of working with a designer in our team and he’s been helping us in our quest to make QML the most designer friendly UI language. We have created a small video to show you the latest apps and games from our team. But remember that videos aren’t the main point of Qt demos, the source code for these demos is all available from qt-project.org and it’s BSD licensed. I’ll even sprinkle links throughout this post to show the code behind all the new features that have me excited.
First have a look at our new calculator demo, Calqlatr, which has been restyled like the other demos. From its humble few hundred LoC beginnings, SameGame is also looking like a real application now. The new particle effects look even better, and you have your choice of four game modes. This includes a mode that loads preset levels, also written in QML.
QML demos are really easy to modify and play with; SameGame selects a new theme per game mode already, so you can try out your own samegame designs with ease. We also have a new game, “Maroon in Trouble”, with an underwater theme inspired by the rich life at the Great Barrier Reef. The game is highly customizable with the towers implemented in QML, both for their appearance and their gameplay attributes.
When you watched the video of “Maroon in Trouble”, you’ll notice that it avails itself of some of the new visual embellishments available in QtQuick 2. The particle system allows for bubbles and clouds to float all over the screen, while the new sprite elements made the game piece animations trivial to implement. As a bonus, the game has sound effects if you have the QtMultimedia module installed – a benefit of the modularization work in Qt 5.
The new visual effects aren’t just for games though. The completely redesigned twitter search app, TweetSearch, uses sprites and shaders for much more subtle designs. The central logo has a touch of animation to keep the main screen from being static, and the rotating bars use a custom ShaderEffect to get that three dimensional look (although you could use the Qt3D module instead). It also uses view transitions to populate in a more fluid fashion.
If you still can’t get the beautiful effects you want with all these new visual elements, QtQuick 2 also introduces the Canvas element for imperative painting. Especially good for graphing data, see it in action with the new StocQt stock chart viewer example.
The QML core team is really proud of how well QtQuick 2 has developed. This is especially true since modules from the other Brisbane teams, like the team behind QtMultimedia, are finally inside Qt after the modularization efforts. I hope that our demos help launch other developers to write even better games and apps.