adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] Composite map objects


From: Kai Sterker
Subject: Re: [Adonthell-devel] Composite map objects
Date: Tue, 23 Mar 2010 19:15:40 +0100

On Tue, Mar 23, 2010 at 5:20 AM, Tyler Nielsen <address@hidden> wrote:

> Well, I've spent some time looking at the issue, and here is what I've
> found.  I think there are two problems (which may be related).  The first is
> that there is no shadow on some (most?) of the tiles when you are over
> them.

Yeah, I noticed that too, now that you mention it. I disregarded it as
a minor problem, however. Finding how it is related to the tree being
split is a good catch. You've probably seen, that the chunk class has
a debug method that generates a .dot file which can be processed with
graphviz' dot tool to see how the tree looks like. Maybe that helps in
this case.


> I was hoping that that would solve the other problem of 'falling through the
> stairs'.  I haven't looked much at this one, other than the bounding box
> values seemed reasonable.  I'm not sure at all that they 'line up' so
> something shouldn't fall through.

I'm wondering about that. The symptom in mapedit seems to indicate the
the bbox of the stairs is not correct. mapedit does not have a render
loop, but instead redraws just the space covered by an object, which
is determined through it's bounding box. And if I place a staircase
object onto the map, it does not show up at all, until I cause a full
redraw (by temporarily obscuring mapedit with another window).

I believe what happens it that the offset of the individual parts of
the stairs is not taken into account (properly) when generating the
bbox. It's composed of 16 pieces, each with a size of 16x48x8. These
are offset in such a way that the staircase comes out. I suspect this
results in an overall bbox of the same size, at who knows which offset
instead of a bbox that incorporates all the part of the staircase. I
haven't looked at the it in a debugger, however, so my guess might be
wrong.


> I'm done for the night, but my plan tomorrow is to continue looking for the
> real fix to chunk::find_chunks.  If you think there might be some amount of
> duplicate work let me know and I'll find something else instead.

Please go ahead. If you like you can also continue to look at the
'falling through stairs' issue, as I believe the two problems are
different. (Wondering if the shadow stuff uses a find_object that's
not used elsewhere, or with flags not used elsewhere, which could
explain why we don't fall through the ground everywhere).

I've got more stuff to look at, more gfx and models to create, so I'll
be busy too without getting in the way :-).

Kai




reply via email to

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