Big Game Project: Week 3

The third week (Apr 18 – Apr 22) I worked mostly with Enemy 1 (“Alpha”) AI. I experimented with two different AI behaviors:

  • where the enemy follows the player during its attack phase and deals damage to the player upon contact (because of its rapidly spinning hull)
  • where the enemy charges towards the player in a straight line dealing damage on contact; the player can more easily evade the attack by moving off of the straight line

The latter behavior feels too simplistic and too easy to overcome while the former is challenging enough but presents problems. Throughout the project, I’m using physics in Unity as opposed to direct position manipulation. For example, to make the enemy move towards the player the following code line is used:


rigidbody.AddForce(direction * 50.0f * factor, ForceMode.Impulse);

This causes enemy velocity to very quickly reach undesireable high values. More investigation is needed to discover why exactly this happens and how to solve it.

 

About Rokas Paulauskas

2014  Programming