[Kde-games-devel] Kapman conception : need advices !
Fela Winkelmolen
fela.kde at gmail.com
Tue Nov 6 19:26:50 CET 2007
On Tuesday 06 November 2007, 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 ?
I don't think the GameManager has to contain the view, usually it's the
MainWindow that contains both the scene and the view and links them together:
it creates a scene (in this case a GameManager object) and passes it as an
argument of the constructor of the QGraphicsView which is likely it's main
widget, or do you want the GameManager to be the main window too? That may be
a bit to much for one single Class...
Another approach, which would lead to more modularity, but may also cause more
complexity is to also separate the game engine from the scene, I'm not sure I
would advice that tough.
The association between GameManager and Labyrinth is a composition, right?
Is there any particular reason Item objects may be associated with no Cell?
Also note that Characters can be in between cells, not sure how you want to
handle that, but having a character always associated with one Cell may not
be the best approach.
I hope I've been helpfull =)
good luck!
- Fela
>
> Thanks !
>
> Regards.
>
> -----------------------
> The KapTeam !
More information about the kde-games-devel
mailing list