Improved support for writing games using Qt
Andreas wrote a nice blog [labs.trolltech.com] with the above topic and triggered a lot of comments and ideas from people. I wonder if that discussion is still pounding in the back heads of trolls or if it was silently buried to deepest of dungeons?
I’m not sure how things stand on the Qt/Nokia side of things but the people at Gluon [gluon.gamingfreedom.org] project are still hard at work making a great Qt-based game creation and distribution framework. Be sure to check them out and give them a hand if you can.
The question that comes to my mind is, what do you want from ‘improved game writing support’ inside of Qt?
Most of the missing stuff would probably be better solved using Qt-compatible frameworks alongside Qt. On the graphics side, Qt provides a 2D graphics framework, and for 3D graphics right now you can use OGRE (which I’ve heard works well with Qt).
Other parts, like Physics and AI, probably also work better as their own separate engines that you plug in. I would love to see a plugin module (or similar) for Qt that adds efficient and basic physics to QGraphicsObjects, so that you can easily do collision detection in a 2D canvas based game. With some QML bindings on it, I could finally finish my breakout game.
Well, as Qt will be the only real software platform for all Nokia devices it also means that games are written using Qt. On the Apple side it seems that games tend use a minimal amount of “their Qt” to set up the game and the run it all using OpenGL ES as everything else is too slow. It would be nice if Qt offered more instead of just becoming a framework that sets up an ES context only. The same holds for desktop gaming too, Qt could offer more than just a fullscreen QGLWidget.
From my personaly point of view I think QGraphicsView (along with some QML thrown in) is the API I’d like to use for 2D games if it’s fast enough. For 3D, I don’t think it’s worth the effort to reinvent the wheel and make another Ogre or OpenSceneGraph clone. Perhaps work with those developers and provide easy integration with Qt, docs and examples. For mobile use something slightly stripped down and slimmed from useless features and geared towards ES.
Integration with existing libraries is very desirable, but I believe that QGraphicsView has the potential to serve as a sole platform for many canvas games as well. Basically it has the same (and more) functionality as JavaME in this respect with the added performance boost of being closer to native. Even though Qt3’s sprite and tilescene support were removed, replacement classes can easily be built and better optimized for the specific purpose. Still I’d like to see some thoughts given to game developing needs when designing future Qt API and possible bindings to other libraries. Maybe finer control of the painting event and behindthescene painting. Also I’d like to have the ability to address specific pixels in QPixmap without the need to convert it to a QImage since QPixmap usually is drawn faster on most platforms.
Integration with some other library is a good idea, but not all. Yes, QGraphicsView has good potential. But, first of all, I think Qt/Nokia team must focus on widening QGraphicsView functionality. For example, there are still no functionality to change screen resolution. Some game developers should using 3rd-party libraries (SDL). There are no surround audio, I think, and that developers using OpenAL.
Qt must get all advantages of that libraries and used it well for game development.
The most basic thing that people seem to agree is missing is the ability to change screen resolution. It has been suggested at least twice before in the bug tracker and each time been closed: http://bugreports.qt.nokia.com/browse/QTBUG-3049 [bugreports.qt.nokia.com] and http://bugreports.qt.nokia.com/browse/QTBUG-95 [bugreports.qt.nokia.com] Should I open another one?
As for 3D audio, as was mentioned above, it would be nice with a platform independent way to initialize an OpenAL context through Qt. It is already supposed to be cross-platform, but each platform/driver combination appears to have its own unique series of OpenAL bugs and quirks.
I’ve been using Qt to create my game engine for years now. There are definitely features missing that I would love. Fullscreen support is a big one. One of those bugs linked above was due to a request I made. It seems like it won’t be done. I’ve had to do fullscreen support myself on Linux/mac/windows. It’s possible to go around Qt to do it, but it’s very annoying. About 95% of the time I spent doing the mac port of my engine was working on the fullscreen mode.
Another feature would be Joystick/joypad support. I was able to get around that by using SDLs Joystick module. It was written in such a way that Joystick module can be used without touching any other part of SDL. For anyone needing joysticks, use SDL.
Another issue I’ve ran into was support for keymaps. In Qt, there’s no way to answer “Is this x pressed or released?”. The same goes for the mouse buttons. When I talked to the trolls about this, they said the need for keymaps was not strong enough to add support for it. Afterall, it’s a hairy thing to do in a crossplatform way. I was able to add this feature myself that suits 99% of my uses cases. So it is possible to get working.
I’m not sure if I understand the concept of the thread here, but for the first week using QT Creator, I’ve got more than enough to make games. I imported three different game engines and rendering tools. My focus are AI routines and character development. For that, the IDE has to be able to simulate the game during debugging, and so far it works, better than I thought, since we are dealing with GDB.
Where ever QT want to go, I hope they keep up the good work and stay flexible in being cross platform and enhance the debugger further. A fly-out window would be nice to have, so I can compare logs quicker. We’ve got many game makers (engines). You can pick one up for $0 to $100k, or more, and none have a debugging device, they must think all programmers are perfect. A good debugger, that gives intelligent data about threads, stacks, pointers, variables, function call backs and what not, well, how many are available? – Just my opinion, if of topic ignore or delete. Thanks :D