Progress Update 2018-02-04
This week I made some enhancements to RWE’s pathfinding system. Some of these were things I removed last week in order to help me fix the bugs I discovered, but some are new. The basic overview is:
- The pathfinder prefers straight paths, all else being equal. This makes life better for heavy tanks where turning is slow.
- There is a buffer zone around obstacles that discourages units from pathing too close. This makes units less likely to get caught on obstacles since they do not exactly follow the paths generated by the pathfinder.
- If a unit does get stuck it will now request a new path from the pathfinder in order to get unstuck again.
- I have rewritten my implementation of movement-class constraints such as MaxSlope in a way that closely matches original TA. This fixes the Triton not being able to cross rivers (or otherwise being able to drive up hills it’s not supposed to).
I also rewrote some of the logic for how RWE parses FBI/TDF/OTA etc. files to more closely match how TA behaves with them. This mean’s that Stchurdak’s bug report about the map selection screen (with the unofficial patch mod that makes it bigger) is fixed.
Next week I’ll make a start at reading in weapon data and teaching RWE about the concept of weapons on units.
In today’s gif I’m showing how the slopes that units are forbidden to drive on matches up with TA. On Evad River Confluence there is this curious hill that the ARM Triton can’t drive up, except for one little sliver on the left hand side (and bottom if not for the tree). The forbidden areas in TA are shown as red crosses, and in RWE as white squares. They match up exactly! You can ignore the red areas around features, RWE considers those areas as forbidden too but they aren’t shown in this visualisation. The yellow areas in TA are areas that the pathfinder is discouraged from going through, RWE has this around features (I mentioned it above) but not for slopes yet.