Here’s a video of a game we’ve written with Qt Declarative UI:
This completely functional implementation of Same Game is 334 LOC, 127 lines of QML and 207 lines of simple Javascript for handling the game logic. Considering that it includes animated movement and visual effects, that seems rather impressive. But LOC is not a very well defined metric - if you really want to see just how simple Qt Declarative UI makes things then checkout the source from the kinetic repository on gitorious (the kinetic-declarativeui branch) and look for yourself . Don’t worry, those 334 lines include some comments to help explain what’s going on. This demo does have a lot of stuff packed into those lines though, including dynamic object creation and great potential for custom themes.
So have a look at the Qt Declarative UI branch if you want to play with this powerful and emerging technology - or just with the games we’ve implemented with it.
14 Responses to “Qt Declarative UI SameGame”
That’s cool. Will declarative ui be part of 4.6?
Looks great
When Qt4.6(supposed it has all the Kinetic stuff) will be released?
After following your git link and switching to kinetic-declarativeui, I hunted for a bit but couldn’t find the code. I checked demos, examples, src, and did a search, but didn’t come up with it. Is it called SameGaem? Can you just give a link directly to its folder?
@nathan: Also, give yourself some time to learn ‘git grep’, it is a powerful tool and seriously will become your best friend ![]()
@Patcito: Qt Declarative UI is a committed roadmap feature that we’re hacking away on as fast as our dexterous fingers are able to
It’s a pretty complex project, and the best promise we can give you right now is that we are integrating features as they stabilize, focusing on low-level features first and foremost, and we’ll need to see where that takes us. Unfortunately we don’t comment on Qt release dates, but 4.6 will be out in the not too distant future.
Hi, I want to checkout the kinetic-declarativeui branch from git, but I have no idea in how to do it. I already cloned the kinetic repo (using git clone git://gitorious.org/+qt-kinetic-developers/qt/kinetic.git), but now I don’t know how to get the kinetic-declarativeui branch. Is there a way to do that?
By the way, I’m really impressed with this project, Qt is just awesome!
Thanks.
@Gabriel Morrison
This should help:
http://stackoverflow.com/questions/67699/how-do-i-clone-all-remote-branches-with-git
Thanks, Vitaly. Now I have another problem: I can’t build it, because of some errors during configure. It seems there are missing headers on the include folder, and, in fact, in qt 4.5.2 tarball, the headers are organized in the include folder, but on my clone, the include folder doesn’t exist. Any clue about that?
Javascript and declarative animation? How is the performance on ancient machines? Or more like… how is the performance compared to painfully writing the animation code by hand?
Thanks, Vitaly. Now everything is fine. ![]()
This is all really exciting stuff. But the real question is, are we about to see a Qt Plugin released to compete with SilverLight, JavaFX, AJAX and Flash?
Are there any plans for using Qt Designer or a similar GUI tool to set up QML layouts visually? (At least the visual widget layout part.)