Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I currently intend to use SFML for my next game project. I'll need a substantial GUI though (RPG/strategy-type) so I'll either have to implement my own or try to find an appropriate third party library, which seem to boil down to CEGUI, libRocket, and GWEN. At the same time, I do not anticipate doing that many advanced graphical effects. My game will be 2D and primarily sprite-based with some sprite animations.

I've recently discovered that QT applications can have their appearance styled so that they don't have to look like plain OS apps. Given that, I am beginning to consider QT a valid alternative to SFML. I wouldn't have to implement the GUI functionality I'd need, and I may not be taking advantage of SFML's lower-level access anyway. The only drawbacks I can think of immediately are the learning curve for QT and figuring out how to fit game logic inside such a framework after getting used to the input/update/render loop of traditional game libraries.

When would an application toolkit like QT be more appropriate for a game than a traditional game or multimedia library like SFML?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

Here's a report on using QT from one guy who tried to use it in his game-like project.

http://www.shamusyoung.com/twentysidedtale/?p=15904

His conclusion? Don't.

share|improve this answer
    
Interesting, though the author of that post was creating a real-time(?) 3D game. I'm working on a turn-based 2D game, though I suppose having a lot of animations would bog things down. –  Aaron Jul 24 '12 at 21:26

Qt is easy to learn. The only issue i found was performance, since the framework is built for convenience more than anything. That, as always, depends on what kind of a game you're making. For you, it's an RPG, so i'm guessing there's going to be alot on the screen and the standard painting library is probably not going to cut it, while the I/O library is perfectly fine, since slight input lag is not fatal. To solve the drawing issue you could use the OpenGL widget, though that may prove to be unnecessarily complicated if you just want to render large amounts of sprites efficiently.

However, you can implement a game loop in Qt without using signals and slots, you just have to call processEvents() when you want to read input instead of running the application with exec() once. This lets you potentialy only use Qt for I/O and GUI. Then you can use SFML for easy and efficient drawing inside of Qt. Here's the official tutorial on integrating Qt and SFML.

share|improve this answer

There are also gui libraries made for sfml, like SFGUI, GuiChan and others.

share|improve this answer
3  
Hello sna! Welcome to Gamedev Stack Exchange. :) Try to give more information on your listed examples like what features do they have? –  bryan226 Dec 6 '12 at 10:36
    
I used GuiChan some way back. It was useful, though it hasn't been updated since 2009. Also, I'd be looking for something that I can easily write a custom renderer for, since I'd want control over the graphics output, and I'm not sure if GuiChan had that or not. As for SFGUI, I'd like some assurance that it's stable and ready for production use. –  Aaron Jan 14 '13 at 22:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.