Draw a GUI without Media

A place to discuss everything about the Orxonox framework.

Moderator: PPS-Leaders

Post Reply
User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Draw a GUI without Media

Post by x3n » Sun Jul 19, 2009 2:21 am

Some time ago, an idea came to my mind:
There may be certain problems on the system of a future Orxonox user, which prevent Orxonox from starting successfully. One of the biggest problem is probably a missing, outdated or wrong placed media directory. Of course this problem reduces if we ship Orxonox as one bundle, but in several packet managers we probably still have to use two packets - one source, one media.

Now how do we tell the user if something went wrong? In the simplest case we just start Orxonox anyway and display the message. But if the media repository is missing, we can't even show a simple CEGUI message. Of course we could display a text error in the console and force the user to change the media path in the orxonox.ini (and probably also delete the corrupted keybindings.ini ^^) but I think we all agree, this sucks. I prefer a simple GUI where the user can enter the path to the media directory (or click it's way through the filemanager) and just hit [ok] and everything works automatically. Additionally a download link to the media repository/package could be displayed if the user didn't loaded it yet.

But how do we draw this GUI?
  • With CEGUI. This however requires a minimal set of media files in the trunk to show text and a simple menu. And, probably even more complicated, it requires Orxonox to start without a media repository - of course no full start, but enough to draw the GUI.
  • With a menu like the Ogre settings when starting Orxonox the first time. Unfortunately the Ogre menu is one big hack (or better said four big hacks - one for each operating system / window manager) and there's really no chance to modify this GUI or expand it for our needs.
  • With tk. Tk is GUI toolkit which is usually shipped together with Tcl. And since we're already using Tcl, it probably wouldn't be a big deal to additionally require Tk. However this would still be an additional library dependency - for just one window (or are there maybe other usages?)
  • With a selfmade text-GUI. We could draw some sort of a GUI into the console, like aptitude does (all we need is one input field - I guess there exist some libraries, but of course this means even more dependencies). However this wouldn't be platform independent because windows user don't have a console.
What are your opinions about this topic? Do we even need such a menu? And if yes, which of the options above is the best? Or do you see another method?
Fabian 'x3n' Landau, Orxonox developer

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Re: Draw a GUI without Media

Post by beni » Sun Jul 19, 2009 7:34 am

I totally see this problem as well and I spent some time thinking about it before. First of all I want to say, that the user maybe does not use a console to start Orxonox. In Ubuntu I start all my programs by clicking on it. That way I don't get any error messages at all. So I don't think we should rely on the console with that.
That makes your fourth solution unfeasible. I also don't really like the idea of needing an additional library. This leaves us with CEGUI as Ogre doesn't seem to be feasible either. I'm not too sure how minimalistic CEGUI will be, since we need quite a bit of data until it runs. Also this would probably force us to change the license on the code package.. That'll be kinda stupid :( So I don't really see a solution, except not really elegant ones.
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Re: Draw a GUI without Media

Post by 1337 » Mon Jul 20, 2009 9:24 am

Yeah, user friendly error handling for the startup phase is something we must deal with inevitably.
And I agree that all four solutions aren't perfect but CEGUI is probably the best to go.
Regarding my intentions to separate some part of the media repository we probably don't need that much more to start up CEGUI. I mean the code binary package will contain everything from the source repository and therefore already most of what is needed to start CEGUI.

I'm just doing some tests to determine the minimal resources to show the main menu. I disabled the following things first:
- InGameConsole
- Debug Overlays
Turns out Ogre doesn't need any media files at all to start (wouldn't have been nice otherwise anyway). But CEGUI does of course require things like fonts, schemes, looknfeel, etc.
Maybe we can squeeze that quite a bit and make a CEGUICore.zip archive to hold only the most important stuff. After the startup we dump it again to avoid duplicate resources.

And I also suggest not to use a full screen menu for this purpose. And maybe can could just tell Ogre to use the default renderer and then configure it in our own GUI sheet ;) Though that may introduce compatibility problems of the default renderer doesn't work.

The issue about the keybindings.ini bugs me quite a lot. There is not much to be done about it, but the problem only arises if either I change something in the input system (which might happen only one more time when I have to fix the KeyBinder, but it probably doesn't) or when we change the console commands.
Both of which should not concern the user anymore, but it's still a pain for the devs..
Hmm, we could assign the files versions ^^
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Re: Draw a GUI without Media

Post by beni » Mon Jul 20, 2009 11:49 am

This sounds fine, but all our media should be under the GPL, so we really don't have any issues with licensing when releasing.
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Re: Draw a GUI without Media

Post by 1337 » Mon Jul 20, 2009 11:58 am

But you can't license a picture under the GPL, right?
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Re: Draw a GUI without Media

Post by beni » Mon Jul 20, 2009 12:24 pm

I checked the internets and especially for multimedia files, the term "open source" seems not to be defined as specifically and the definitions are less widely accepted compared to its source code counterpart. However somehow there are enough programs which do use images and other multimedia files and still get shipped as one package.

The problem is actually the license of the data we use for the GUI. It seems to be creative commons, but at the moment it's a huge mess. We should ask Nowic or somebody else who is more familiar with the open source community.
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Draw a GUI without Media

Post by x3n » Mon Jul 20, 2009 4:42 pm

Maybe we need a gamestate for this sort of error handling? Which doesn't load to much just displays the message? Then we probably wouldn't even have to restart Orxonox afterwards.

About the license: There are many programs licensed under GPL which still use some images, but I wouldn't suggest to release a whole game that way. ;)
However one simple font and a black and white style for cegui doesn't need too much files. It's even possible to create them dynamically in c++. But I don't know much about CEGUI - is it using Ogre material files or just images? We can, of course, create both in c++, we're already doing this for the radar points with arbitrary color.

Edit:
Btw, if it turns out we really CAN'T license an image under GPL, then this image will simply be released under public domain. And all licenses are allowed to include public domain files.
Fabian 'x3n' Landau, Orxonox developer

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Re: Draw a GUI without Media

Post by beni » Mon Jul 20, 2009 6:52 pm

I'm sure there are licenses suitable for the open source packages and multimedia files. for the moment I think the idea to start Ogre totally minimalistic and getting CEGUI running first with very little media seems to be the easiest and most feasible way. One question would be if we would have to restart Ogre to change the resolution for instance or from full screen to windowed mode.
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Re: Draw a GUI without Media

Post by 1337 » Tue Jul 21, 2009 1:07 pm

x3n wrote:Maybe we need a gamestate for this sort of error handling? Which doesn't load to much just displays the message? Then we probably wouldn't even have to restart Orxonox afterwards.
Yep, so I thought. Shouldn't be a big deal with GameStates. But I first want to move the Graphics- and GUIManager to the core in order to fix some inconsistencies. Though this isn't required for the task above.
beni wrote:One question would be if we would have to restart Ogre to change the resolution for instance or from full screen to windowed mode.
Yes you have to (at least in Ogre 1.4, but I think in 1.6 too). Currently this would be done by reloading GSGraphics. But connection to what I said above, this will be moved anyway.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests