Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.
Geoff the Medio
- Programming, Design, Admin
- Posts: 12276
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
It is necessary for AI clients to update meter estimates and discrepancies each turn?
In AIInterface::InitTurn, there are lines
Code: Select all
Are these all necessary for proper functioning of the AI? Perhaps it would be fine just using whatever meter values the server sends, and doesn't need to redo the meter updating and calculating of discrepancies as is done for the human client?
If it can be skipped, it could save a bunch of AI processing time each turn, and remove a potential crash due to launching a bunch of threads to do the meter calculations.
- AI Lead, Programmer
- Posts: 4719
- Joined: Sat Sep 22, 2012 6:25 pm
Sounds worth experimenting with. I'll bookmark this for my todo list.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0