[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Adonthell-devel] Thoughts on character implementation
From: |
Alexandre Courbot |
Subject: |
Re: [Adonthell-devel] Thoughts on character implementation |
Date: |
08 Mar 2003 15:43:58 +0100 |
> Well, since we're dealing with a scripting language, and since different
> character types would only differ marginally (some had more attributes
> than others), I wanted to go without inheritance. Instead, the basic
> character class would be modified at runtime to hold exactly those
> attributes the desired character needs. This means a little less
> work, and has basically the same effect that inheritance would have.
>
> The attributes a certain character has would be defined in a data file
> (together with the maximum rank of each attribute, and how many points
> it takes to gain a rank in that attribute). When instanciating a
> character, one would look what "type" it is, read what attributes that
> tyoe has, and finally load the actual character data.
Well, yes - but what are the advantages of this over defining a
hierarchy of Python classes? Wouldn't it require more design (we'd have
to load the attributes from a data file at construction time, while the
Python classes would have everything inside them already)? Why would we
use a different approach from the one we have used for the items? I'm
sure you have good reasons to prefer that, but I simply can't see them!
:)
> As both maximum ranks and points to gain a rank would be needed
> throughout the game, each type description (or template) would be loaded
> once at the start of the game and kept in a global storage. That'll make
> access quite fast. At least faster than reading the info from a file
> each time it is needed.
> I hadn't too many thoughts about that yet, but I think it would be
> required to properly generate characters randomly. Again, all the
> premade characters and boss monsters will have their items assigned
> beforehand, of course.
True. The random NPCs have to be taken into account since the beginning
of the design.
Oh, offtopic, but I had a read at the scripting guide and the engine
architecture documentations - they are *great*. The figures are very
well done, I wonder what you have used/how you have done them. I should
be able to add my part to them soon.
Alex.
--
http://www.gnurou.org