Shield added

I realized due to the addition of the snipers, that I needed to give the player another way of defending themselves, aside from just movement. I came up with the idea of using a shield, that will deflect attacks that come from in front of the player.

This is a bit hard to implement though, since I don’t have angled collision detection in the game. I figured I’d go to the stacking boxes approach again, sort of like per pixel collision detection, for those familiar with that.

As you can see, I have a line of chunks, it looks like, that make up my shield. That is me rendering the collision boxes themselves, instead of the proper shield image that I have. The important point, is that it works pretty flawlessly. This is important, because I’ll be using the same system for the sword collision detection, as I detailed in a previous post.

Anyway, the shield itself has “health”, which drains constantly when the shield is active, and replenishes steadily when the shield is lowered. It also is drained by taking damage. All this adds up to not enticing the player to abuse the shield by having it up all the time. None of this is implemented yet, but I’ve already got the variables, and implementation is fairly trivial from here.

Edit: also, funny that the game crashes in a demo.

This entry was posted in Monochrome. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s