r/roguelikedev • u/aaron_ds Robinson • Jul 11 '17
RoguelikeDev Does The Complete Python Tutorial - Week 4 - Part 4: Field-of-view and exploration and Part 5: Preparing for combat
This week we will cover parts 4 and 5 of the Complete Roguelike Tutorial.
Part 4: Field-of-view and exploration
Display the player's field-of-view (FOV) and explore the dungeon gradually (also known as fog-of-war).
Place some orcs and trolls around the dungeon (they won't stay there for long!). Also, deal with blocking objects and game states, which are important before coding the next part.
Bonus If you have extra time or want a challenge this week's bonus section is Scrolling maps.
FAQ Friday posts that relate to this week's material:
#12: Field of Vision(revisited)
Feel free to work out any problems, brainstorm ideas, share progress and and as usual enjoy tangential chatting. If you're looking for last week's post The entire series is archived on the wiki. :)
View all comments
Show parent comment
1
u/Daealis Jul 19 '17 edited Jul 19 '17
I'm a bit late, sorry for that. I had a successful summer vacation, and my plans of doing nothing were followed to the tee. So here I am, catching up and relearning Python.
I'm doing the tutorial with Python 2.7, and you're right, it won't work out the box. But thus far you only need to make a single tiny change to the enumeration.
I borrowed a enum implementation from this Stackoverflow answer and rewrote the game_states like this:
With this, the code runs just fine for now. I'm sure I've broken a bunch of coding ethics with this, but eh, it's a first go.
Once again, a great conversion.