View Single Post
Old 01-11-11, 08:54 AM   #5992
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Antar View Post
These messages are possible only for player's submarine or for other: spotted enemy german AI or enemy british AI submarines?
It's all simulated. I can't really tell if another ship has sighted a sub or not, I can't even tell if another ship has sighted another ship. To give the illusion of radio traffic I iterate over all the ships and 'roll the dice' to see if it has sighted a submarine or not. If it does then I 'roll the dice' to see if it spotted a surfaced or submerged one.
Now for the player's sub I just look at distance to contact. If it's within the distance range we 'roll the dice' to see whether the sub was spotted or not. If not, we wait a random amount of time and check again. Cycle repeats until player's sub is spotted or we are greater than the maximum distance the contact can spot the sub.
TheDarkWraith is offline   Reply With Quote