adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Hello Hello


From: Kai Sterker
Subject: Re: [Adonthell-devel] Hello Hello
Date: Thu, 1 May 2003 18:05:41 +0200

On Thu, 01 May 2003 07:18:23 -0700 Mike Avery wrote:

> I'll continue my verbose history here. I see you've become verbose
> when discussing design issues too Kai :)

I noticed that trying to explain things to people helps me a lot to
understand these things myself. I mean there are still problems left
once you start to code, but much less.


> If combat is to occur "on the map" with the same view as exploration
> (without a separation of engines), the principal engine needs access
> to these modifiers regardless of whether the character is in combat,
> or just walking around.  So we have three or four different sources of
> stat/skill/status modifiers:
> 
> 1. Magical enchantment (through several possible means I would
> imagine) 2. Prop (item) attributes
> 3. Potions and items
> 4. Feats?

Yeah, that would cover everything. Wich probably means that all those
have at least part of their code in common as they practically have
equal effects.


> There are I believe a few ways to do this (and probably more that I
> haven't thought of):

[...]

> 1. Store this information "on the character", and standardize change
> methods.  The code that equips an item on the character changes the
> attribute by the desired amount, as you have suggested Kai.

> 2. Determine this information through calculation within a module when
> it is needed.

> 3. Develop Central Character Management Interface.  This module would
> be responsible for equipping, stat changing, determining actuals for
> use by the modules.

> I have a favourite, but I'd like your thoughts or suggestions.

Well, when looking at the three, I'd favour the last one. For one thing,
what I've done with the damage/effect class is sorta going in that
direction. Every item/spell/feat/etc has its effect encapsulated in a
separate class (which would provide the standart interface). The actuals
are then calculated at need.

I think that the current code is currently on the move from #1 (which
was indeed what I suggested first and which is still partly in my mind)
and #3, which seems a pretty clean solution.

What I currently have in mind would consist of (at least) 3 components:

* The item (or spell or feat) that contains the properties. 
* The effect that knows how to apply certain properties to character(s).
* The manager that collects all effects and applies them in a sensible 
  fashion.

There is a strong relation between items and effects, as items with a
certain effect have to provide the properties the effect depends upon.
(There is also the question whether the effect has to visualize itself,
or whether that is left to yet another object. As effects might take
place off-screen, I assume latter.)

There's also a relation between manager and effects, as all effects have
to provide the interface required by the manager.


That is more or less the direction in which I would go if I were to
code the stuff. What's your favourite, Mike?

Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]