About

This is a Python cffi port of libtcod.

This library is hosted on GitHub.

Any issues you have with this module can be reported at the GitHub issue tracker.

Usage

This module was designed to be backward compatible with the original libtcodpy module distributed with libtcod. If you had code that runs on libtcodpy then you can use this library as a drop-in replacement:

import tcod as libtcod

Guides and Tutorials for libtcodpy should work with the tcod module.

The latest documentation can be found here.

Installation

The recommended way to install is by using pip. Older versions of pip will have issues installing tdl, so make sure it’s up-to-date.

Windows / MacOS

To install using pip, use the following command:

> python -m pip install tdl

Linux

On Linux, tdl will need to be built from source. Assuming you have Python and pip, you run these commands to install tdl:

$ sudo apt install gcc libsdl2-dev libffi-dev python-dev libomp-dev
$ pip install tdl

Requirements

  • Python 2.7+, Python 3.4+, or PyPy 5.4+
  • Windows, Linux, or MacOS.
  • Linux requires the libsdl2 package and must be installed from source.

License

python-tdl is distributed under the Simplified 2-clause FreeBSD license.