[Top][All Lists]

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

Re: [Adonthell-devel] New map engine first draft commited

From: Kai Sterker
Subject: Re: [Adonthell-devel] New map engine first draft commited
Date: Sun, 17 Feb 2002 11:46:23 +0100 (CET)

On 17 Feb 2002 09:40:11 +0100 Alexandre Courbot wrote

> Still, don't forget to check whether the design (the placeable & moving
> stuff, etc...) could be improved! :)

Okay, I had a look at the class hierarchy (and part of the code). I don't
have any improvements to the design (yet). I'm wondering however, if each
class really needs the corresponding <class>_gfx? Or do already have plans
to fill those classes in?

Anyway, that's not really an issue.

The only problems I've seen so far have to do with the diagonal walking.
In case we don't make extra animations for that, the character should at
least look north- or southwards during diagonal movement.

The other issue is the speed. It's easy to see that right now, the
character walks faster when moving diagonal. The explanation is trivial,
as right now the speed is composed by adding two velovity vectors:

  y |  '. 
    |    '.
    v      '_| x+y

Even in the ASCII graphics, you easily see that the velocity of x+y is
greater than that of x or y.

That means, you gotta change the set_velocity method, so it correctly 
scales the speed:

    float s = sqrt (x*x + y*y);
    x = x/s * abs (x);
    y = y/s * abs (y);     

You see easily that when one of the vectors is 0, the other will keep it's
value. But if both are greater 0, their accumulated velocity is the same as
the velocity in the first case.

But again, that are minor issues. Still, it doesn't hurt if the
calculations are sound from the beginning :). So the changes are in CVS.


reply via email to

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