In this iteration I will fixed the enemy spawning bug I mentioned my previous post. I will also improve the player attacking the enemy responsiveness as well as other responsiveness tweaks. I may also adjust the internal economy to a degree to fine tune what I have.
Implementation:
Laser Blast Improvements:
For both the player's and the enemy's laser blasts I decided to add a light component to the prefabs. I made sure the light's range was not too large (no more that 10) in order to not have any over spill and cover all the surrounding items but large enough for the player to see the actual item. I tested this in game and it still did not do the trick, so I went back and raised the light's intensity to about 4. This is half of the range allowed by Unity's light component. I also make the light component the same colour of the line renderer that was attached to the laser (red for the player, green for enemy). When I tested it myself, I noticed a stark different between the old and new versions of the laser. It was defiantly a lot easier to see in the game and the same goes for the enemy's laser.
Enemy Muzzle Flash Scale:
For the enemy's muzzle flash I decide to up scale it to make it easier for the player to see. Initially I doubled the size, but it was still to small. Then I multiplied it by four times it's scale, to about 16, and this nearly worked. After this I decided to increase it to 20 and this appeared to do the trick.
Enemy receiving damage responsiveness:
o made it clearer to the player they had damaged the enemy through firing a laser, I added a sound clip, so when the enemy it hit by the player's laser, a sound plays. This sound is of metal receiving an large impact, but I have modified it increase the bass and I have also increased the pitch slightly to make it fit in with the game more and so it sounds like it came from the enemy ship. This was the player will get both visual and audio feedback that they hit the enemy by shooting them. I obtained the file from http://freesound.org by alienistcog (alienistcog. Web. 29 May 2014. <http://freesound.org/people/alienistcog/sounds/124711/>.).
Fixing the spawn bug:
With the enemy re-spawning bug, this took me roughly a day to find out what was going wrong with it, and still don't fully understand but I have an idea.
I tried debugging the enemy's script and the value's were all matching up. I tried commenting out various pieces of code and setting several game objects as inactive, but I couldn't see what was doing it. I checked in a variety of different scripts to check if the variable was being set some where else and it wasn't. However after several hours I noticed that when the player destroyed the enemy, there was a null error. I checked this out and it was at a 'GetComponent' statement in the OnTriggerStay function. I looked it up on the Unity answer forums and it suggested I make sure the script it was trying to access was actually there. The bug read "The Collider Player has been destroyed but you are still trying to access it". I became more confused by this. After a few minuets of reading my code, I noticed I had an if statement inside of the OnTriggerEnter statement that was a trigger for the tutorial script for the level. I decided to cut the if statement from the OnTriggerEnter to the OnTriggerStay function, and this some how fixed everything. It may have occurred because the function needed longer to run the statement or just because it was in the wrong lace by mistake. Either way it is fixed now.
With this bug I fixed it about two iterations ago and it baffled me as to why it arose again and I could not remember how I fixed it, but as least it has been sorted now.
Critical Damage Screen:
With the critical damage screen I decided to get a variety of different cracked glass images, modify them and scatter them around the edge of the image. I decided to do this because since the player character won't receive any damage but his ship will and the screen for the cockpit will probably be made from glass, this seemed more logical and will show the roughness of space. Also it will be more aesthetically leasing because the ship will be damage and not actually the pilot.
The image below is what I currently have I took several images of cracked glass screens, manipulated them and added them together so it looks a little random. Because there are multiple large crack around the edges this shows the player's show has sustained much damage and is nearly falling apart unless they get a health pack soon. Also I made sure the image was coloured white because I already had the code in place to change the imaged colour, therefore if I ever needed to change it's colour I can do this dynamically.
The image below is what the new damage over lay looks like. The grey bit will not be seen, it's jut a screen capture for this blog post, the parts in grey will not be seen in game.
I have reference each imaged I have used for this screen over lay in my bibliography.
The three images below are what I used to create the screen overlay above.
Unknown. "Unknown."Unknown. Unknown, n.d. Web. 27 May 2014. <https://s3.amazonaws.com/colorslive/png/509299-PqhI_Cl78RheIJQS.png>.
The three images below are what I used to create the screen overlay above.
Unknown. "Unknown."Unknown. Unknown, n.d. Web. 26 May 2014. <http://cdn.geckoandfly.com/wp-content/uploads/2010/04/15333_2d_broken_glass.jpg>.
Unknown. "Unknown."Unknown. Unknown, n.d. Web. 27 May 2014. <https://s3.amazonaws.com/colorslive/png/509299-PqhI_Cl78RheIJQS.png>.
Unknown. "Unknown."Unknown. http://wallpaperpanda.com/, n.d. Web. 26 May 2014. <http://wallpaperpanda.com/wallpapers/die/jA8/diejA8qik.jpg>.
Camera shaking:
As well as the orange orb and critical damage screen I managed to find a script that could make the camera shake when an enemy laser hit's it. This was suggested by player's last iteration and I wanted to include this feature in the last iteration but the package I bought (where the blood splatter screen came from) used the nGUI camera and C# scripts I was not able to use. It took me several hours, I went through manny script and online tutorials on how to achieve the effect I wanted. I eventually found a simple script by GALAWANA (GALAWANA, 17 Jan. 2013. Web. 31 May 2014. <http://www.galawana.com/unity3d-camera-shake/>). I had to make a number of adjustment to the script such as putting the camera back into it's original position and making sure it shook enough but not too much but I found the correct amount of shakiness and the time the effect should last for. This too a decent amount of time but I found it.
Enemy receiving damage responsiveness:
I added a metal impact sound to the enemy ship when the player hits it with a laser to make it more responsive. I found a sound file by alienistcog (alienistcog. 22 July 2011. Web. 29 May 2014. http://freesound.org/people/alienistcog/sounds/124711/). I manipulated the file in audacity to make it more bassey and sound like the laser it a large dense piece of metal by increasing the bass and powering the pitch slightly. After this I imported the sound into Unity, added it to the enemy and made it player through the damage function. When testing it first time round, the audio didn't play, however I remembered it was automatically imported as a 3D sound, so the further the player is in range to the enemy, it will hear it less. I unchecked this box, and afterwards it all worked perfectly.
As well as this I decided to add multiple points where damage sparks (particle systems) would spawn. Initially I used the "Sparks2" prefab that comes built in with Unity3D. I added multiple spawn points for each spark to spawn from on the ship. After I did this I tested it out. It worked but the sparks were not obvious enough. After this I used a slightly different one that also comes built in with Unity3D. It looks a little more like a fire but I think it's just the texture it uses. After I replaced the old spark with the new park and tested during run time, I defiantly noticed a start difference between the two. The new spark that spawns when the enemy received damage is both larger and more noticeable.
Fuel Low Power Down Game Over Audio:
During previous play tests players asked why the game over screen suddenly appeared whilst they were getting into the game. To fix this (as well has giving the player a warning when their fuel is low, player's liked this in the last iteration) I have made a number of adjustments. I have delayed the game over function using a yield statement, then blue text appears above the player that reads "Fuel Empty", as this is occurring, an audio clip of a engine shutting down plays. This is in order to give the player more feedback on what is happening. The audio clip I have used I obtained from 'freesound.org' by peridactyloptrix (peridactyloptrix. 9 Jan. 2014. Web. 31 May 2014. http://freesound.org/people/peridactyloptrix/sounds/213384/). Because the file was longer than I needed it to be and included other bit of audio I did not need, I modified it by removing what sounds were not appropriate. When the audio clip has finished playing the game over screen appears and the play can click the restart button on the screen.
There was another audio clip I found on the same site, however I decided not to use it because the shutting down sound was not noticeable enough for the player (club sound. Web. 31 May 2014. <http://freesound.org/people/club%20sound/sounds/103687/>.).
Player Dead Game Over:
For the player death game over sequence, I have increased the amount of time in the yield statement. This delays the game over screen so the player can see their ship explode due to having no health. Also they will know why they dies because they will see their ship explode and the damage over lay will have warned them before hand to get more health. As well as this the explosion audio plays during the explosion particles of the game over sequence. This will help with the responsive ness and show the player what has happened.
Player feedback:
The new laser blasts:
During play tests many players liked the combat. Because it was less static than in past iterations. However a number of players noticed how some times an enemy ship would go through a planet. Unfortunately I don't know how to fix this and I don't have the time to find out how to fix this. This only occurs when the enemy is patrolling the play during combat.
With the laser blasts, many people liked the changes I made, i.e. adding a light component to them because they found them easier to see in the game. Meaning the player could see where the lasers they shot were traveling to and they could more clearly see the enemy's laser blasts to more easily avoid them during combat. I have added light components to both the player's laser blast prefab and the enemy's one as well.
Player damage overlay:
Another thing player's liked during their play test was the new cracked screen over lay, because it made them feel more like there were in a space craft's cockpit. This also made the damage more visual and helped fit in with the space theme. Player's also commented on how when they were low of health it made it easier to tell that their was critically low and needed a health pack with out looking at the pulsing health bar so they could concentrate more on playing the game and engage in combat.
Tutorial level bug:
During this play test several players noticed a but where in the first tutorial level when the player is being taught the core mechanic and how to move and so fourth, the player is unable to use the trader ship. During this tutorial I made it so the player can't move away from the trader until they have been refuelled. I did this only in the tutorial so the player doesn't wander around the tutorial level. However, the refuel function for the trader does not work, and because the player has not been refuelled in the tutorial they cannot progress to the end of the tutorial. This is quite odd because during my last iteration everything worked perfectly in the tutorial level.
I will track down the bug, but if it takes too long to do then I will get it from the game and give the player's a set of instructions.
Camera Shaking:
Many players noticed how the camera shakes to a degree when hit by incoming enemy fire. The majority of people liked this feature because it add to the responsiveness of the hit, and helps the player be immersed in the game. It's like the ship was actually hit and the player was inside of it. Another thing was, player's also liked how much it shook and the duration it shook for. It was not too violent but violent enough to notice, and not too long so the player still has their bearings on where they are in the game.
Enemy Damage sound:
Many player's thought this sound did the job and liked that I added it because it gave them a signal that they actually hit the ship, rather than just waiting for visuals making it more tactile. they said it also made the game feel a little more natural.
For Final Iteration:
For the final iteration I may make a few minor adjustments. This is because I have not got a lot of time left therefore I will not be able to do anything too drastic. I will attempt to fix the first tutorial level, but if I am unable to I will cut if from the game and give player's a document with instructions on it.
If I get the chance I will add a light so that when the player gains health, the orange light glows and the player. This is so, when the player is re-gain health, they will look at the orange light, then look at the pulsing health bar so they can relate the two together.
Another thing, if I get the change I will improve the enemy tutorial but my highest priority is polishing the game. I may add a slight feature, where is the player shoots the enemy, the player gains more health of fuel storage so they can either take more damage or travel further.
No comments:
Post a Comment