adonthell-devel
[Top][All Lists]
Advanced

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

[Adonthell-devel] Re: Some open issues


From: Kai Sterker
Subject: [Adonthell-devel] Re: Some open issues
Date: Thu, 24 Feb 2011 23:25:12 +0100

On Thu, Feb 24, 2011 at 7:16 PM, Kai Sterker <address@hidden> wrote:

> Working on number 1 right now. The others are:

Done and checked in. Shadow is now rendered correctly on composite
objects. Fell into a bit of a trap there first, as I wanted to assign
the shadow pieces to the individual object parts. Only when the result
was really weird, I remembered that there's only one instance of each
object (and object part). So shadow had to stay in chunk_info but is
now kept in a hash_map to associate it with the proper object part.

One subtle change I made is to no longer render a shadow while the
character is below the surface onto which the shadow is cast. If this
looks strange, it can be easily reverted, however.


> [2] When walking, the round shadow is clipped on the side the
> character is facing and more so when walking faster. Since shadow
> position is calculated after the character move, I'm not sure what
> might cause this. But somewhere there must be a bounding box that's
> offset by the character's velocity and causes this effect.

Figured out the cause while working on the issue above. Also
implemented a fix, but its not perfect yet. The problem is in
shadow::reset, which is called before calculating a new frame. It sets
the area of the shadow and positions it at the characters position
before the movement. So for now I passed in the velocity and use that
to offset the position. Works great when the character actually
completes the move, but still fails if an obstacle prevents the
character from moving the whole way. I guess a better fix would be to
split the reset method into two. One that clears the old shadow at the
beginning of the frame and a second method that inits the shadow
position after the move has been completed.


Haven't looked at number three yet. But I also found another thing:
Initially, no shadow is rendered. I assume it's because we never
actually call moving::update_position as long as a character is not
moving. Have to see if this can be done as part of initialization.


Anyway, got the feeling that this has been a really productive evening
:-). Hope I can keep it up over the weekend.

Kai



reply via email to

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