Page 1 of 1

Threading and AI

Posted: 01 Dec 2005, 18:58
by SoftNum
How does the threading model work for the AI? Are the calls to your interface blocking (i.e. the game won't go on till it returns?) Or are they non-blocking. Can you miss Update() or whatever messages?

Just looking over AAI code (thanks submarine) some, and came up with some questions. I'm sort of thinking aobut making an AI myself, but we'll see.

Posted: 01 Dec 2005, 19:01
by jcnossen
Blocking, but ofcourse any AI writer could start using threads internally (pretty good idea btw ;) )

Posted: 01 Dec 2005, 19:14
by SJ
Just make sure you dont call any callback functions from other threads than the main one.

Posted: 01 Dec 2005, 20:06
by AF
Most AI projects that are started or planned are by people who dont knwo how to use threads such as myself, or people who know, but havent used them such as zaphod.

Posted: 01 Dec 2005, 20:46
by SoftNum
AF: Perhaps that will change. :D

Posted: 01 Dec 2005, 20:47
by Veylon
I don't know how to use threads, and my AI works just fine.