Glossary#

console defaults#

The default values implied by any Console print or put functions which don’t explicitly ask for them as parameters.

These have been deprecated since version 8.5.

tcod#

tcod on its own is shorthand for both libtcod and all of its bindings including python-tcod.

It originated as an acronym for the game the library was first created for: The Chronicles Of Doryen

libtcod#

This is the original C library which contains the implementations and algorithms used by C programs.

python-tcod includes a statically linked version of this library.

libtcod-cffi#

This is the cffi implementation of libtcodpy, the original was made using ctypes which was more difficult to maintain.

libtcod-cffi has since been part of python-tcod providing all of the libtcodpy API until the newer features could be implemented.

python-tcod#

python-tcod is the main Python port of libtcod.

Originally a superset of the libtcodpy API. The major additions included class functionality in returned objects, no manual memory management, pickle-able objects, and numpy array attributes in most objects.

The numpy functions in particular can be used to dramatically speed up the performance of a program compared to using libtcodpy.

python-tdl#

tdl is a high-level wrapper over libtcodpy although it now uses python-tcod, it doesn’t do anything that you couldn’t do yourself with just libtcodpy and Python.

It included a lot of core functions written in Python that most definitely shouldn’t have been. tdl was very to use, but the cost was severe performance issues throughout the entire module. This left it impractical for any real use as a roguelike library.

Currently no new features are planned for tdl, instead new features are added to libtcod itself and then ported to python-tcod.

python-tdl and libtcodpy are included in installations of python-tcod.

libtcodpy#

libtcodpy is more or less a direct port of libtcod’s C API to Python. This caused a handful of issues including instances needing to be freed manually or else a memory leak would occur, and many functions performing badly in Python due to the need to call them frequently.

These issues are fixed in python-tcod which implements the full libtcodpy API. If python-tcod is installed then imports of libtcodpy are aliased to the tcod module. So if you come across a project using the original libtcodpy you can delete the libtcodpy/ folder and then python-tcod will load instead.

color control#
color controls#

Libtcod’s old system which assigns colors to specific codepoints. See libtcodpy.COLCTRL_STOP, libtcodpy.COLCTRL_FORE_RGB, and libtcodpy.COLCTRL_BACK_RGB for examples.