r/roguelikedev • u/aaron_ds Robinson • Jul 09 '19
RoguelikeDev Does The Complete Roguelike Tutorial - Week 4
This week we wrap up combat and start working on the user interface.
Part 6 - Doing (and taking) some damage
The last part of this tutorial set us up for combat, so now it’s time to actually implement it.
Part 7 - Creating the Interface
Our game is looking more and more playable by the chapter, but before we move forward with the gameplay, we ought to take a moment to focus on how the project looks.
Of course, we also have FAQ Friday posts that relate to this week's material.
- #16: UI Design(revisited)
- #17: UI Implementation(revisited)
- #18: Input Handling(revisited)
- #19: Permadeath(revisited)
- #30: Message Logs(revisited)
- #32: Combat Algorithms(revisited)
Feel free to work out any problems, brainstorm ideas, share progress and and as usual enjoy tangential chatting. :)
View all comments
Show parent comment
2
u/itsnotxhad Jul 09 '19
Right, I actually finished the tutorial in the first week and took the same approach of “don’t change anything until I know what the finished product looks like.” What I mean by my issue is that GameMap hardcodes nearly everything that is used to define a floor. That one class does too much for my tastes; it includes monster definitions, item definitions, drop tables, room generation, as well as the logic for moving between individual floors and possibly other stuff I’m forgetting. Adding nearly any content to the game requires “factor some stuff out of GameMap” as a first step.
What if I want to exclude monsters from a certain floor, or have an oddball treasure/enemy distribution for one floor only, or even have certain floors be a “boss chamber” with little exploration and a lot of enemies in one room? Currently that would require updating several dictionaries and branching if statements scattered throughout the class, and I’m not even sure I’d be getting it right.
I’ve already created a monsters.py and items.py to address this in part, and now I’m thinking the next step may be dungeon_floor.py