• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
cignox1

Cross platform GUI toolkit

15 posts in this topic

Hi all, I'm currently thinking to start a new spare time project, and would like to have advices about which GUI toolkit could fit my needs. Up to now, I've considered Qt and wxWidgets, but I'm looking for something more lightweight (if such thing exists). To be honest, I've already tried to set up wxWidgets on Eclipse without luck, so perhaps it is not really what I want :-(

Requirements:
-Should be available on windows and linux (mac would be a welcome plus)
-Lightweight and easy to both install and use (no much time to spend on the project, and would rather spend it on the core than the GUI)
-Based on standard c++

Bonus:
-Python bindings (I might want to add scripting capabilities)
-OpenGL support

Not required:
-I don't need it to look like a native app (no host widgets used under the hood required), as long as all common widgets are provided and the interface is nice to look at.
-I don't need the toolkit to provide other facilities (network/threads/sound/database...): boost and other tools are good enough, and probably even better, and I don't need many other features anyway, since it would be an image manipulation app.

I could consider to use Java, but I'm going to do quite intensive image processing and there are wonderful c/c++ libraries which could help (FreeImage and the like) not to mention the performance issues.
I'm open to suggestions on this as well, though, if you think that a good option would be another language (that is Java: no python, as I'm not good enough with it, and no c#, since .net is only theoretically cross platform :-)

There could be more to say, but let's start with that. Any advice?

Thank you all!
0

Share this post


Link to post
Share on other sites
If Python bindings are important to you, then that throws a lot of weight behind wxWidgets...
0

Share this post


Link to post
Share on other sites
[quote name='Promit' timestamp='1325207151' post='4897999']
If Python bindings are important to you, then that throws a lot of weight behind wxWidgets...
[/quote]
Though there are also [url="http://www.riverbankcomputing.co.uk/software/pyqt/intro"]reasonably mature bindings for Qt[/url], too. I can't contrast it to wxWidgets as I've never used that library, in or out of Python.

cignox1: depending on how lightweight you really want it, simply using glut/freeglut might be an option. There's stuff for menu bars, context menus, etc, and it's pretty easy to hack together some basic buttons with OpenGL. I fear the reality of the situation is that all the mature GUI libraries do indeed come with a lot of other baggage, due to a combination of N.I.H syndrome, their age/legacy, cross platform support, etc
0

Share this post


Link to post
Share on other sites
Unfortunately there's not a lot of choices for cross-platform GUI toolkits if you want to restrict yourself to C/C++. Not sure why exactly, my best guess is that Java has covered the cross-platform requirement for quite a while now.

+1 for wxWidgets here too. Qt is advertised as a GUI toolkit but it has grown into an entire framework, so it's ridiculously heavy if you just want a basic interface. I'm not a fan of Qt for this and a couple other reasons to be quite honest.

As for Python bindings, I'm pretty sure there are bindings for both wx and Qt. I remember doing Qt/KDE programming in Python when I was using a Linux operating system. (Unless I'm being mistaken with Ruby programming.)
0

Share this post


Link to post
Share on other sites
There's also [url="http://www.rawmaterialsoftware.com/juce.php"]Juce [/url]... which has a lot of nice features e.g. embedding cross-platform image resources. No python bindings as far as I know however (There is a PyJuce project but it doesn't look like it is alive)
0

Share this post


Link to post
Share on other sites
If You care about python embedding and GUI, why not to try to create the whole app in Python, and just make the speed critical parts in C++? There are many GUI tools for python, also "built in" in standard python modules, so maybe it is a way to achieve Your goal? And Python is cross-platform by definition, so it could solve a lot of problems at the very beginnig.
1

Share this post


Link to post
Share on other sites
Thank you all for your advices.

[quote]
Unfortunately there's not a lot of choices for cross-platform GUI toolkits if you want to restrict yourself to C/C++. Not sure why exactly, my best guess is that Java has covered the cross-platform requirement for quite a while now.
[/quote]

I don't refuse to consider more options: indeed, working with java would be perhaps more pleaseant and it would simplify implementing a plugin system, should I ever reach that point. I could do a deeper search to check if libraries to handle images i/o exist, expecially for HDR and other non web related formats.

[quote]
If You care about python embedding and GUI, why not to try to create the whole app in Python, and just make the speed critical parts in C++?
[/quote]

I'm not good enought with phyton to even consider it as a viable option. The only reason to have python bindings is that once the app core is completed, it would be nice to allow for extensions.
That said, it does not hurt to give it a look to see if with the right IDE (and a GUI designer) I can change my mind :-)

I though to add a word about the license I need: as I don't have any idea about what I will do with the code, I would like to be left free to make a decision later in the process, so no GPL. LGPL would be OK though, I suppose. Both wxWidgets and Qt satisfy that requirement (and of course Java and Python do).
0

Share this post


Link to post
Share on other sites
OK, I've given a look to two more options:
-Java: I have been unable to find a good image input/output library supporting common image formats suitable for graphic image manipulation, something similar to FreeImages or DevIL. Any advice on this?
-FLTK for c++ as a GUI toolkit. Any opinion to share about that lib?
0

Share this post


Link to post
Share on other sites
I would recommend Qt. It works on all the desktops and most mobile and embedded platforms. It is skinnable. It has well-supported Python and C++ bindings. It is a collection of libraries, so if all you want is GUI all you use is the GUI and the Core libraries, but other things like threads, networking, OpenGL, XML,multimedia, and others are there and well integrated if you want to use them. It's small, fast, mature, professional, commercially supported, and under active development. It just works.

Qt also has QML, and ECMAScript-like language for contemporary software development style, so you can engage in current development modes as well as legacy C++ ones.
0

Share this post


Link to post
Share on other sites
FLTK definitely satisfies the lightweight part.

Although you should be careful when choosing its version:
http://en.wikipedia.org/wiki/FLTK#Versions

There a multiple examples of using FLTK with OpenGL:
https://www.google.com/search?q=fltk+opengl

As for Python bindings, see:
http://pyfltk.sourceforge.net/
http://www.fltk.org/wiki.php?LC+P139+TC+Q
1

Share this post


Link to post
Share on other sites
Another Qt fan here - yes it is heavyweight but a) you can just link to the libraries you need and b) if you want cross-platform, you'll end up having to find cross-platform alternatives for a lot of stuff other than GUI which Qt provides a plethora of.

Plus I don't think I could ever go back to GUI design in C++ without Qt's signals/slots and metaobject system.
0

Share this post


Link to post
Share on other sites
No recommendations for GTK?

I personally have no experience, only recently looked at it as an option for cross platform C# development ( as it's the preferred gui kit for Mono ); but I figured it would have a proponent or two here.

I only recently started working with Qt, but frankly its bigness is to a degree a strength, as it makes up for the otherwise abysmally lacking C++ standard libraries. When I'm used to working with the .NET Framework libraries, having something like Qt is extremely refreshing.
0

Share this post


Link to post
Share on other sites
I have been finally able to compile a sample application using wxWidgets, That does not mean that I'm over with search, I could give a second look to Qt (thought its size is HUGE) and FLTK.

@Serapth: I've also considered GTK, but as far as I know it is C, not C++, and after several years of C# and Java I don't feel like going back to non OO interfaces.
0

Share this post


Link to post
Share on other sites
I have only used Qt in the past for a single application, so I can not tell to much about it. Although it is pretty big, it comes with all kinds of handy stuff you no longer have to write yourself. It has a nice wiziwig UI designer which supports the events (you can even write the whole application in one of their apps). Advantage is that multi-language has been integrated pretty well, quite easy to learn and lots of libraries cross platform available. Disadvantage I found with Qt was that I had to compile the UI and some other file type everytime it changed.
0

Share this post


Link to post
Share on other sites
I used Qt for several years. On your harddrive it's huge (they use some custom meta-object compiler for some of their code and it's large), but you can select what libraries to link with. It's really slick and works really well.

I had to move away from it though as I had to release a commercial application with it and the license prohibits that unless you purchase it.
Now I'm using wxWidgets. The difference is clear. After a few weeks of usage I run into broken widgets (wxListCtrl not callbacking on selection changes in Win32 but does on Linux, to pick an example..) and I have to work around the broken stuff but overall it works. It's dockable windows features are not as solid, easy to use or nice-looking as Qt's but it's still free. Which is important too. I do not regret my choice.
0

Share this post


Link to post
Share on other sites
+1 for Qt. I've been using Qt for several years and really love it. Not only is the library itself beautifully structured (imho), the documentation is great, too.

[quote name='SymLinked' timestamp='1325622561' post='4899373']
I had to move away from it though as I had to release a commercial application with it and the license prohibits that unless you purchase it.
[/quote]
Actually, Qt can be used under the terms of the LGPL, so you are allowed to release commercial applications with it without buying. The only advantage you get from buying it is the additional support you get and the right to distribute your application with Qt linked statically.
0

Share this post


Link to post
Share on other sites
[quote name='brx' timestamp='1325666478' post='4899513']
+1 for Qt. I've been using Qt for several years and really love it. Not only is the library itself beautifully structured (imho), the documentation is great, too.

[quote name='SymLinked' timestamp='1325622561' post='4899373']
I had to move away from it though as I had to release a commercial application with it and the license prohibits that unless you purchase it.
[/quote]
Actually, Qt can be used under the terms of the LGPL, so you are allowed to release commercial applications with it without buying. The only advantage you get from buying it is the additional support you get and the right to distribute your application with Qt linked statically.
[/quote]

This is true of course, and another reason was that I couldn't use dynamic linking. At the time of posting I didn't seem to be able to edit my post, but now it works so I'll make sure I edit that in that to avoid any confusion. Thanks!

Agreed about their documentation.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0