clockback / bombsite

A Worms clone.
0 stars 0 forks source link

Ensure AI can run seamlessly with game #33

Closed clockback closed 2 months ago

clockback commented 2 months ago

At present, the AI attempts to carry out checks for one weapon per game tick. That means in a single game tick, every grenade attack available to the AI must be checked before the game can load a new frame. This results in substantial lag.

A superior way to do this would be to use a generator to continuously yield attack possibilities, while also interrupting the AI when a certain percentage of a tick's duration has been surpassed. The AI should then continue searching possibilities in the next game tick.

clockback commented 2 months ago

Pull request: https://github.com/clockback/bombsite/pull/36