Page 2 of 2

Re: River movement mechanics

Posted: Mon Nov 28, 2022 6:47 pm
by Lexxie
The evolution of the idea, as far as ruleset implementation, currently stands here:

Bring in "Hard Entry" and "Hard Exit" road_flags that can be put on any road type. In particular, these can be used to effectuate the difficulty of crossing a bridgeless river. (But could also be used for special extras like trench warfare and cheval de frise). For rest of the post I'll just speak about rivers as if they hypothetically have these flags.
"Hard Entry":
Entering a tile with a river from a tile that has no river, uses all moves.
"Hard Exit":
Exiting a tile with a river to a tile that has no river, uses all moves.
Exceptions:
Not applicable to:
1. Units with IgTer flag or those not affected by TerrainSpeed (e.g., aircraft etc.)
2. Wherever there is an existing bridge/rail etc., the cheaper move cost applies.

Optional Considerations:
Hard Entry and Hard Exit penalties apply only where the RESTRICT_INFRA context is active. (Domestic/friendly units don't suffer hard entry/exit penalties on rivers, but pay normal move cost.)

Re: River movement mechanics

Posted: Mon Nov 28, 2022 9:54 pm
by Ignatus
Lexxie wrote: Mon Nov 28, 2022 6:47 pm
"Hard Entry":
Entering a tile with a river from a tile that has no river, uses all moves.
"Hard Exit":
Exiting a tile with a river to a tile that has no river, uses all moves.
Exceptions:
Not applicable to:
1. Units with IgTer flag or those not affected by TerrainSpeed (e.g., aircraft etc.)
2. Wherever there is an existing bridge/rail etc., the cheaper move cost applies.
Looks weird a bit (sometimes a unit enters the tile and goes back without crossing, or something...) but maybe is also some compensation for extra defense on river tile. I would propose an alternative solution (just a draft, this way has lots of reeves) - a unit gets "embarked" state if starts a turn on an appropriate extra (river) and in this state it may use the extra's movement benefits, but going astray removes the state and reduces move points proportionally before the side move is done; any attacking for units without AttFromNonNative is also considered disembarking.

Re: River movement mechanics

Posted: Thu Feb 09, 2023 7:42 am
by MikeDuk
Path finding takes about 40% of the CPU time on a typical autogame.
What is an autogame?

Re: River movement mechanics

Posted: Thu Feb 09, 2023 10:51 am
by cazfi
MikeDuk wrote: Thu Feb 09, 2023 7:42 am
Path finding takes about 40% of the CPU time on a typical autogame.
What is an autogame?
Game with just AI players. Usually those are run for testing purposes (to see that freeciv does not crash or produce any error messages, to observe how well AI performs). In most cases also run with timeout -1, meaning that turns go forward as quickly as AIs get their stuff done.

Re: River movement mechanics

Posted: Mon Feb 13, 2023 7:58 pm
by MikeDuk
OK, but could a singleplayer game, with say 12-15 AI players, be considered almost an autogame, regarding path finding computation?

Re: River movement mechanics

Posted: Tue Feb 14, 2023 3:19 am
by cazfi
MikeDuk wrote: Mon Feb 13, 2023 7:58 pm OK, but could a singleplayer game, with say 12-15 AI players, be considered almost an autogame, regarding path finding computation?
At least during the turn change, where practically all the AI player activity happens, and no human activity takes place.

Originally I mentioned autogames just to make clear where I got the data, with also some implication of how much there is of it, to those who closely follow the development. (On average, I have 2 - 3 autogames running, resulting in around 10000 played turns per day, 365 days a year)