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.

Add a new enemy type: shooting enemy”的一个响应

  1. Hello Kaijun,

    Your blog-post was quite interesting as you showcased a lot of different aspects of the latest enemy in your game. Some of these aspects that were interesting to me were for instance, how you spawned the enemy and that you had several different spawn points that were randomized, how you designed the enemy to stop firing after it reached the other side of the player and the reason behind those aspects. In addition to this, I think it was also quite good that you alluded to the fact that the difficult parts of the programming for this particular feature lies within the perfecting it, as the last little effort and polish is what is mostly noticed.

    It was however somewhat difficult to follow your train of thought at some points when you were really getting into it. To remedy this in the future I would suggest that you read your text to yourself or even better someone else to see if it flows well.

    All in all, interesting blog post and your game looks really cool!

    //Fredrik Henriksen Lövlie
    (fr6405)

留下评论