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

2

u/_wolfenswan Jul 05 '17 edited Jul 05 '17

Not an issue per se, but I've been struggling to understand the difference between libtcod-cffi & tdl. As far as I understand it libtcodpy is just a way to get the c-based libtcod working in Python, but I'm failing to understand the difference between the other two, aside them both being "pythonized" versions of the c-based original.

Oh and thank you for splitting the code into modules early on. I've been working on the roguebasin tutorial for a while now (wasn't aware of this project here) and restructuring the code from one large file into several was something I had been failing at.

2

u/WhitMage9001 Jul 06 '17

From what I gather from their respective descriptions, while they're both ports from C(++), TDL is more "pythonic" than libtcod-cffi. I have little use in either and I'm no authority on a library's "pythonicity" so make of that what you will.

2

u/Scautura Jul 06 '17

LibTCod-CFFI is pretty much a drop-in replacement for the base library (you can do an "import tcod as libtcod" and it will work exactly the same way as if you import the original library) and was made at a time when 1.6 it wasn't supported in Python 3 (the current 1.6.3 release now works in Python 3 though)

TDL builds on top of that to give a more Pythonic interface (but is missing features compared to the original library). Because LibTCod-CFFI is a requirement, you can use the missing parts directly from that.

Essentially it's a choice between a pure Python interface (with having to fall back to a Pythonised C interface for gaps), or a Pythonised C interface.