[Kde-games-devel] kbackgammon updates...
Alexander Smirnov
alexander.v.smirnov at gmail.com
Tue Jun 9 17:33:37 CEST 2009
Hello kdegames,
~1 year ago i found that kbackgammon game was not maintained anymore and
i tried to dedicate my free time to it in order to get it back to
kdegames line. I should make a note here, that unfortunately I do not
have much free time, so the progress is not terrific, sorry.
Nevertheless, let me publish what is done.
So, in winter evenings I've been looking to kbackgammon code. There were
many things to do there. I've posted high-level TODO list here a year
ago - even on user's view there are many things what needs to be
implemented or improved! Looks like this game was written in times of
KDE2 and has many things implemented in archaic way. After some time of
struggling with kbackgammon code, after some tears from my eyes I
remembered GoF(or Kent Beck)'s advice: "use composition instead of
inheritance". And i decided... to write the game from very beginning,
but reusing strategic parts of code and algorithms.
Now I have a demo, it's not a complete game. Recently I've put it to
playground/games/backgammon. You can make yourself aware by compiling
and running it (playground/games/backgammon). I tried to use modern
technologies there, such as:
- SVG graphics. I've got theme by stealing :o) it from KReversi. This
is development variant, for release version we'll need professional
artist - I do know we have excellent artists around :)
- SVG Renderer. I used one written by Dmitry Suzdalev for KReversi. I
found it is used(copy/pasted) in several other games. Shouldn't we
extract base class for it and put it somewhere in libkdegames?
- KGame/Kplayer framework... Actually I do not know much details about
this framework and how useful it is. I saw one game(k4win) which uses
it, will try to make something similar. It should be easy to make
local/network human-human games with it, right?
- KConfig... I believe now it is used in modern way.
as for development direction how i see it. The game should have the
following _major_ functionality:
- playing with CPU opponent
- playing on fibs server
- playing human vs human, locally or over network (here is
KGame/KPlayer framework should help)
Taking into account amount of my free time i will not be able to make
them all fast. So I decided to implement only first point from this
list- playing with CPU opponent for version 0.1. Currently we have 2 CPU
backgammon players - first is developed by Daren Sawkey in frames of
kbackgammon(thanks Daren!), the second is GNUBg. GNUBg is much stronger
and it plays as World champion. I've contacted it's developers, and they
gladly agreed to help me reuse their engine in KDE game. But
unfortunately they do not have API, and seems like their engine is much
integrated to their client...We decided to make a sort of API, and
hopefully extract engine from their GUI. This activity will make some
time...
In order to force the release, I'm thinking about using Daren's engine
for version 0.1. Later, when i will be able to compose API for CPU
opponent, I will work with GNUBg guys to reuse their engine... What do
you think about this plan?
Hopefully I've listed all major point in backgammon game development. I
will try to make such updates more frequent and more smaller... I'm
sorry for big text. English is not my mother tongue, so i apologize for
errors too...
Oh, if you have free time and wish to help me - you are welcome! I need
advices and pair of hands with a head to write a code :-D
--
Have a nice day,
-Alexander
More information about the kde-games-devel
mailing list