Implementing a simple AI for games in Godot.
Game enemies acting weird? Probably too many if-statements crammed together. Finite State Machines break behavior into clear states - now they actually know what they're doing.
10 Feb 2021•3 min read
3 posts found
Game enemies acting weird? Probably too many if-statements crammed together. Finite State Machines break behavior into clear states - now they actually know what they're doing.
Solving fizz buzz without a mess of if-statements. The Chain of Responsibility pattern lets you chain handlers together so new ones slot in painlessly.
Had to send different XML files to a remote server and ended up with copy-paste classes everywhere. The Strategy pattern lets you swap out the "how" without touching the "what".