[Kde-games-devel] KBoard

Paolo Capriotti p.capriotti at gmail.com
Wed Sep 27 16:39:06 CEST 2006


On 9/27/06, mauricio at tabuleiro.com <mauricio at tabuleiro.com> wrote:
> Hi, guys. I just build KBoard (the game, not to be confused with the
> canvas class), and will be taking it on my machine to the Kdegames BoF.
> Two words so far...
>
> VERY NICE

Thank you!
We haven't received any other feedback so far, so your comment is very
appreciated :)

> Maurizio/Paolo: there is one dependancy (for building) not mentioned in
> the INSTALL. Lua needs readline headers (development package).

Oops, we didn't notice that. Anyway, I think that lua can be built
without this dependency (after all, we don't need the interactive
interpreter).

> Also, I am
> not sure about the KDE policy regarding the Boost dependancy, will have to
> ask around.

Yes, I'm eager to know about that, too. I didn't see many KDE
applications using it, but for KBoard I shall say boost is vital. We
use shared_ptr's for pretty much everything, and since the moment we
started using them, many complicated pointer ownership problems simply
disappeared.
I know that there exists a KSharedPtr class in kdelibs, but it seems
that it is not powerful enough for our needs (it lacks a corresponding
weak_ptr implementation, and  the useful enable_shared_from_this is
missing as well).
We only require boost headers, though, so we may simply drop that
dependency and include those headers in the package. I seem to recall
that a KOffice application did this.

> a) Lua is built inline, right? I would love to use Lua as well for other
> games. Just ported the KMahjongg file format to XML, but usin Lua
> configuration files would be way faster and less error-prone.
>
> Can you tell I am a big fan of Lua yet?

lua is built as a static library. We use it for two purposes, atm:
* Theme files: a theme is basically a lua script plus a bunch of
graphic files (either vector or bitmap). This script can use high
level functions to create associations between a string key and an
image.
* Console highlighting: a lua function can be executed by the chess
server console upon a regular expression matching. ATM, only textual
highlighting can be performed, but the possibilities are endless, of
course.

I'm a big fun of lua, too. Its syntax is bendable enough to fit almost
every situation and become a DSL for the most diverse purposes.

> b) Just to confirm: Boost headers only in the building machine, nothing
> required at runtime.

Yes, and we only use smart_ptr, variant and any.

> c) I assume we can get a copyright waiver (and a CC or similar license)
> for all artwork and themes, right?

I hope Maurizio will answer that soon. AFAIK, his own artwork is
licenced under LGPL (but he is prone to change licence, if needed),
while all other themes have been produced from open source chess
software, either directly or using potrace.

Regards,

Paolo Capriotti


More information about the kde-games-devel mailing list