Explosions everywhere
I got a bit of time this evening to work on some things a I wasn't feeling the best so decided to have a quiet night in. The game itself is coming together quite nicely and little extra bits I have been adding definitely seem to be helping it look and feel better than my original flash game. But I am finding that I may spend a couple of hours working on something and coding something new to the game, only to later update it and remove a lot of work that took up most of that time. Obviously this will happen on most projects and also I am learning as I go, so mistakes will be made and I will discover better ways to do things and update/rework code later on, but it doesn't stop making me frustrated that I wasted some time.
So this evening I decided to tackle a couple of things, which started with the gun barrel animation. I re put in place an animator for the game object and set it all up ok and then went back and created the animation. After implementing it it looked not to bad although there are still some issues with it. So much so that I think I may just start afresh with the barrel animations but I will leave this till the end of the project as I don't want to get bogged down animating and reanimating things because I don't like the look of them. I would much prefer to leave what is in place just now and get the rest of things done and working first before I go back to polish up things.
Yesterday I added in extra animations for the bombs exploding so now it had a choice of 3 to show you. Well I went ahead and put together another 9 explosions and added them in/created the animations and put them through the animator like the others. So now there are a total of 12 different animations that can get triggered for the bombs exploding in the air, this giving the illusion that the explosions are never really the same, also because the explosions get scaled this helps them to look slightly different each time.
I also realised I may have created an issue with the health bar code and player damage code if I were to change how much damage the bombs cause. A quick test proved I was right so I added a couple of lines of extra code to make fix the issue. The reason for doing this is that I want to implement a sliding scale of how much the bombs cause damage, thus creating an added dimension to the difficulty level. So now I can tweak the difficulty of a game by the amount of health lost per bomb, bomb speed and bomb size, I also have player reload speed as well that could be implement to add another level of complexity to the game difficulty or be used as a player power up. Still need to work out a proper strategy for difficulty levels and scaling that difficulty as you play.
I also implemented a few changes to my code that should help the game to run a bit more smoothly. On top of this I started to work out how to animate building/ground explosions. I stupidly tried a couple of things that didn't work for obvious reasons then realised the best way was just to create a game object and stick an animation in it that can be triggered and place the game object at the point of impact but slightly higher. I will test this with the animation I have created, still need to create the game object and code for it to work. If it works well then I will again create a few of these animations and build a prefab out of the object so the same object can be used and display different animations each time.
My next couple of things I want to work on and get working are the clouds, which I have been putting off as I will need to create some cool images for these. This might take a little while to implement so I think my focus should be on this, obviously once I have done trialling the ground explosions.