rameshvarun / Hnefatafl

Android Hnefatafl game using Google Play Games Services.
6 stars 3 forks source link

Fix Stutter on AI move animation #21

Open rameshvarun opened 9 years ago

rameshvarun commented 9 years ago

When the AI takes a long time to calculate it's move, the animation for the moves happens instantly. This is because the AI search is done synchronously, thus causing the delta-time of the next frame to be very large. We need to do it asynchronously.

The interesting thing is that, even if the AI finishes quickly, there should still be a one-second delay between the user confirming their move and the AI moving.