Jump to content


LarkinVB

Member Since 16 Jan 2005
Offline Last Active Mar 25 2019 07:23 AM

Topics I've Started

AI 3.2

03 July 2009 - 06:06 AM

Any reason why v3.2 isn't released, Thudo. It is ready for a long time now.

Project Map Database

01 April 2009 - 06:41 AM

While working on the DowPro AI for SS I wished I could use the old Relic HasThreadOnPath() function. The replacement just doesn't cut it. Remembering that the old one didn't crash on every map I thought it might be interesting to code this :

On gamestart every map will get a unique ID, a file will be openend with this ID as name and a single line will be written to it if it is the first use on this map: "true". This functionality is of course enabled/disabled by a win condition flag like AI highspeed. "true" does mean the AI will use the old terrain analyzer function. Around the old function a wrapper is coded, writing "false" into the file before and overwriting with "true" after the function is called. This wrapper and the old function are only used if the map did not have a "false" in its file on gamestart.

So what will happen ? If the battle ends and the game did not crash, we have a file with unique map ID, "true" written to it. So next time this map is used the old function is used again. If the map crashes the state written to file will be "false" and the old function will not be used next game. Therefore you will only encounter a single crash on any map at max. After multiple runs over all maps you will have a fine collection of files reflection the state of these maps. These files can be distributed with the AI so people don't have to encounter crashes at all if they want to use this AI Map DB functionality and toggle it in win conditions.

I have it coded and working. I tested on 20 maps so far and now the most astonishing part : I did not get a SINGLE crash, even in big battles with 8 AI players !!!
Is it possible that Relic did fix their HasThreadOnPath() function ? :p

Let me know if you are interested and I can give you the code. :p