Who is this tutorial for?
Anyone who wants to try!
Seriously though, I would recommend being at least a little familiar with the basics of Python and programming in general before attempting this tutorial. Nowhere on this website will you find a detailed description of how classes work, why functions exist, or how to do basic operations in Python (though some sections do explain some of Python’s lesser known features, like the for-else statement). Instead, this tutorial focuses more on how to use Python and the TCOD library to create a roguelike game, and assumes some basic knowledge of programming.
You can certainly attempt to complete it without any programming knowledge, but it will be fairly difficult. There are tons of great resources online to learn the basics of programming and Python, and I would recommend spending at least a little time with them before attempting to dive in here.
Why does this tutorial exist?
This tutorial was made from a desire to improve upon the Roguebasin Python tutorial in a few ways.
- To update the tutorial to use Python 3 instead of Python 2 (though the original tutorial is pretty close to compatible with Python 3 already).
- To remove all globals from the project. Admittedly, globals can make things much easier in certain contexts, but in my opinion, the original tutorial uses them far too liberally.
- To split the code base up into multiple files. Almost every programmer from every language agrees that splitting code up into multiple files is a good idea, for a multitude of reasons. While the original tutorial was definitely simpler to get into with its one file approach, it could quickly lead to more difficult to maintain code.
All that being said, the original tutorial is still a great resource. It’s probably easier for new programmers to get into, and it’s been tried and tested for many more years than anything written here. This tutorial is based on the same outline as that one, with the same parts and end result, so I owe the creators of that tutorial a great debt.
Why is it posted here, rather than on Roguebasin?
I actually tried to create this tutorial on Roguebasin back in the day, but ended up getting banned because I tried making too many pages at once. Besides, I’m not sure the code highlighting utilized in this tutorial is possible in Roguebasin. Nevertheless, if anyone wants to try porting the text from this tutorial over to there, by all means, feel free.
Where can I suggest improvements or contribute?
On this website’s Github page. You can also find me on Reddit and Discord under the username TStand90.
Credits and thanks
This tutorial could not have happened without the help of the following people:
- The authors and contributors to the Roguebasin Python tutorial. Without that tutorial, this one would never exist.
- The people who have contributed to and maintained libtcod now and over the years. Without their hard work, so many wonderful roguelikes would not exist, and many of us would never have the ability to complete a game.
- Everyone who has ever provided feedback on this tutorial and website. You are all kinder and more patient than I deserve.
- All the participants in the yearly “Roguelikedev Does The Complete Roguelike Tutorial” series, year after year.
- /u/aaron_ds, for organizing said event.
- FractalWire on Github, for doing the markdown conversion.