On Sat, Dec 03, 2005 at 01:19:42PM +0100, Yann Dirson wrote:
> I have tried to formalize my ideas in the wesnoth project definition
> (see graphincludes/project/wesnoth.pm in the wesnoth tree). Note that
>
> 1. the graph-includes API is quite dirty at this time
>
> 2. graph-includes itself is not currently able to render all the
> groups at this time either
>
> Both issues (as well as the low quality of the current graph-includes
> code, and win32 portability) are things I shall be working on (but
> would gladly accept help ;)
With the release of graph-includes 0.11, the win32 portability has
been addressed (as long as you work on a single drive), and the
rendering of groups using colors has been fixed. The tool should thus
be able to help us much more effectively :)
For a quick reference, graphs of the current core are available at
[1], including PNG's for people without a postscript viewer (but hey,
bitmaps have never been meant as a replacement for vector drawings, go
get a postscript viewer instead ;). Those are:
- a low-level graph (wesnoth-deps.*), with each node representing a
"module" (cpp+hpp files) (technically, taht's level 1, files
themselves being "level 0 groups"), with a background color
representing the wesnoth subsystem (level 3) when I've decided it was
clear enough how to classify it, and an outline color representing
"intermediate groups" (level 2) when meaningful.
- a high-level graph (wesnoth-deps-3.*), which each colored node
representing a subsystem, and each non-colored one modules that have
not been assigned to a subsystem (or, occasionally, a subsystem that
has not been assigned a color ;)
More details on what belongs to whom is to be found in
graphincludes/project/wesnoth.pm in SVN.
The graph-includes tool is available from [2], or from Debian unstable.
What now ?, I hear some ask. Well, first of all, not all those
modules have been assigned to a subsystem (see high-level graph).
Some of them will be fairly obvious to classify, others won't.
It would also be useful to review the list of subsystems I have
listed. Here they are - I just updated the wesnoth.pm file to list
them as a reference for the current file. The basic design decision
was to create those groups in such a way that we can draw clear
dependencies between them.
# core: low-level stuff, non-graphical plumbing
# graphics: low-level graphical stuff, not part of the gameplay
# uicore: building blocks for the GUI, not gameplay-related
# ui: game-related GUI elements (eg. usable in editor)
# gameclient: modules specific to the gameclient (ie. not for server
# or editor)
# those subsystems living in their own directory
-> campaign_server, editor, server, tools
Maybe the distinction between "graphics" and "uicore" will not appear
very clearly. I would qualify "graphics" as somewhat "independant
from the gui", ie. those things that get drawn on the main (and mini-)
map, and could (hopefully rather easily) be reused with a completely
different GUI system (yes, I told you, that's not very clear ;)
Similarly, in "core" there are both things not directly related to the
game (array, thread, but even A* and possibly even WML stuff, which,
although hi-level, are not completely part of what makes the game what
it is, but merely plumbing), and things that are directly part of the
gameplay (units, races). And on the other end, "ai" is (possibly
wrongly [3]) classified in the "gameclient" subsystem. Maybe we
should split "core" in 2 - for names, I'm thinking about low-level
"plumbing" and game-level "core".
Does it make sense to anyone else ? What do you think of the whole
issue ?
[1] http://ydirson.free.fr/soft/wesnoth/graphs/
[2] http://ydirson.free.fr/soft/graph-includes/
[3] AI, as most of the game engine is currently in the client, which
allows cheating with a patched client, eg. by showing all units, and
possibly private data like income/gold/etc. An old dream of mine is
to see one day the birth of a non-dumb server acting as a "game
master".
--
Yann Dirson <[EMAIL PROTECTED]> |
Debian-related: <[EMAIL PROTECTED]> | Support Debian GNU/Linux:
| Freedom, Power, Stability, Gratis
http://ydirson.free.fr/ | Check <http://www.debian.org/>