adonthell-devel
[Top][All Lists]
Advanced

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

[Adonthell-devel] Re: Update on collision work


From: Kai Sterker
Subject: [Adonthell-devel] Re: Update on collision work
Date: Tue, 18 Dec 2007 10:34:49 +0100

On Dec 16, 2007 7:59 PM, Kai Sterker <address@hidden> wrote:

> The biggest problem that remains is synchronizing the character
> position with the rest of the world. It appears to be a little off,
> still, resulting in falling through the ground halfway across a tile
> ... shouldn't be that difficult to fix, though.

Got that done yesterday evening (again, not committed yet). At least
for my simple example, there is no more falling through the ground.
Have to test for more complex terrain though, where tile-size does not
equal grid size ...

Still not working is climbing and jumping ... have to look further
into that ... maybe gravity is too high.


> There is also more work on the rendering ... I vastly simplified it
> when introducing the 3D object models, but it seems that some of the
> extra calculations were there for a reason ;-).

Had some thoughts on that as well, but didn't get around implementing
anything. The solution will most likely be the same as we had in v0.3.
Each object has a "base tile" that will usually be to the bottom
right. Objects will be rendered on the cell of the grid occupied by
that "base tile". Since rendering is from left to right, top to
bottom, that should assure that everything an object might block from
sight has been drawn before.

The base tile itself could be automatically set when adding objects to
the map (area::put), as we know the bottom rightmost tile the object
occupies at that point. An additional flag in square_info would be
sufficient to store that base tile information (IsBaseTile = true |
false). During the rendering phase, where we iterate over all objects
on a square, we can simply discard those that don't have the base tile
flag set.


With those changes in place, hopefully the rendered world and internal
model will match up too. That way, the only thing left would be
tweaking the collision response step to get jumping and climbing
(stairs, etc.) working again.

Kai

P.S: Some more thoughts need to go into objects that are not solid
(like smoke, fog, the surface of water, ghosts, etc ...). But that
doesn't have to happen for an alpha 2 release. Just something to keep
in mind for later.




reply via email to

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