Log 2
──────────────┤ View On GitHub ├──────────────
- View History Scrolling:
- Added some scroll commands using the command pattern. Needs to be refactored so that cursor doesn't exceed the provided console buffer state. Using this method essentially any UiWindow can take advantage of scrolling.
- Items.
- Started off with a design that included inheritance and components that was just way too complicated for what it needed to be. By Wednesday I finally realised what I was trying to do would never work and so completely threw it out and started again. Followed more or less the roguebasin version of the tutorials, except using the non deprecated render functions.
- Instead of using characters to select an item in the inventory I used the scrolling component I added in the history view to be able to scroll through the view and then select an item with the return key.
- Whats missing? Well, right now using an item doesn't use up a turn. This is down to the way I implemented the commands. I can easily fix this by adding state to the game engine and then using up a turn in some actions and not using a turn in others. But, that's still an open to do.
- Wild Bugs Spotted:
- You can scroll through items that don't exist. Trying to use them blows up since the consumable component at the index is a `nullptr`
- Monsters render below corpses. I added a layer property to the ASCIIComponent, but the rendering is not taking it into account.
- Sometimes the message log overlaps with the map.
- Some options here: move it down one row. Overlay it with some transparency, enabling it to be toggled with the current key bindings.
- The inventory screen doesn't scroll. When you have more items than the height of the window the view will be broken.
- Inventory cursor also allows scrolling beyond the items in the view.
Here's the Pull Request for this weeks changes.
Whats Next
- Finish week 9 of the tutorials
Get Yet Another Roguelike tutorial with C++ and Libtcod
Yet Another Roguelike tutorial with C++ and Libtcod
Status | Prototype |
Category | Other |
Author | daniebker |
Tags | cpp, Game engine, libtcod, Roguelike, roguelikedev |
Leave a comment
Log in with itch.io to leave a comment.