Revision 1225950

Go back to digest for 27th March 2011

Features in Games

Stefan Majewsky committed changes in /trunk/KDE/kdegames/palapeli/src:

Create a new component-based Puzzle class, port Scene to it.

Components are divided into data components (metadata, contents,
creation context) and storage components (archive file, directory,
...). They can be casted into each other (e.g. an archive file can
be unpacked into a directory, then metadata and contents can be read
from there).

The advantage of this method is that all these casts execute in a
inherently multi-threaded runtime environment. (That's basically the
whole task of the Puzzle class.) It will also allow to do more things
with less code in a more consistent way, because complex operations
can be broken up into multiple relatively simple casts.

In the moment, quite some things run in parallel because only the
scene uses the new Puzzle class (as a proof of concept), the collection
and interface still relies on OldPuzzle.

File Changes

Added 6 files
  • /trunk/KDE/kdegames/palapeli/src/file-io
  •   /components-archivestorage.cpp
  •   /components-directorystorage.cpp
  •   /components.h
  •   /puzzle.cpp
  •   /puzzle.h
  •   /puzzle_p.h
Modified 3 files
  • /trunk/KDE/kdegames/palapeli/src
  •   /CMakeLists.txt
  •   /engine/scene.cpp
  •   /engine/scene.h
9 files changed in total