UuSpace Shooter Progression Report: Enemies & Power Ups

An essential part of a game loop in any game is Enemies. For this mini-project we will keep it simple.

Instantiating Enemies

Enemy Ship

To help create enemies almost endlessly, we created a Spawn Manager to control the instantiation using a simple coroutine that created enemies at random positions on the X-Axis

while (_canSpawn)
var posToSpawn = new Vector3(Random.Range(-8f, 8f), 7f, 0);
var enemy = Instantiate(_enemyPrefab, posToSpawn , Quaternion.identity);
enemy.transform.parent = _enemiesContainer.transform;
yield return new WaitForSeconds(_enemySpawnTime);

The above code ensures the continues spawning of enemies as long as the player is alive.
To make things a little more challenging, the enemies shoot a laser that does double the damage.

Power Ups

Spawning power ups followed the same logic as spawning enemies. For now there are 3 power ups that spawn repeatedly.

  1. Shield power up that gives player immunity against one damage
  2. Speed power up that gives the player a speed boost
  3. Triple Shot power up that allows the player to shoot 3 lasers at the same time for few seconds



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mohamed Hijazi

Mohamed Hijazi

A knowledge seeking biologist who is following his passion into a full time career in Unity / Game Development. https://www.linkedin.com/in/mohamed-hijazi/