Thread: AI Wolfpacks?
View Single Post
Old 08-23-09, 06:12 PM   #20
JU_88
Silent Hunter
 
Join Date: Jan 2006
Location: UK
Posts: 3,818
Downloads: 11
Uploads: 0
Default

Quote:
Originally Posted by pythos View Post
I think one of the problems with AI subs is when they dive, how deep do they go? This would be more of a factor for an AI enemy sub that is attacking you. Sure they could at first be at periscope depth, but what about when they want to avoid a torpedo solution from you being successful?

But when evading other ships, how deep to go without A0hitting the bottom, and B) going below crush depth.

These I think would cause quite a bit of headache when it comes to AI subs.
NOt going below crush depth is easy, you just give them a max depth of say 160 - 200 m, just as aircraft have minimum altitude so they dont hit the sea.

However hitting the bottom at shallower depths would present a bigger challenge as the sub has to have a sensor to detect how deep the water is.
That is kinda already in place - the the player can order the CE to report depth under keel - so such a sensor already exsists, I dont know how it works, but it does.

Ai sub needs to be forced to do this check before they dive then respond in a predetermined way. for example:

if depth = 250 -1000 they can go to down to max depth
if depth = 110 - 249 they and go to 90
if depth = 50 -109 they go to 40
if depth = 0 - 49 they go no deeper than peri depth.

Abit tricky but not impossible, far more complex things have been programmed in the past.
No one expects it to be perfect - just reasonable.
JU_88 is offline   Reply With Quote