I want to discuss three related matters here. All relate to movement. These are:
At present the movement system works as follows:
The path finding code is passed a set of element archetypes, without duplicates, and uses these archetypes to determine the cost (in ticks, 10 ticks to a turn) of moving to a potential destination square. Having, by this means, determined the best path, the path is encapsulated in a movement order which is then stored in the task force command. When movement takes place, the list of units of is scanned. If a unit has movement orders, it, and all the othe units affected by that order (that is, all the units in the task force) are moved, one by one, and marked as moved.
The problem with this system is that the movement path depends only on the element archetypes, and not on the units themselves, and the actual implementation of the moves is oriented around the units, and not the task force.
The reason that the special list of elements is used is that most units consist of a large number of identical elements. So a list is assembled, without duplicates, for path finding purposes, thus cutting the path calculations
to a small fraction of the amount that would otherwise be needed. For example, a task force of ten identical units could well contain 100 identical elements, all of which will produce the same path. This issue is part of my reason for preferring a single element of each type in a unit, with a size factor (which does not affect movement).
All this means, unfortunately, that in the calculation, any characteristics of the unit are unknown. In particular, the fact that a sea unit is in port can be handled, but the fact that it came from a specific previous square cannot. What happens if two ships enter port from opposite side of an isthmus - they are now in the same square, and can be put into the same task force. Then the task force is given orders to move out. Ouch!
Also, in order to keep a task force together, the movement scan must be by Command, not just scanning the units. This means a substantial refactoring of the movement order execution system.
I estimate something like a week's work to fix all this. On the other hand, that will also fix the three problems noted at the start.
Cheers
- Loading and unloading ships.
- The fact that horses outrun other units in the same task force.
- Apparently roads are not working (I haven't seen this myself, and, frankly, it seems unlikely).
At present the movement system works as follows:
The path finding code is passed a set of element archetypes, without duplicates, and uses these archetypes to determine the cost (in ticks, 10 ticks to a turn) of moving to a potential destination square. Having, by this means, determined the best path, the path is encapsulated in a movement order which is then stored in the task force command. When movement takes place, the list of units of is scanned. If a unit has movement orders, it, and all the othe units affected by that order (that is, all the units in the task force) are moved, one by one, and marked as moved.
The problem with this system is that the movement path depends only on the element archetypes, and not on the units themselves, and the actual implementation of the moves is oriented around the units, and not the task force.
The reason that the special list of elements is used is that most units consist of a large number of identical elements. So a list is assembled, without duplicates, for path finding purposes, thus cutting the path calculations
to a small fraction of the amount that would otherwise be needed. For example, a task force of ten identical units could well contain 100 identical elements, all of which will produce the same path. This issue is part of my reason for preferring a single element of each type in a unit, with a size factor (which does not affect movement).
All this means, unfortunately, that in the calculation, any characteristics of the unit are unknown. In particular, the fact that a sea unit is in port can be handled, but the fact that it came from a specific previous square cannot. What happens if two ships enter port from opposite side of an isthmus - they are now in the same square, and can be put into the same task force. Then the task force is given orders to move out. Ouch!
Also, in order to keep a task force together, the movement scan must be by Command, not just scanning the units. This means a substantial refactoring of the movement order execution system.
I estimate something like a week's work to fix all this. On the other hand, that will also fix the three problems noted at the start.
Cheers
Comment