Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: [Kde-games-devel] libadvkdegames (was qt)
Home

[Freeciv-Dev] Re: [Kde-games-devel] libadvkdegames (was qt)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: kde-games-devel@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Kde-games-devel] libadvkdegames (was qt)
From: Philippe FREMY <P.FREMY@xxxxxxxxxxxxxx>
Date: Mon, 31 Dec 2001 15:59:10 +0100
Reply-to: kde-games-devel@xxxxxxxxxxxx

> It's not just a new freeciv client. A whole new architecture. Fully
> object-oriented Server, Client and Ai, including scriptable ai, for
> example. The current C architecture really gets to the limit 
> there, IMO, although not everyone on the freeciv mailing list will agree
with me
> here. 

A complete rewrite ? My god! It is true that Freeciv's code looks like a
mess. I would cite that (along  with gtk apps) as a typical example of how
ugly c-code can look like when you push the object model without objects.

> Someting else: Is scripting easy in Qt? Have you done it in 
> Boson? Would you recommend PyQt? Or write the whole app in PyQt? As this 
> is one of the main considerations for a new architecture, I'd be
interested 
> in this part specifically.

1. Scripting with Qt ?
I would say it is easy. Because QWidget is a QObject, you can browse the
entire widgets and issue various actions or read various properties very
easily, thank to Q_PROPERTY.

If you go with PyQt, it will be easier than with C++.

If you choose KDE, you get DCOP. You are getting remote scriptability.
Launch a KDE application then launch kdcop and see what you get! Look also
at KSpy (in kdesdk).

2. The whole app in PyQt ?
PyQt rocks! However, python is slow. For an application of the scope of
freeciv, I am afraid that python might slows down things too much. But this
is not sure. You would have to test if is works fine before actually going
with it. You can have a look at kltoski (http://klotski.berlios.de/klotski
:-)) ) for an example of Canvas in PyQt. My feeling is that it wasn't very
quick or responsive, but I couldn't say if it because of Qt only or of PyQt
in a whole.

Ask on the PyQt mailing list, they will certainly have a better response.

Considering it again, I think a generic framework makes more sense in pure
Qt than in PyQt. You can always wrap it later with PyQt.

        regards,

        Philippe





_______________________________________________
kde-games-devel mailing list
kde-games-devel@xxxxxxxxxxxx
http://mail.kde.org/mailman/listinfo/kde-games-devel



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