Leaps and bounds

So I have spent a few more hours working on this, I say a few its probably close to about 8 easily. I did not go down the road of creating the prefab, that is still my intention but I have been working on some other things in the mean time. I have been playing about with animations and put together all the animations and animation movements for the enemy, this mucked up a few times and took a bit of playing about with to get to work properly but as it transpired it came down to an erroneous piece of my code. I still want to do a bit more work on this as I want to have different explosions and re-do the explosion animations. So when the enemy is destroyed it then should pick from a range of explosion animations at random. That means things will look a bit different rather than it all looking the same.

To go along with this I had to tweak some of the code that was already in there to get collisions and things working, so whilst I was doing that I decided to implement the damage aspect of the game. So I added a few extra bits of code and created a Game controller which works as the central point dealing with all the things doing on that are not specific to enemy or player things. At the moment this dictates the speed of the enemy as its a good central point to do this and to implement updates to as in to make the game harder. it will deal with score when I add that and now damage. I will also add into this another added difficulty mechanism of the amount of enemy's on screen at any given point in time. It is best to do it this way rather than on the enemy object as the enemy objects are created and removed as needed so deal with themselves, doing this here will mean I can deal with them all at once in one place.

The damage bar is pretty simple in that removes % of health with each player strike taken. But thanks to how things work this appeared to disappear in chunks rather than a nifty little animation. This is an issue it seems that happens with most of these things as I also ran into this with game maker studio. I get why it happens It is just a bit rubbish. However a little search online brought up an answer of using a co-process, which I managed to amend from the example easily enough to work for me. As the example was showing how to fade text after it had been put on screen. My aim is to re-work this to look better but I wont do this until I actually create all the relevant graphics and layout stuff needed for the final game.

If all of this was not enough I went ahead and implemented player firing projectiles. sounds simple but not really as it took a while to get this working as I wanted. There were a few examples of ways to achieve this and most half worked but that was it, until I stumbled upon a solution that did work for me although I am not sure if it is the best way. That said at the moment you have unlimited firing, something that I will be sorting soon via an amount of bullets that reduce as you fire and not replenishing until you reload. This should be easy enough to implement. I also managed to put in collisions between player bullets and enemy's and get them to react accordingly. But it did take a little while to sort an issue where if you fire 2 bullets in the same direction one after the other and the first destroys an enemy, the second also disappears as it hits the in progress destroying enemy. Turns out a little addition to my code sorted this easily enough. I now need to place markers around the screen so that when player bullets go off screen they are destroyed from the game and memory, again this is easy enough to do.

I also re-wrote part of the code for the enemy as it was having some unexpected issues, this should solve some future problems that may have occurred as well. Going forward I have created a list of things I need to work out to get the game basically working in an Alpha way although it wont look pretty but that doesn't matter, it will let me test it all. As I can see it there is not too much left to work on code wise as most of the major coding parts are done. All that's left are smaller little bits of work and although there is quite a lot of them they each will add a fair bit of functionality to the game.

Next up on the list to achieve will be score's and scoring along with adding difficulty in the shape of energy speed increases due to player score, I may also play about with how much damage each enemy hit does to help very the game. Then also we have the amount of enemy players as well that we can deal with. After that I want to have a look at weather, I know this will be purely asthetic but i woudl like to see if I could create a sunny/rainy version of the game area.

>>back<<