[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-games-devel
Subject:    Re: [Kde-games-devel] libkdegames
From:       Marc Mutz <Marc.Mutz () uni-bielefeld ! de>
Date:       2001-03-19 16:18:18
[Download RAW message or body]

Andreas Beckermann wrote:
> 
<snip>
> A simple card game like KPoker can already written with libkdegames
> See below...

I started working on an implementation of "Ebb and Flood", called
KTides. I just wanted to evaluate if it would make sense to use
libkdegames instead of my own classes. The game is not playable yet for
lack of player classes, though all the state processing has been done.

The quick rules: You have two players, one plays flood and one plays
ebb. Everyone gets a deck of 25 card, labeled A1,...,A5,B1,...,E5. The
field is a 5x5 grid on which the cards can be placed. The players on
opposite edges of the field. The three positions in the bottom-right
(w.r.t to each player) corner are the player's source field and the
top-left three positions are the target area.
  In each round, you first draw a card and place it in one of the three
source fields. Then you check whether there are two vertically or
horizontically neighboured cards that share the same number or letter.
If there is such a pair, you can move one of the two cards up or left,
depending on whether the pair is inside a common row or column, resp.
  This way, every player tries to move as many as possible of his own
cards into his target area while trying to stop the opponent of doing
it's job.

<snip>
> > What are all classes for?
> KCard an attempt to create a common class for cards, as used by lskat, kpat,
> kpoker, ... I will probably remove this one from libkdegames as I don't think
> I can place enough useful stiff in it. I created it because I wanted to make
> all cards resizable - but that won't be very difficult separately for every
> game...

I made a CardDeck class that can only draw(), shuffle() and reset().
This suffices for my needs. It's a simple application of a QValueStack.

> KGame: An attempt to create a game class for KDE. It manages network games,
> player creation, ... I just cannot enumerate all possibilities - just look at
> the code. This is the most important class of kdenonbeta/libkdegames and
> should be ready (more or less). The only part which must be done is to create
> a) documentation and b) a game which really uses it so that we can see if all
> the stuff is working in reality. I'm currently doing this for
> kdenonbeta/kpoker

Once the documentation is there (or someone helps me otherwise), I'd
like to use this calls in KTides. Of course, only if it makes sense to
do so.

> KPlayer: The players used in KGame. Just sub-class this and create your own
> player. You will have to connect to KGame::signalCreatePlayer if you subcass
> this!

I fiddles around with notifying players about what they can do using the
signal/slot mechanism, but I has been dawning on me for some time that
I'd have to use somthing like a server process and client processes.
How do KPlayer's communicate with their KGame?

<snip>
> KGameIO: This one lacks documentation. I'm sure Martin can explain much
> better what it does. It is what it name implies: it manages the input/ouput
> (of a player): you will e.g. plug a KGameKeyIO into a player in KAsteroids -
> the keys you push are now transeferred as "player moves" to the clients. You
> don't have to care about key events with this one. You can additionally plug
> a KGameMouseIO into the same player and you will be able to player the same
> game with both, keyboard and mouse! I think this is just cool and a great
> idea of Martin :-)))

Sounds cool. My classes represent the Document/View separation used
elsewhere in KDE, but making this network-transparent would be pure
pain, I guess.

So, do you think that the game with the above rules could be implemented
using libkdegames as is?

If you'd like more information about the game (and speak German, don't
know if they have an English section), visit www.adlung-spiele.de, the
game is called "Ebbe & Flut".

Thanks,
Marc

--
Marc Mutz <Marc@Mutz.com>     http://EncryptionHOWTO.sourceforge.net/
University of Bielefeld, Dep. of Mathematics / Dep. of Physics

PGP-keyID's:   0xd46ce9ab (RSA), 0x7ae55b9e (DSS/DH)


_______________________________________________
Kde-games-devel mailing list
Kde-games-devel@master.kde.org
http://master.kde.org/mailman/listinfo/kde-games-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic