1
\$\begingroup\$

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?

\$\endgroup\$

closed as off-topic by Vaillancourt, Josh Jun 24 '17 at 3:10

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started," "what to learn next," or "which technology to use" are discussion-oriented questions which involve answers that are either based on opinion, or which are all equally valid. Those kinds of questions are outside the scope of this site. Visit our help center for more information." – Josh
If this question can be reworded to fit the rules in the help center, please edit the question.

1
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ 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. \$\endgroup\$ – Aaron Jul 24 '12 at 21:26
0
\$\begingroup\$

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.

\$\endgroup\$
0
\$\begingroup\$

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

\$\endgroup\$
  • 3
    \$\begingroup\$ Hello sna! Welcome to Gamedev Stack Exchange. :) Try to give more information on your listed examples like what features do they have? \$\endgroup\$ – bandrewk Dec 6 '12 at 10:36
  • \$\begingroup\$ 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. \$\endgroup\$ – Aaron Jan 14 '13 at 22:11

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