[Kde-games-devel] Kapman conception : need advices !

Kleag kleag at free.fr
Wed Nov 7 21:33:17 CET 2007


Hello,

I agree with all what has been said by the others:
- it's important to separate at most the model and the presentation classes ;
- you should not link the animated elements to a cell. In fact, I'm not sure 
that the concept of cell is a good idea, except maybe for the description of 
the skin. Instead, I would propose to use a kind of mask, generated from the 
skin description, thus you can test for each scene position if it is in a wall 
or not. 

I don't want to say that it is the best implementation possible (there is a 
way too much code in the KGameWindow class, etc.) but you could have a look at 
the organisation of KsirK. It tries to separate the view/model as stated above 
and by others ; it uses the mask technique and, last but not least, it fully 
use the libkdegames/kgame library which gives you a lot of already coded 
things (game, player, network, etc.).

Hope this helps.

Regards,

Kleag
On Tuesday 06 November 2007 13:52:29 Thomas Gallinari wrote:
> Hello all !
>
> We are the students from the IUP ISI in Toulouse working on the new project
> Kapman, a Pacman-like for KDE, and we need your help since we are beginners
> in Qt game development.
>
> We just had a brainstorming about the Kapman architecture. According to
> what we understood about the Qt Graphics View framework, we obtained the
> class diagram joined to this mail.
>
> The GameManager class will create all the objects and manage the game loop,
> display,... This class inherits from QGraphicsScene and it contains a
> QGraphicsView to display the game. The Game class is static and will
> contain all the data of a Kapman game (score, current level, lives,...) The
> GameManager class will contain a Labyrinth, which itself will contain the
> Cells. A Cell is a wall or is empty, in
>  this case it can contain a Character (Kapman or Ghost) and an Item (Pill,
> Energyzer or Bonus).
>
> What do you think about it ?
>
> Thanks !
>
> Regards.
>
> -----------------------
> The KapTeam !
>
>
>
>
>
>
>      
> ___________________________________________________________________________
>__ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo!
> Mail



-- 
KsirK - a turn-based strategy game for KDE
http://gna.org/projects/ksirk

KGraphViewer - a GraphViz dot graphs viewer
http://extragear.kde.org/apps/kgraphviewer



More information about the kde-games-devel mailing list