adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] Character thoughts


From: Alexandre Courbot
Subject: Re: [Adonthell-devel] Character thoughts
Date: 02 Mar 2003 17:57:29 +0100

> Seeing how the item implementation works pretty well, I'd suggest
> something similar for characters. All the basic character stuff mainly
> required by the engine would be kept on C++ side. Everything else
> (mainly stats and other game rule related things) would go into a Python
> character class. That way, characters will be as flexible as everything
> else. Certainly more flexible than the current list of (string, int)
> pairs for character attributes.

Yeap. There will be many similarities between characters and items
anyway.

> Obviously, each character would have an inventory for carrying items
> around. The inventory implementation itself is very flexible regarding
> any inventory rules. That is, it does not place any constraints on the
> amount or weight a character can carry. If we want any limitations, they
> have to be implemented in the Python character class or the inventory
> GUI, I assume. Again, this gives us a lot of flexibility.

I agree. Using inheritance for that would be quite appropriate I think.

> My first approach to make character behaviour more life-like was making
> schedules modular. That certainly makes them easier to write and more
> reusable too, but it does not necessarily improve character behaviour.
> Right now I believe that "natural" behaviour involves (and requires)
> interaction. That is, characters should not simply act completely on
> their own, but should react to other characters and events.
> 
> For example, Orloth should not walk randomly up to tables to place or
> pick up mugs. Characters that happen to be at the table should "call"
> him instead. Basically, that means a character's schedule must be
> accessible from other characters, so that they can launch certain
> activities. Of course, characters would also have their own "will", so
> that they do stuff although nobody interacts with them at the moment.
> 
> I think figuring out such interactions and implementing them will not be
> that hard. Often, the resulting actions won't be very complex. However,
> the more characters interact with each other, the more complex (and
> unpredictable) the outcome.

Well, seeing how well Python can interact with its types, I guess we
could do it a nice way. Say, getting inspiration from
components-oriented programming: it is possible the get the instance of
a character, and this instance offers a public API others can call, like
"gimme_more_ale" or something like that :) We could directly use Python
methods for that. As they are Python objects, it would make things way
easier.

> A character schedule itself would be composed of a number of "calls" the
> character responds to. Those might of course initiate other actions of
> other characters, if possible. That way a single call might indirectly
> influence other characters too, and perhaps even the initial sender.
> And it would have a mostly unique section, where information required by
> those actions could be defined.
> 
> Actions could be triggered not only by characters, but also by events,
> for example at a certain time.

Sounds very good. Oh my, where are we going? :)

I also went through your more recent mails. Well, nothing to add - I
wouldn't have had all these great ideas myself! ;)

Alex.
-- 
http://www.gnurou.org





reply via email to

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