Day12, Homing Missile + Enemy AI

I’ve worked mostly one two of implementation and it is still under its way.

The first is the Homing Missile, to be honest I still had no clue where to start despite having to work on it for the past couple days, also the reason why there hasn’t been much progress due to it. So I started by creating a HomingLaser script. Setting speed, movement, and rotation speed was the easy part. I also needed it to be able to detect and calculate the target and the distance from the missile. So a public transform of target and rigidbody of missile was set to find its positions. Direction was then set between the two and the missile is then to be launched up towards the target in an angle from where the player exist. This is where I got so far and I need to implement this missile to the player and the enemy next so that it can be launched by protocol and destroyed when collided with the enemy.

Another work underway is the enemy AI. I wanted the enemy to move towards the player from the very start when it detects the player from the beginning of its transform. so the enemy will first detect the player then rotate its body towards the player and either shoot its laser towards the player in its direction or when it become close to the player, run into the player, damaging the spaceship.

I perhaps shouldn’t try to do too much at once especially when I don’t know my way through it all exactly. However, when challenges arise and I am blocked from coding in a certain thing, I need to give it a break to think about how it can* work. So while trying to do other things that I may know how to implement, ideas rises to get through the obstacles that I’ve been stuck on. It’s definitely a slow progression and continuation of researching the ways of its implementation, but it’s not a complete halt.

Software Developer @ GameDevHQ