Showing posts with label battle. Show all posts
Showing posts with label battle. Show all posts

Turambar Day 2

Things are looking much better today for Turambar. I got some monsters up in there. They do not move too smart. They get blocked when more than one wants to come get you. But they move. You can try to hit them. However you don't really do much damage for now. You essentially die in battle all the time.

I started putting in the structure for items such as weapons. But I still need some user interaction for wieldiing the weapons. I got stuck a bit there because I want some easy to user keyboard entries to pick from lists. Did some research on that today. Will hopefully finish that up tomorrow. Then you should be able to find and wield good weapons to attack monsters with.

To be complete, I should also attend to the monster movement AI. They just try to make a straight line toward the player. If another monster is in the way, they are trapped. If the dungeon maze prohibits a direct path to the player, they get stuck. Some of these monsters should be start enough to walk around walls to get to the player. Just how to I implement that though? It is a nice problem to solve I bet.

Roguelike Next Steps

I performed a redesign on the code for my roguelike game engine. Changed the way I stored items that were in the player's inventory or equipment list. This made a lot of the routines simpler and more generic. Now I have the power to implement additional items such as potions, rings, amulets, and wands.

But I think I might change directions. Implementing more items is just an extension of what I have already. I need something new. I think it is time to add monster opponents into the game engine.

Monsters have some different behavior. They fight you. That adds some real time battle code. Right now the controls are just the player moving around the dungeon and interacting with items. I got to consider monster movement now as well. Also need to implement the hit points system for both players and monsters. Let's see where this leads.

Monsters

The last item I had to add to my JSRL roguelike game was monsters. This proved to be a challenging task. It was easy to randomly place monster characters in the dungeon. But then I needed to code the monsters to become aware of the player. Then the monster needed to chase the player.

The addition of monsters also required battles. I added the ability for the player to attack the monsters. The monsters needed to be able to attack the player as well. This required me to track the hit points of the player and all monsters. It also required me to start providing messages to the user based on the results of the fight.

There is not much functionality to add. I should test the game in browsers other than Internet Explorer such as Firefox. Then I would like to put a title screen in there. Finally I shall upload the game to a site where everyone can access it. Get ready for some fun.