• Advertisement
Sign in to follow this  

GTK+ / GDK or SDL?

This topic is 4893 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm reading "Teach Yourself GTK+ Programming in 21 days" right now. I'm learning how to draw primitives with gdk on a gtk window-widget... but the book definitely isn't geared toward games. Anyways, I see that a lot of people on this site are using SDL for games. I'm wondering if I should forget learning GTK+ for games (maybe use it for level editors or something), and write games using SDL.I have SDL 1.2.7 and GTK+ 1.2.10 installed right now. Now, I really like GTK+ but so far I'm not too sure it's suitable for games. What does everyone suggest? - Stephen

Share this post


Link to post
Share on other sites
Advertisement
Nevermind, I've decided on SDL. Sucks because I've spent the last couple of days reading the GTK+ book I just bought (at least it was extremely cheap, and it'll come in handy for non-game apps). Sigh...

Share this post


Link to post
Share on other sites
I probably wouldn't want to use GDK for any graphic intensive games. Although, if done right, you could probably get decent performance out of it. For a Mine Sweeper clone or something GTK+ or GDK would be more than good enough.

Also, you should probably be made aware that GTK+ 1.2.x (and friends) is more-or-less deprecated in favor of GTK+ 2.x (and related libraries). Much of the knowledge (and even a lot of the code) will carry over between versions though.

Share this post


Link to post
Share on other sites
I wasn't aware of that (new version of gtk+), thanks for the heads up! I'm gonna keep learning gtk+, but not for games. I've gone through a little bit of the cone3d SDL tutorial and fortunately it's simple enough that I can learn both at the same time.

Share this post


Link to post
Share on other sites
learn them both, GTK+ works good for other programs than the game itself(IE the level editor), so all is not lost.

Share this post


Link to post
Share on other sites
Quote:
Original post by eedok
learn them both, GTK+ works good for other programs than the game itself(IE the level editor), so all is not lost.


I agreee. I'm using SDL to make my current game and we have a level edtior designed in QT underway.

Share this post


Link to post
Share on other sites
GTK sucks. If you do any serious GUI programming look into wxWidgets or Qt. Qt is probably the best but it's encumbered by a terrible license, whereas wxWidgets is nearly as good and is LGPL.

If you decide to stick with GTK use glade or you may never forgive yourself. Seriously... GTK is really bad.

Share this post


Link to post
Share on other sites
Quote:
Original post by bobstevens
Qt is probably the best but it's encumbered by a terrible license, whereas wxWidgets is nearly as good and is LGPL.


QT is GPL. Is that so terrible? GTK is just fine, too -- especially if you're writing in c, though I'd like to get an idea of what you dislike about it. I'm not partial to any particular gui library - usually if I need buttons I do web stuff or use Tk ;)

KB

Share this post


Link to post
Share on other sites
Quote:
Original post by bobstevens
GTK sucks. If you do any serious GUI programming look into wxWidgets or Qt. Qt is probably the best but it's encumbered by a terrible license, whereas wxWidgets is nearly as good and is LGPL.

If you decide to stick with GTK use glade or you may never forgive yourself. Seriously... GTK is really bad.


I've done both actually, and while Glade is very convenient, writing the code manually isn't hard at all. Qt is fine for non-commercial apps but I really like GTK. I plan on using GTK for a level editor in my next game (after I finish either asteroids or some other classic arcade game other than pong), which will be a class-platform side-scroller of some sort =)

Share this post


Link to post
Share on other sites
Quote:
Original post by kendallemm
Quote:
Original post by bobstevens
Qt is probably the best but it's encumbered by a terrible license, whereas wxWidgets is nearly as good and is LGPL.


QT is GPL. Is that so terrible? GTK is just fine, too -- especially if you're writing in c, though I'd like to get an idea of what you dislike about it. I'm not partial to any particular gui library - usually if I need buttons I do web stuff or use Tk ;)

KB

Qt isn't GPL, it's QPL.

Share this post


Link to post
Share on other sites
Quote:
Original post by eedok
Qt isn't GPL, it's QPL.


it's dual licenced for linux, GPL and QPL. if you write a GPL-application, you can use QT under GPL. That's how KDE was developed.

For small GUIs using GTK and its Python Bindings works great. you can even mix it with C/C++ code (bindings can be generated automatically with SWIG). That way all your GUI code can be scripted in python.

Share this post


Link to post
Share on other sites
yeah QT is just about as easy as windows .net forms programming but it's even better cuz it works on mac,linux and windows unlike windows forms.

Share this post


Link to post
Share on other sites
I haven't used Qt code in a long, long, long time.

Does it have a concept of containers yet?

And GTK definately does not suck.

Share this post


Link to post
Share on other sites
I like fltk too, it is very easy to use and kind of minimilist (which I like) the only thing that bites is using fluid, fltk GUI maker... the source code editing sucks from within fluid... just my opinion though... sometimes the documentation leaves a touch to be deisred too... but is is straigh foward.. I went from knwing nothing to making a half desnt front end in a few days...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement