0 votes

my game is a turn based game. Currently I have the Ai follow some mundane routine but it does it so fast the player has no time to react. Any way to essentially slow down its processing to human comprehensible levels?

in Engine by (273 points)
recategorized by

I don't get it. If it's turn based, how does it matter if the AI makes its move very fast? The player will still have all the time he wants to play his turn.

1 Answer

0 votes

If you have a function to make the AI "think", just execute it after some time. You can use the Timer node for this.
If the AI has to do several actions, you can make it so your "think()" function returns a list of actions, then you execute them one by one with a delay between them with the timer. This way, the player will be able to see what the AI does.

If you need to modify the terrain between actions, you have two options:
1) split your think() function with delays
2) have a copied representation of the game in the AI's mind so it can make future hypothesis without messing with the current board.

by (29,090 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.