質問

I need to program a game, it's a card game actually, and I must make it with graphic interface, but I don´t know about C++ graphic interface libraries.

Is there something for C++ similar to Python's Tkinter or Pygame (I don´t know if there are others).

If there are libs, are they suited for building a simple card game?

役に立ちましたか?

解決

The most common cross-platform GUI toolkit is Qt, I'd go with that for any C++ GUI application. Especially easy on Linux, all distros have packages for it, but Windows has binary installers too for different compilers.

You can use Netbeans, but I'd really go with Qt Creator for Qt programming.

For a card game with Qt, QGraphicsView is probably easiest, if you want animated card movement etc. For a more static UI, QWidget based one would be very easy. For a modern visually rich UI, QML (but then GUI part is not C++) would work very well.

Achilles heel of Qt for game development is real-time game sound effects, but you can mix Windows-specific sound stuff easily if you do not care about cross platform stuff, and card games don't need much there anyway, if anything. Also, I think Qt5 may actually have improvements for sound, making pure Qt good enough for games.

他のヒント

If it is a game, you may consider SDL

Fun fact: pygame is backed by SDL.

BTW, if you want to have GUI controls in your game( http://www.tayloredge.com/utilities/vbapps/gui.GIF ) , you will need a GUI library. Otherwise, a game library, like SDL, is more suitable for you.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top