Topic: AI - game speed too high - in trunk
greenlion Topic Opener |
Posted at: 2015-11-08, 12:55
I've noticed in trunk that when running on very high speeds (> x25) than AI stops doing anything and there are error messages "AI: game speed too high, jobs are too late" in console. In b18 I it was able to properly run on x100 speed. Is it a regression or intentional? As of usecase - I was interested to simulate how AI behaves on a map and used no fog game. Edited: 2015-11-08, 13:04
Top Quote |
wl-zocker |
Posted at: 2015-11-08, 13:05
I experienced the same problem. It would be really great if the AI would still do something at high speeds - I tried to test a map, too. "Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg Top Quote |
Tibor |
Posted at: 2015-11-08, 21:02
Oh, you are right to some degree. Current AI is designed to be called by game engine every ~500 ms and do one small task. Even when the period is longer (let say up to 2 sec) everything works. But if you speed up the game too much and the period is very long, things became to be broken. So this is why I introduced the warning into console so that a tester has an idea what is going on. We are talking about game's time not real time, of course. But I have an idea of improvement - AI simply needs to be less nice and do more jobs at one call, if it is called after longer time. I will try to code some fix for this... Top Quote |
einstein13 |
Posted at: 2015-11-09, 08:55
We can add this functionality only when "game speed is too high" (the message will activate the functionality). That should solve some problems. But also can decrease the real speed (FPS) einstein13 |
Tibor |
Posted at: 2015-11-09, 20:20
You know, this is not binary situation not late or late, in fact we can exactly calculate delay of most late task and based on this number decide how many task will AI run this time. Of course if game engine calls AI once in 100 seconds things can not go well no matter what. Top Quote |
einstein13 |
Posted at: 2015-11-09, 21:41
Yes, you're right. This solution is only partial. Also it is not working bad with 95% (or more!) of games. Most of the games are with speed up to 3x, some up to 5x, where AI works perfectly. einstein13 |