First thing on the list was addressing bugs and complaints in the prototype.
The big one I found was occasionally the shots would slow down, or stop completely. This was fixed by adding physics layers for the Player, shots the player fired, enemies, and shots the enemies fired. After that setting the physics so none of the shots could hit each other, player shots could only hit enemies, and enemy shots could only hit the player.
The other small bug was that the player fires when they where in menus every time they tapped the screen.
The only bug reported by a player was "let the mouse button down and get unlimited shot." I wasnt able to recreate this one to test it. It is set to fire as quickly as you can tap the screen, which at this stage works well, but could be changed later on for balancing.
The big criticism was being able to stay in one lane, shooting quickly and not really dying. One idea to solve this is a new ship that shoots on an angle. The V-Shot.
Next up was to fiddle with the AI a bit and give the ships more variety in their actions. In the prototype all the ships could do was shot once per gun at a variable interval, and move towards the player at a variable interval, and not be able to change lanes into the player.
First was to change the Scout so it moved randomly either way, and has the ability to change lanes into the player.
Next was to add the ability for a ship to be able to shot several shots in quick succession, then have a pause. First ship to use this code is the V-Shot.
The rest of the existing ships will keep their existing AI.
- Skimmer - Follows player, shots one shot occasionally.
- Tri-Shot - Stays in one lane, shots 3 at a time occasionally.
- Ram - Stays in one lane, doesnt shot, tanks hits.
To enable shooting following the angle of the guns I had to change the way I was controlling the projectile. Initially I was applying force from the gun script, which made them go straight down the world x axis regardless of angle. I changed this so the bullet moves forward in relation to its x axis at a set speed. The script is attached to the bullet itself, and is the same as the one I use to control the movement of enemies towards the player.
Took a page out of Vlambeers book and added a split second of slow down, on top of the screen shake, every time a bullet connects. Its really only noticeable when looking for it, but it feels like the impacts are more solid.
Other small changes include changing the camera on the mobile version so its easier to see you ship, and changing how the scoring is handled. I also changed the UI to be a bit less over the place.
Increasing difficulty was the next thing on the list. I wanted to increase the health of the enemies so that every 500 points you got, they required an extra shot to kill. Since C# doesnt use the Modulus (%) to find the devisor, it required a small bit of code, using Mathf.Floor. So now enemies health increases by one for every 500 points you score.
private int healthIncrease;
private float healthf;
healthf = score / 500;
healthIncrease = Mathf.FloorToInt(healthf);
EnemyLife += healthIncrease;
This is a simple way of finding how many times a number divides into another, and rounds down to an int in Unity.
Another change to the difficulty was increasing the time between ships being spawned at the start of the game, from 1 sec, to 1.3 sec, for the first 250 points.
Next up was playing with the particle effects for the explosions and shield. The explosions I am mostly happy with, they look good, and got good feedback the first time I showed them. Just a minor tweek by adding size over time to them, to give a bit more depth.
The Shield I wasnt happy with, It was set up exactly the same as the explosion, expanding out after a collision. A shape change, and a particle direction change gave it a look similar to the more traditional sci-fi energy shield.
Thanks for reading
Click here to play the current version
Prototype phase - Dev Blog