Showing posts with label movement. Show all posts
Showing posts with label movement. 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.

Message History

Previously my roguelike game engine displayed one line of messages. This meant that when multiple messages were generated around the same time, you could only see the last one. That has been corrected in version 0,03 of my game engine. Now I provide a viewport on screen that shows the last 10 messages.

I also significantly upped the number of rooms in the maze from 60 to 200. Before you could travel the outskirts of the maze and not see too much scenery. The player would get the feeling that the movement keys were not working. Now there are so many rooms that you see them scroll by even when on the edge of the maze.

Finally I experimented with different colors to drzw the maze. My computer is old and is getting some screen burn in. The white on black background seemed to be contributing to the problem. I tried a gray color. But that was too hard to see. I have settled on a light gray color. However I might create and use a custom color that is a little brighter.

The View Port

I am busy working on my roguelike code library. Previously I had a "maze" which fit on the screen. Now I have expanded the maze so that it is bigger than what can be shown on the screen.

The size of the maze is not 800 x 250. You only see an 80 x 25 view port into the maze on the screen. The position of the player is always fixed. I added the ability for the player to move around the maze with the arrow keys. The maze moves around the player in the view port.

I still need to connect the rooms with passages. Then perhaps it will be time to put items on the map such as weapons and armor. I would love to get to the inventory management and player eqiupment modules if at all possible.

We Have a Player

I sneaked in a little development on my JSRL roguelike today. Got the player character to display (the great "@" symbol). I even implemented character movement.

Unfortunately I do not have a keyboard with a number keypad. So I had to remap movement keys to alphabetic characters. I think that's how the original Rogue handled movement.

It should be trivial to map the movement back to a real keypad once I test with a standard keyboard. Now I am deliberating on what to add next? Some gold? Stairs to a lower level? Whatever I choose, I will do that work tomorrow.

Drawing Rooms in MazeBand

I got it so that your character moves around when you press the movement keys. That seemed like good progress. Now it is time for the main part of my game - the maze.

Everything about programming the maze is math. Sure it is just 2D math. But you got to get the details right. I got some rooms being randomly drawn. However they are all clustered in the upper left hand corner of the screen. And they always overlap.

I think I just need to tweak some values being passed into my random number generator. Then I need to code the rules that throw out a random room if it overlaps another. Then I will be off to the races to connect the rooms. Will I be done? No. But I will have achieved my goal - which is the MazeBand.

There's Gold in This Dungeon

Now that I am no longer struggling with the user interface, I am adding basic features to my dL1 game. Here is a big one. When you press the directional keys, your guy moves on the screen. And he does not walk through walls. That's a good thing.

I decided to add some gold in the dungeon. It needed something. There really isn't a maze set up yet. Guess what? I colored the gold yellow. Yeah I know. That is just plain crazy. There is even a counter that shows how much gold you have amassed.

The next decision is pretty simple. Do I add some monster enemies first? Or do I try to draw a better maze for the dungeon. The sky is the limit now. There are about 5 days left in the 7 Day Roguelike Challenge. Things are lining up for me to get a game that at least runs.