Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

AI ships do not turn/follow properly

A topic by Snaffu created Jan 23, 2020 Views: 155 Replies: 2
Viewing posts 1 to 3
(2 edits)

Hello ChezJfrey!

Sorry for Google translate:

I use the "defend" command to be followed by the squadron ships. In the original game, if I turned right or left, the ships followed me correctly. In the ERAS mod the squadron ships cannot align with my ship. When I make a turn, the allied ships can't follow me, they turn a little at first but then they can't form the line. In the original game (AOP2 COAS) it worked well.

I experimented using the same ships with 100 navigation level captains and crew with full skill. I noticed that all the ships in the game are affected by this problem. Once an enemy ship followed me because it wanted to board, it was even faster than me. I sailed towards a cliff and when the enemy ship was behind me I turned left and it went crashing. The cliff was about half a mile ahead of me, but the enemy ship turned so slowly that it failed to avoid it.
Yet the ships in the game turn well, in combat the AI makes tight turns and quick changes of direction.
So I don't think the problem is the turn rate of the ships which is correct, but as the AI follows a target (maybe).


COAS original (all ships follow the trail)

ERAS (the ships make a very wide turn)


Original COAS engine always forced ships to follow, no matter what the wind orientation.  We changed this where the ships will attempt to follow you, but now factor the wind orientation and their ship's point-of-sail numbers when determining movement and turning.  If warranted due to wind conditions, they will start tacking.  So a side-effect is that they may not always follow the exact path you take, but they will still maintain your ship as their "target" and will try to maintain a short distance in order to defend/follow.

However, from your description of the enemy boarder crashing into the island, I suspect more work needs to be done to detect/override collisions.  There is code to do this in the engine, but for some reason, certain island shores don't register properly in the detection and I have not yet figured out why some work and others don't.  I will further investigate this and see if I can find some answers/resolution.

Thanks for your kind reply! I can't wait to see two enemy line formations shoot each other :P