Week 3, Player Shield

An important feature in our game, Datepocalypse, is the ability for the player to protect herself from all sources of incoming damage, be it enemies, enemy projectiles or natural disasters. Not only is it important because of the obvious fact that the enemies will try to kill the avatars but rather because controlling two avatars at once can be tough as it is. The shield would give the player some time to adjust her motor skills as well as giving her “a chance to breath”.

The shield activates as the two avatars get close to (or even collide with) each other and got it’s creation coordinates from the avatar on the left side, forming an invisible circular body around the two avatars, and using the game’s collision manager this was a fairly manageable task. A small problem we had the start was that the shield also collided with the avatars making it bounce around uncontrollably at times. This was solved by excluding the avatars collision check with the body. To visualize the shield we gave it a heart shaped sprite that neatly framed the two avatars.

To represent the shield’s health we added a timer for the shield to keep track on, which steadily decreased over time (with a time to live of 10 seconds). As the timer reached 0 the shield was deactivated and the player needed to part the avatars to make the shield recharge again. The player could of course deactivate the shield at any time by moving the avatars away form each other. The timer, or the shield’s health, was a necessity to avoid that the player kept using the shield at all times which would make the game too easy and boring. It should also make the player move around a bit more in the game area. As the shield was hit by enemy projectiles it’s health would drop a set amount (1 second) making it a bit riskier to try to outlast a bullet storm from the enemies as once the shield was gone the avatars would immediately be exposed to the incoming bullets. Sadly, we decided that the projectiles that hit the shield should be deleted on the spot rather than our original thought was to make them bounce off shield which may have given the shield feature a more epic feeling. This decision was partially based on time pressure to finish the game within our schedule but also on the limit of coding experience.

We also added a few conditions for the player as the shield was active. When active the avatars could no longer be able to shoot and they would also move around much slower.

Lastly we added a bar on the game’s Head-Up Display in the bottom center of the screen. The position was chosen based on that we figured that the player would likely keep her avatars (mostly) at the bottom of the screen to get a clearer view of incoming waves of enemies and thus shouldn’t have to look far to see if the shield was ready to use or not. The bar’s increase / decrease function was rather easily adjusted by just checking the shield’s timer.
blog shield

Week 3, Player Shield

One thought on “Week 3, Player Shield

  1. Hello Marcus, interesting post, I like how you go into the reason why you in the first place created the player shield, you also go into details’ of how it works. However one question, you say that the player could move the two characters away earlier to start recharging the shield faster, if the shield gets deactivate do you have to wait for it to fully recharge before you can reactivate it again?

    You also go into that when the shield is activated the player can no longer shoot the enemies and that the player would move slower when activated, does the shield then deal damage to the enemies when it’s activated? Because if not it does feel the shield would in most situation be quite weak. Another question is if you can still use other power-ups when it’s activated, or are they also limited like the shooting? I think this part could use a bit more explanation of what parts of the game that gets limited.

    Lastly I would like to say that maybe for next time to try to include an in-game screenshot as it would be interesting to see how it actually looks and works inside the game. Other than that, nice job and keep it coming! I’m looking forward to the beta!

    Like

Leave a comment