Weekly blog assignment #3
|
Hi there and welcome back! So, this week started a bit late for our group. Our scrum master was not here, so we had our weekly scrum meeting on Tuesday instead, which led to that no one in our group had anything special to do on Monday. So I spent Monday on just reading our code and trying to understand the whole structure better, as this has been and is my greatest flaw in programming. Mostly I read through our Animation and Animator class. As it was built in a very smart and easy-to-use way. But then, finally, Tuesday came and we planned out our week. So far I have worked on our power-ups. As I mentioned before, I am not good at code structure so I spent a lot of time on thinking through how to best implement them, if either to just write them in our GameState class or to make a manager class for all the power-ups. In the end, with a bit of outside help, I decided on making a manager class for the power-ups. I first started out by redoing the freeze power-up which freezes all monsters in place because we already had the code for it which made it easier to test the new PowerUpManager class. After a ton of errors and iterations, I have now finished the freeze power-up. I think that it will be somewhat easier to implement the other power-ups. The other power-ups that we have are firstly the pierce power-up. This one is supposed to make our items, that the player can throw, pierce all the enemies in one lane, meaning it does not disappear after hitting one enemy, it will still do the correct amount of damage to each monster, depending on their weakness and the items property. The last power-up we have is the bounce power-up. This one will make the thrown item jump between each monster. The item will only bounce on one monster per lane and also it will only jump on monster that are farther back than the one that was hit just before. This, like the pierce power-up, will also deal the correct amount of damage to each monster. The biggest problem I have had so far is deciding whether the functions should be of void type or boolean type, as I did not have the final or best structure in head. So I just tested back and forth, adding new functions and removing the ones I had for quite a while. But in the end I ended up with the same functions I had in the beginning. I ended up with a activation function to activate the freeze power-up, a function to the remove the freeze after a set time and lastly a function that returns a boolean value that is sent back to the GameState class to make sure that the monsters stop moving and also that they stop spawning. And now, to finish up, here is a picture of my end result. It looks like the monsters are still moving if you look at the waves behind them, but that animation is not finished yet, I plan to make that animation stop as well as soon as possible. That is all for me this week, I hope you enjoyed reading and tune in next week for more progress! Have a swell week! Ara |
