Sword Combat 2 |
Top Previous Next |
Many of you have asked me to write a new version of the sword combat code from Aum12, and one of you has even provided a sword combat model a while ago, so I had to do it. Let's take a quick look at the features that were implemented in this demo:
- The player can kick the enemies if you press the left mouse button (left foot kick) or the right mouse button (right foot kick). - The player can use its sword if you press and hold the middle mouse button or the space key and use mouse gestures. Yes, you can draw a virtual, horizontal line using the mouse and the player will attack by rotating its sword horizontally; draw a vertical line using the mouse and the player will attack using its sword vertically. - The enemies can attack the player using four randomly picked, different kicks.
You can also find health packs, a vertical health bar used by the player, etc. It all starts with the player looking at a maze that's filled with enemies.
These enemies use primitive AI based on gliding along the walls when needed, but are highly trained karate fighters.
Nevertheless, the player can use its feet and its sword to get to the mystical artifact at the end of the maze (well, it's actually a donut model, but I thought that "mystical artifact" sounded better).
You can get health packs to restore player's health by simply running into them.
Destroy all the enemies and you'll be able to get to the mystical artifact.
I won't spoil the surprise, but if you manage to get the donut at the end of the level you're going to learn a new fighting technique for sure. Don't forget that all my "Plug and Play" articles are very well commented.
|