[Top][All Lists]

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

[Adonthell-devel] Re: Ancient treasures (?) and more ...

From: Kai Sterker
Subject: [Adonthell-devel] Re: Ancient treasures (?) and more ...
Date: Thu, 26 Jun 2008 13:37:36 +0200

On Mon, Jun 16, 2008 at 10:34 PM, Kai Sterker <address@hidden> wrote:

I've finally started coding all the above. So far I've removed the
thing_manager from area and replaced it with the entity classes:

> * just as with the current code, an area keeps a list of entities that
> are part of the map. Each entity has a 1:1 relation to a placeable.
> Normally, entities are anonymous (i.e. a ground tile) and there is no
> way to retrieve them from the map. There are also unique_entities that
> represent characters, doors, items, etc.. They have an Id that
> corresponds to an Id of a RPG entity (character, item, etc.).

I do hope that I have taken into account all possibilities. The new code allows

* Anonymous entities (ground, most scenery) that can not be retrieved
and have a 1:1 relation with placeable. I.e. each type of ground tile
will be instantiated exactly once, no matter how often it will appear
on the map.
* Named entities (characters, doors, traps, ...) have a 1:1 relation
between an Id and an entity. So each Id refers to a distinct entity,
represented by a distinct placeable. Even if multiple characters (or
doors) use the same model and graphics, they will be distinct so that
each can have a state independent of the others.
* Finally, multiple named entities (mostly items) can share the same
underlying model/graphics. Consider for example a sword. Multiple
swords can differ in their state (different level of wear, different
runes inscribed, poisoned) while still being able to use the same
graphical representation when placed on the map.

The area class is also acting as a factory to create scenery objects,
characters and items (and in maybe more in the future), so it might be
worth to generalize the event factory code (events::types) to use here
as well. For now a switch-construct is used that has a case for each
placeable type.

> Again, any suggestions are welcome. As is help with the actual
> implementation. I am near a point where I can dive back into coding,
> though, with a clear idea of what to do, so I should be fine.

Which doesn't mean that I wouldn't be glad about some help. I realize
that there are only 2 more months left, if we want to keep up with a
half-year release cycle (which is slow enough as it is).

> P.S: Tyler, this will involve some changes to the animation class ...
> should I take the opportunity and finally include Rians surface_cache
> patches? Or should I leave that to you?

I have more or less done that yesterday evening. As I am about to
implement the animation class changes, I took the opportunity and
brought the surface_cacher code up to our coding style. It'll be part
of the next commit. Not sure when this will happen, though, as I have
broken worldtest for good and I don't want to repair it right now. I'd
rather wait a bit until the map can be actually loaded from a file and
fix it then.

So this will be my path forward:

1) Make changes to the animation class
2) Get rid of *_with_gfx stuff, which will affect loading of models
and their gfx, which will happen separately in future.
3) Implement loading of map, fixing worldtest
4) Finish rendering implementation

I would imagine that this is all I can do before September. But it
should provide a solid base for the world stuff, so that I can
concentrate on editors in the next period.

However, I am hoping that James will be able to get some gfx done and
Rian will have parts of the widget set working, so that alpha3 will
show some visible progress as well and not only changes under the hood


reply via email to

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