Advertisement

GTK+ / GDK or SDL?

Started by September 02, 2004 05:29 PM
14 comments, last by kRogue 20 years, 1 month ago
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
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...
Advertisement
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.
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.
learn them both, GTK+ works good for other programs than the game itself(IE the level editor), so all is not lost.
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.

Hero of Allacrost - A free, open-source 2D RPG in development.
Latest release June, 2015 - GameDev annoucement

Advertisement
I hate writing game UIs, so I use gtk, and use GL for graphics intensive stuff.
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.
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
__KB
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 =)

This topic is closed to new replies.

Advertisement