Visibility Implemented! (and more stuff)

posted in mousetails RPG
Published January 07, 2015
Advertisement
Now, I have a light system. You can't see a lot of the map unless you have explored. The system is pretty ugly and slow, since it just keeps a boolean grid that stores about every tile if it's visible or not. When you move, all tiles within a small radius are marked visable as long as nothing is blocking your view, and when you enter a room, the entire room is made visible. This makes the game feel a lot more dark already, but unlike other games of this type, this data is only one dimensional. What I mean is that in other games, if you have been somewhere, then you go somewhere else, and then a monster comes into the area you used to be, you can't see it, all you can see is the room like it was when you last saw it. The way my game is right now is if the grid says its visible, it will always be visible, and if you are close enough (limited by the size of your screen) you can see whatever is moving. I am going to think of a better way to do this.
Another thing you can see on the screen-shot is that I now have doors! You can open them, just by pressing O when you are next to them (no need to specify direction) and close them with C in the same way. They block your view, stop monsters, look cool and fill your log with "the door opens" times two hundred. Later, I am going to implement locked doors, but they are going to be handled a bit differently then other rogue-likes. I don't want doors to randomly be generated locked, I rather want that is the player finds a locked door, its probably a warning that there is something dangerous inside, or at least something special. That way, kicking doors won't be a useless waste of time, but give the player time to think if the actually wants to enter this dangerous room.
The third thing I did was make a weight system. Now, if you are carrying more then a certain amount of stuff (depending on your strength), you speed will drop by 25%. I don't actually have a way to train strength right now, and armor is not yet counted for weight.
I also implemented food. Its not very complicated right now, but if your hunger drops to much, you get slowed, and if its to high, you get slowed also. The lowest total speed you get from this is about 45%, meaning the average monster can do 2 moves+10% chance on one extra move for every one of your turns. Ill probably have to adjust these numbers later, but yea, it works.
I also made a few minor changes to the level generation code, to make passageways more windy. This introduces a few bugs, where doors are generated at corners, but those will be fixed soon.

My to do list for tomorrow:

  • Implement locked doors and special rooms
  • get rid of the green rooms for normal generation
  • a way to train strength
  • more work on the lighting system

To do later:

  • chests/containers
  • money/gems
  • shops
  • dungeon levels should be coming soon

This cool looking police guy doesn't want anybody entering the dungeon:
agent.png
2 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement