Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2000:
[Freeciv-Dev] Re: idea: a more portable and more beautiful client inter

[Freeciv-Dev] Re: idea: a more portable and more beautiful client inter

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: idea: a more portable and more beautiful client interface
From: Marc Strous <m.strous@xxxxxxxxxxx>
Date: Wed, 08 Nov 2000 14:20:04 +0100

>       Eurgh. What do you want to do that for? The window manager takes
>care of that, surely... You can give it hints with gtk_window_set_position
i'm not familiar with gtk, so i try to learn from the code freeciv
contains. it doesn't look impossible but these were the problems i ran in too:
since you are probably familiar with gtk, maybe you can help

my aim is to make combat possible between squads (6-9) of units instead of
single units only. i've got most of the code in place but am now working on
a graphic representation: i intended to pop up a window with a small
minimap with the fighting units of both sides on this map and perhaps some
info on attackers, defenders and bonuses.
the "example window" that contains a minimap is the city display, but this
contains an awful lot of difficult to understand code with boxes, vboxes,
hboxes and different manipulations of these. the
gtk_window_set_(relative_)position is used a couple of times but always
with a reference to the cursor position or at a fixed place (i.e. ,10,10).
i want it to pop up were the units are fighting, which is often not at the
cursor position.

apart from my question i also have some comments to some of your additional
>       I can see a few disadvantages with this approach (in addition to
>those you give):-
>1. It would necessitate writing your own widget set from scratch - and why
>   bother, when the GTK/Windows/BeOS/MacOS/whatever people have already
>   done that for you?
our window set can be much simpler than your examples, they can be bitmaps,
one bitmap for every complex window and a few multipurpose ones. these
bitmaps can be generated in a good vector graphics program such as adobe
illustrator. That means that if change is desired, the bitmaps are pretty
easy to modify.

>2. X doesn't much like mucking around with big bitmaps, since you have to
>   keep sending them back and forth between client and server (I believe)
X can scroll flickerless, so it should be possible to use that code to
refresh the full client bitmap a couple of times per second.

>3. You'd be making the program harder to use by forcing the user to learn
>   a new user interface for Freeciv - why can't they just use the same UI
>   they use for 90% of other graphical applications?
Actually, i did not look into the dedicated code for platforms except gtk -
is the code for Xaw, MacOS, windows etc almost the same? If not, you may be
wrong. There are many window/widget-sets around and not everybody is
familiar with the ones freeciv uses and that problem is going to get worse
as more and more widgetsets are released and the freeciv ones will get less
and less used. Probably even the use of c (rather than c++) scares more
potential people away now than a couple of years ago. To maintain code for
many different platforms, you need at least one person per
platform/window-widget set to solve the problems or make updates. Will the
freeciv community always harbour those? and how many game-improvements do
not make it because somebody needs to make the effort to learn? Finally,
our code can be simple because we don't need all the complexity of a
full-on windows manager, and we can make it easily understandable wich is
not the case for all window managers now.

>4. You'd need a _lot_ of code to get things working properly - look at
>   Mozilla for an example!
>5. Your idea of "beautiful" almost certainly doesn't match that of a lot
>   of other people...
>6. If you use your own widgets, you break themes.
i agree with all remaining points... but haven't given up the idea yet (;.

>BTW, there's no restriction on shape of windows in X; you don't _have_ to
>use "square shapes, standard fonts and windows".
>       My suggestion would be to go for a cross-platform development
>environment instead, like wxWindows, which uses native widgets on each
>platform; I believe there's even a MacOS and BeOS port of it
>available nowadays.
>       Ben
>"So maybe you're a 4 horse engine with a power drive"

[Prev in Thread] Current Thread [Next in Thread]