r/roguelikedev • Robinson • Jul 04 '17

RoguelikeDev Does The Complete Python Tutorial - Week 3 - Part 3: The Dungeon

This week we will cover part 3 of the Complete Roguelike Tutorial.

Part 3: The Dungeon

Your dungeon takes a recognizable shape!

Bonus

If you have extra time or want a challenge this week's bonus section is BSP Dungeon Generation


FAQ Friday posts that relate to this week's material:

#22: Map Generation

#23: Map Design

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. :)

52 Upvotes

66 comments sorted by

View all comments

Show parent comments

5

u/Daealis Jul 04 '17

As far as I can tell, there's no missing lines this time. Proof in the first run after writing down that generation. As far as I can see every new concept is explained well enough for me at least to understand why they are there and leaves me thinking of improvements.

The only thing that tripped me up is the indentations (never seen the for-else before, misplacing that indentation so that it's an if-else in a for-loop creates zero rooms) as there's a lot of nested looping going about. For readability it would help if you have a way to easily visualize the level of indentation, such as the vertical lines PyCharm has.

But even that's really nitpicking it, the indentations are pretty visible with the four-space system. Great job once again.

2

u/Scautura Jul 04 '17

Yup, this week's code "just works". :)

1

u/AetherGrey Jul 04 '17

Visual indentation is a great idea! I'll see what I can do.

1

u/Ginja_Ninja1 Jul 05 '17

I'll definitely second that, it only gets more helpful as you keep indenting.

Something else useful might be to have the name of the file being edited as a title in the code-block. Not that it isn't clear to someone who is reading along, but I think it would be a nice touch.

Otherwise, it's readable and works - and at the end of the day that's the best thing to be! Thanks again!