adonthell-devel
[Top][All Lists]
Advanced

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

[Adonthell-devel] Pathfinding costs and character speed from a gameplay


From: Kai Sterker
Subject: [Adonthell-devel] Pathfinding costs and character speed from a gameplay perspective
Date: Sat, 22 Aug 2009 13:40:50 +0200

So far you have tied pathfinding to the race (which I'd probably would
call species, as creatures and animals need be considered as well).
However, why not go a step further and make it more abstract than
that. 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. Of course, one wouldn't want to setup pathfinding costs for
each individual NPC and creature. So what about a terrain_preference
(or some such)? It'd basically look like the race configuration we
have now, but it would be more open. You could have group-specific
settings (like "Forestkeeper", "Townsfolk"), settings for certain
types of creatures (like "Desertcreatures"). Each character and
creature will then get a preference assigned like the dialogue or
schedule script. And it could be changed at runtime too, should the
situation require it. Imagine the noble running from an attack: he
might just for once not care about his shoes getting dirty.


The same thing goes for speed being affected by the terrain. Can we
really tie that to the race/species? Or does it have more to do with
the terrain itself, skills, weight carried, spell or potion effects,
etc.? I've seen there's already a placeholder for applying different
effects to speed, so we're good there.

But to get back to race affecting speed across terrain: should we
rather add a "Trecking" skill to the list
(http://adonthell.berlios.de/doc/index.php/Rules:Stats#Skills) that
would decrease penalties given for moving across difficult terrain and
have a fixed speed-per-terrain-factor lookup table on world side?


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.

Thoughts?

Kai




reply via email to

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