CAGD 377 - Blog Post 5 - 11/10/2024

  During this sprint, my main objective was to get the attack button working and coded properly so that when I handed it off to my team they could figure out what numbers they might want to insert for the zombie horde damage, health, and city’s health, as well as figure out how long they would like to attack for. I even put headers, tooltips, as well as clamps on some of the numbers so that the team would know how much each value should be. It was a little difficult at first because the game was trying to run the same function three times even though in the code it was only being called once.


Next what I did was get the horde to move over when you pushed the attack button so that you could attack to begin with. Something else that I added to it was to make the health bars move with the horde. It was really good that I did that because how they were placed earlier they did have a possibility to not look right on some of the foldable devices or anything that had a really weird screen size. What would happen is that the health bars would be in this really weird spot on the screen and not above the city and the horde. So what I did was just make the text and health bar a child to the city or zombie horde and it won't break when the actual cities and zombies get added in. I did move a certain timer, and the health bars will not start to move until the zombie horde makes it over to the city, so it looks like they are attacking.

Something else I did for the attack system was to make it so that the player could win or lose during the attack if they do or don't have enough damage. The health bars will also move quicker if the player has significantly faster if their damage is extremely high compared to the health of the city. Messing with all these health bars and how they will look on the screen was cool because I have never done a health bar system, so this was some good practice.

        In the game currently, the damage to the horde is all dependent on how long the attack lasts for I had to make it so that when you attack it stops the timer. This was very important because if I didn't do this then it would keep going and then the player would still lose because the zombie horde health was depleted. Luckily to fix this it was just a simple check that needed to be done and all it had to do was during the attack pay attention to the health of both the city and the horde and stop the attack when the city health was depleted or go to the lose screen if the hordes health is depleted.

We got a few playtests and most of those play testers wanted to see betterer see the block movement and how they are currently moving around the board. What that means for me is I get to try and figure out how to make it so you can visually see them moving rather than just teleporting around. This was something that I was not looking forward to doing because I was struggling earlier. I might end up a little behind on points this sprint just because I am not figuring this out but I do believe that it will be worth it is what the players want.






Comments