|
From: | Frederico Cerveira |
Subject: | [Adonthell-devel] Re: Pathfinding terrain costs, thoughts and changes |
Date: | Sat, 22 Aug 2009 18:25:14 +0100 |
And finally, I made a change to keep the speed constant while the
character is jumping. I don't think terrain should have any effects
while the character is not actually touching it.
there were two
calls to speed() that ignored the return value.
And I have arrived at a different solution.
>From a technical perspective, relying on inlined code to avoid
circular dependencies between the rpg and world module is dangerous.
Ultimately, it's the compiler that decides to inline code or not, so
things might break in the future or with different optimization
settings.
So if we'd have to decide on a unidirectional dependency between rpg
and world, I would feel that world should have access to rpg but not
the other way round.
So as a conclusion, rpg should be linked into world, the opposite of
what we have now.
Does that hold up? Or did I overlook something? Suggestions?
which I'd probably would
call species, as creatures and animals need be considered as well
As far as implementation goes, the plan is to do everything that is
gameplay relevant in Python to allow (easy) customization of the rules
system. So I wouldn't have written a "race" class in C++, I guess.
OTOH, things like speed which need to be updated each frame for all
the characters would be too costly to do in Python. The trick here
might be to make speed a property of rpg::character (for simple rule
systems it could be set to a fixed value, like the current base speed)
and decouple reading and actual calculation. Then, calculation could
be done on Python side based on the rules implementation and could be
triggered by either player interaction (casting a "haste"-spell, etc.)
or by world::character, but only when the terrain actually changes.
So far you have tied pathfinding to the race (...) Why not tie it to individual characters, so that a Forestkeeper
might not mind taking the direct path, even if it leads over swampy
ground, whereas a noble would avoid to step onto a patch of dirt at
all costs
[Prev in Thread] | Current Thread | [Next in Thread] |