I wasn't originally going to cover this, enjoying how much the game unambiguously posed the player as the Villain All Along but it's been requested a lot and I think it's worth showing how to tackle the concept of having the enemy Fight Back.
After all, the approach to creating something that responds to player input is quite different to creating something automated. I'm hesitant to refer to this kind of thing as "AI" anymore than you'd refer to an alarm clock or a microwave as "intelligence", but it is worth going over this to further drive home the concepts of automating the timing and behavior of a game object.
Remember that's the goal with this series. To cover all of the basic concepts involved in building a platform game.
I'd say that after this we're pretty close to getting there. I'm still thinking how I want to deliver on the game's "ending" but it will most likely be a matter of a simple hardcoded cutscene.
Luiz Gustavo Alves
2018-07-19 11:25:05 +0000 UTC