Back to programming!

So last week I finished the Design document so this week I got start programming again. So on Monday we had our usual scrum meeting were I chose to do parts of the user interface. In more detail my assignment was doing the health bar, ammo bar and arrows.

Now I began doing the health bar because that was the most important U.I feature to get done before the alpha launch. We needed a health bar that was going to fill up each time you got hit, the health bars real name is dirt meter and it will show the player how dirty he is, when it is filled, you lose the game. But if you aren’t hit it will start regenerate, so there is no health packs needed, the player just need to avoid getting hit. To do this we are covering up the part of the health bar that isn’t used so it looks empty and each time you get hit we show a bit more of it using something called setTextureRect. Imagine an invisible rectangle laying over the texture. The texture rect is useful when you don’t want to display the whole texture, but rather a part of it. By default, the texture rect covers the entire texture. So by doing this we have a dirt meter.

We also needed an ammo meter, kind of. The player doesn’t really lose ammo, the sponge shooter sort of gets overheate. So we just use the same code for the health bar to the ammo bar, the only difference is that the ammo bar goes up when you shoot, if it reaches the top you have to wait for it to go down. So that is how we restrict the player from just keep spamming the shoot button.

I am now working on the arrow U.I. It works like this. The player needs to clean certain kids before their parents come. To show the player what kid he needs to clean we have arrows in different colors showing him where they are. So now that is what I am trying to fix before the alpha testing. It is an important feature and I hope it will go well. The rest of game is starting to shape up. We have now a background that the player can run around in. we still are missing sprites for the kids and animations for both kids and player. Everything is looking really ugly without any proper sprites. Hopefully it will get done soon.

Anton L-AImage