Add a new enemy type: shooting enemy

Before the beta playtesting, I was working on adding a new enemy which can shoot at the player in our game. Before that, there were only two kinds of enemies in our game: glaucus and pufferfish, and they all behaved in a similar way. In the game they will only move to the player, not firing projectiles, which is a bit boring in a shoot’em up game.

Then our group decided to add a new enemy to our game: Sky ray. Why did we make such an enemy? A ray looks like it is flying in the sky when it swims in the sea. We chose to make a sky ray as a enemy in our game. Also we think at least we should have a shooting enemy in our game. Then we decided make it bacome our shooter enemy in our game. The sky ray is spawned at the right side of the screen, and it moves to the left side of the screen with a certain speed. Sky ray is going to be randomly generated from these five enemy spawn points. 微信截图_20180304100405During the sky ray moves from right to left, it will shoot projectiles at the player with a certain fire rate. This is done by giving it a horizontal speed. We can do this by adding a 2d rigidbody component in unity. For the projectiles,  I gave them a direction every time when it is created, and this direction is the boat’s current position. Then when its x position is less than the x position of the boat, it stops firing projectiles.Ray
微信截图_20180304093516

In the process of programming, it is not difficult for making the sky ray to move or shoot, but it can be challenging to make the movement or shoot more perfectly or smoothly. After beta, my next goal is to improve the sky ray’s shooting, or, to say the least, let the projectiles find the player in a different way, not like now, it should be more fun when a player is playing this game.

About Kaijun Wang

2017 Programming