GUI again--mostly musing

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

GUI again--mostly musing

Post by Lucifer »

Ok, so I started rewriting my alarm clock to use pyQt instead of wxPython and I'm finding it really sweet. Of course, I'm using pyQt3 because pyQt4 isn't ready yet. I'm thinking it would be awfully nice to rewrite Acme to use pyQt as well because most of acme's interface is standard GUI fodder, file selectors, toolbars, menus, etc.

It would be nice if Acme were written in C++ and could be included as an optional 4th program built in the Armagetronad module. Not a big deal, and there's plenty of argument that can be had on both sides of the fence.

So this leads me to using Qt for our GUI in-game. Before getting into that, I thought it would be worthwhile to make a list of widgets we'll need, widgets we might like, and so forth.

Ingame widgets:
* we already have menus that overlay the game itself. I'm inclined to keep them that way, i.e. they shouldn't become new windows but should instead remain in armagetron's windows.

Out-of-game widgets:
* Application preferences
* Moviepack selector
* Generic file selector (for things like constructing a playlist, picking individual files for various purposes such as maps, etc)
* Sound layout selector (for lack of a better word)
* Other skin-type layouts, cockpit, gui theme, etc. One for each. Maybe one that encapsulates all
* Player preferences
* Player profile selector
* Plyer profile editor
* Cycle color picker
* Cycle model picker
* Cycle texture picker
* A neat little widget that shows visually what your cycle looks like as you go
* Instant chat input
* Player keybinds
* Server browser
* Server bookmarks (preferably using another server browser widget to ping servers marked)
* Game settings (cycle physics, game rules, etc)

It doesn't look to me like there's any great need to integrate with desktops inside the gui itself. Basically I think we've already talked about most of the desktop integration we're wanting, more might present itself later.

Most of these widgets fall into the Custom category. So most/all gui toolkits we use will still require us to write these widgets ourselves, using their framework. Most of them also, coincidentally, are related enough to generic widgets that all gui toolkits support that we can significantly decrease development time and work by inheriting from the toolkit and customizing from there.

So, Qt supports it's own themes that can be configured per application. If we used Qt, we already get GUI themes. We optionally get to let the user pick "Desktop Environment theme" and it'll use their KDE theme if available. I think that will work in Windows and Mac OS X as well, but don't know for sure. We get translation, and we get a few other goodies. Having worked with the API, at least the bloated one that is Qt3, I can say it's pretty sleek. It's so object-oriented and so totally C++ that I wonder why Luke likes it so much. :) Qt Designer really does speed up development without sacrificing real programming, which was always my hangup on it. Compared to Delphi, where the point and click programming pretty much pushed you into really bad design.

I don't know if Qt is right for us, to be honest. There are a number of issues that come to mind, such as "where is the game loop?", and "Can we override Qt widgets and then stick them in a full screen OpenGL view?" I presume that stuff is handled, Qt is supposed to be good for games, although not necessarily great.

I'd like Acme to have the same dependencies as the core game, and Luke drove yet another nail into its coffin when he reported 11fps. The same work that Acme needs to get that fps up to where the thing is useable is also required in any custom widget set we write. So there's a lesson in there in custom widget sets, a lesson that once learned took me into fooling with Qt.

OTOH, I think we've always dismissed Qt without giving it any solid consideration as a GUI set. Seems like most of us Linux boys around here are KDE users anyway, so it's not like we don't know what Qt looks and feels like. We do, in fact.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

We'd have to find out about the opengl integration bit really. If that works with the full screen and everything then it might not be so bad, but if it doesn't work... I wouldn't be in favour of it at all I think.
Image
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

http://doc.trolltech.com/4.0/qtopengl.html

Looks like the overlay stuff can integrate whatever QT element we need on top of OpenGL rendering. The downside: it must be supported in hardware and software and I can't say how much this will affect our supported hardware list which, ATM, is as big as any 3d game can hope for. Well, we can fallback to out-of-window menus for unsupported systems.

I see the merit of getting immediate file selector dialogs and stuff for free, and I see how picking the same library for tools and the game can save us time. But QT is *FAT*, and we'd have to include it in the Windows builds. I'd much prefer something leaner, like PUILib.
Luke-Jr
Dr Z Level
Posts: 2246
Joined: Sun Mar 20, 2005 4:03 pm
Location: IM: [email protected]

Post by Luke-Jr »

I think hardware support is a good thing to keep, so my vote goes for keeping as much tools logically separate from the game as we can (and thus Qt-based) and writing the stuff that needs to be in the game the way we have been.
Post Reply