Pirate Life

Top  Previous  Next

Ahh, the amazing pirate life, with those hooks and eye patches and all the other paraphernalia. What's not to like about it? Wait, almost forgot about those juicy yarrs!


It's not a surprise, I would think, that this magazine's "Plug and play" section includes a pirate-related game. Yarr, you maneuver a cannon, trying to sink your opponents' ships, and you get some gold every time you manage to do that - without getting your ship sunk, of course.


It may sound easy, but the waves and the wind will affect the trajectory of your projectiles, just like in real life. Also, your enemies will become tougher as you progress through the three game levels. Their firing angles continue to utilize some randomness, but I'm tellin' ya, the gunner from the 3rd level has mastered its craft!


Everything starts nice and easy, with your ship being able to withstand four hits per level, while the enemy ship will sink after three hits.




Use the "A" and "Z" keys to adjust the angle of your cannon, and then press "space" to fire a bomb. By the way, player's tilt angle will change to a random value after firing a bomb. It may seem like recoil (or something else) but the truth is that I have coded it this way because I wanted to make things a bit harder for the player. Otherwise, after discovering the correct firing angle; he/she would have simply fired a few consecutive bombs, and thus destroy the enemy ship easily.


Here's how the enemy ship looks after being hit twice.




Things will look (and actually be) a bit harder as you move towards the third level. The enemies will fire more accurately as well.




The good news is that if you die, you'll only have to restart the current level. You can do that by pressing the "R" key.




The code is very well commented, as always.