<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Le 14/02/2014 14:12, Inge Wallin a
      écrit :<br>
    </div>
    <blockquote cite="mid:12109292.dM7sL4g0p1@linux-da92.site"
      type="cite">
      <meta name="qrichtext" content="1">
      <style type="text/css">
p, li { white-space: pre-wrap; }
</style>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">On Friday, February 14, 2014 00:28:38 Bruno
        Coudoin wrote:</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> Le 13/02/2014 23:17, Aaron J. Seigo a
        écrit :</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> > On Thursday, February 13, 2014
        22:54:12 Bruno Coudoin wrote:</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> >> Anyway another approach is
        needed here for the new version.</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> > </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> > Knights, a chess program written
        with KDE libraries, has an XBoardProtocol</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> > class (GPLv2+ licensed) that speaks
        to gnuchess. It does this over</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> > stdout/stderr which isn’t awesome
        as you note, but it exists and could</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> > perhaps be shared.</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> > </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> > It is part of a larger set of
        classes in the src/proto/ directory. The</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> > classes in proto/ look fairly well
        self-contained (a single QObject class</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> > hierarchy) so could be turned into
        a library with a little bit of effort.</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> > Perhaps Knights and Gcompris could
        share this bit of code to at least</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> > share the load of breakage?</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> > </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> > The project page for Knights is
        here:</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> >
        <a class="moz-txt-link-freetext" href="https://projects.kde.org/projects/extragear/games/knights">https://projects.kde.org/projects/extragear/games/knights</a></p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> Hi,</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> Thanks for the information. Depending on
        an external binary proved to be</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> a mess for the portability between the
        distro and annoying extra work on</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> Windows and MacOSX. To see if GCompris
        works after a port all I do is</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> check if the chess activity works
        because it is more than often broken.</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> Now if we add the tablets into the mix,
        I am much more reluctant to rely</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> on an external binary. An option would
        be to see if we cannot find and</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> integrate a small chess engine. One
        important feature I also like to</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">> have is a weak chess engine that the
        children can beat (and myself).</p>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">I am currently working on a board game AI
        library for kde games. The only thing you have to do to use it
        is to write a class representing a chess position, a move
        generator and an evaluation function and plug it in. (...and
        wait for me to finish, which should take a month or two) [1]</p>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">Those classes should be pretty easy to get
        from another chess engine, especially if weakness is more
        important than strength. :)</p>
    </blockquote>
    <br>
    Hi, I just love this approach. We do not rely on external
    dependencies, we can use the same concept for other games beside
    chess and we can make it weak.<br>
    <br>
    I have not looked at it and this is perhaps another topic but will
    it be Android compatible?<br>
    <br>
    <blockquote cite="mid:12109292.dM7sL4g0p1@linux-da92.site"
      type="cite">
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">Btw, this is KDE and we love plugins. Do you
        have a plugin API for GCompris? If not, that would even make it
        possible for 3rd parties to create activites...</p>
    </blockquote>
    <br>
    Yes, the Gtk version of GCompris is plugin based. Each activity is a
    plugin. In the Qt Quick prototype I took a similar approach. You can
    see the list of current activities:<br>
    <a class="moz-txt-link-freetext" href="https://github.com/bdoin/GCompris-qt/tree/master/src/activities">https://github.com/bdoin/GCompris-qt/tree/master/src/activities</a><br>
    <br>
    Each one follow a similar structure, a file ActivityInfo.qml which
    describes the plugin and its QML entry point. At startup, the core
    loads the menu plugin first that itself display the list of activity
    plugins to the user.<br>
    <br>
    So yes in GCompris it is very important to make it easy to create a
    new activity, this is how we reached 140 activities while keeping
    the code easy to maintain. We have a core which exposes common
    features and ensure the coherency of the whole application.<br>
    <br>
    Bruno.<br>
  </body>
</html>