Spoiler :
... the effects should already be baked in to travel ...
The part of the Gulf Stream that is "out of the map", yes.
And we will reflect it in the Travel System. (There is a whole concept thread for it.)
But what about the part of the Gulf Stream that is "still on the map"?
For that part I want to experiment and create the "Streams" feature.
And if I am correct it will not even be that hard to create something like that.
If community however considers it a pointless and boring feature I do not necessarily have to do it.![]()
I do not create features just for immersion and historical accuracy.From a point of realism and historical accuracy I say go for it.
It should suffice to modify CvPlot.cpp::movementCost. I don't think that's a major bottleneck, so I don't see a real problem with performance; perhaps I'm missing something. The function that checks whether movement between two tiles is allowed at all is called far more frequently; at least that's been my experience with the KmodPathFinder class that devolution has ported to WtP – the pathfinder in the EXE may well behave differently. For reference, the calls in question happen in this loop: KmodPathFinder:: ProcessNode – pathValid_join (only checks for isthmuses; all the other movement checks depend only on the destination tile and are handled by ... pathValid_source, somewhat counterintuitively) and pathCost (which calls CvPlot::movementCost).I am planning to bring "directed movement (bonusses)" in this game.
Any good ideas how this could be implemented in a performant way?
You can measure the performance impact if you like. At the start of what you want to measure, tell that you want to profile, like this:Any good ideas how this could be implemented in a performant way?
int CvPlot.cpp::movementCost()
{
MOD_PROFILE("CvPlot.cpp::movementCost");
enum DirectionTypes
{
NO_DIRECTION = -1,
DIRECTION_NORTH,
DIRECTION_NORTHEAST,
DIRECTION_EAST,
DIRECTION_SOUTHEAST,
DIRECTION_SOUTH,
DIRECTION_SOUTHWEST,
DIRECTION_WEST,
DIRECTION_NORTHWEST,
NUM_DIRECTION_TYPES,
// ...
};