DevLog #4 Enemies!

After my previous attempt at getting bad guys to move around, I hit YouTube hard in my lunch breaks and discovered that lots of people repurpose the inbuilt animator finite state machine for doing most AI.

SMELLY

This is a code smell. Every domain object and class should do one job and do it well. Repurposing suggests that you're bending a system for something that it wasn't intended for (single responsibility principle). However, I thought it was best to just get over myself, give it a go and then come back again later.

I added an animator, created some states, gave each state a script file (adding a base class to be tidy) and added a transition that would make the enemy follow the player. Once it's locked on, there's no getting away from it just yet!

It works well but the enemy movement is a bit simplistic, giving some jerky movements. I intend to make the movement work in the same way as the player Cloudship.

Download Enemy release 0.4 here

I'm finding keeping track of ideas and tasks in The Project really good; the perfect balance between lightweight and utility.

Next up is making the enemy movement better and then some combat.