A Python cffi port of libtcod.
Project description
About
This is a Python CFFI port of libtcod, this is an offshoot of the python-tdl project and has been made into it’s own package. Both projects are still developed together, and this module provides functions specifically to be used by python-tdl.
This library is hosted on GitHub: https://github.com/HexDecimal/libtcod-cffi
Any issues you have with this module can be reported at the GitHub issue tracker: https://github.com/HexDecimal/libtcod-cffi/issues
python-tdl is a port of libtcod made to be “Pythonic”, you can find it here: https://github.com/HexDecimal/python-tdl
And libtcod is here: http://roguecentral.org/doryen/libtcod/
Installation
The latest Windows installer can be found on PyPI: https://pypi.python.org/pypi/libtcod-cffi
You might get errors during the installation of libtcod-cffi such as “ImportError: No module named ‘cffi.setuptools_ext’” This will happen if your cffi module is out of date.
The recommended way to install is by using pip, but be sure to update your cffi module first. Use the following commands:
pip install -U cffi pip install libtcod-cffi
This module can also be manually installed, make sure Python modules “setuptools” and “cffi” are up to date. Then go into the “setup.py” directory and running the command:
python setup.py install
A manual install requires that your Python environment is set up to compile binaries.
Usage
This module was designed to be backwards compatible with the libtcod.py script that was distributed with libtcod. If you had code that runs on the original module you can use this library as a drop-in replacement like this:
import tcod as libtcod
Guides and Tutorials for the original library should also work with this one. When possible, using PyPy will give the best performance, and is highly reccomended.
Requirements
Python 2.7+ or 3.2+
32 bit Windows, 32/64 bit Linux, or Mac OS/X (64 bit architecture)
An up-to-date version of python-cffi: https://pypi.python.org/pypi/cffi
Linux will require libsdl1.2, libsdl1.2-dev, libpng, zlib, libffi-dev, and python-dev packages
License
libtcod-cffi is distributed under the Simplified 2-clause FreeBSD license. Read LICENSE.txt, and the tcod/lib/README’s for more details.
Changelog
- 0.2.8
Fixed off by one error in fov buffer
- 0.2.7
Re-factored some code to reduce compiler warnings
Instructions on how to solve pip/cffi issues added to the readme
Official support for Python 3.5
- 0.2.6
Added requirements.txt to fix a common pip/cffi issue.
Provided SDL headers are now for Windows only.
- 0.2.5
Added /usr/include/SDL to include path
- 0.2.4
Compiler will now use distribution specific SDL header files before falling back on the included header files.
- 0.2.3
better Color performance
parser now works when using a custom listener class
SDL renderer callback now receives a accessible SDL_Surface cdata object.
- 0.2.2
This module can now compile and link properly on Linux
- 0.2.1
console_check_for_keypress and console_wait_for_keypress will work now
console_fill_foreground was fixed
console_init_root can now accept a regular string on Python 3
- 0.2.0
The library is now backwards compatible with the original libtcod.py module. Everything except libtcod’s cfg parser is supported.
- 0.1.0
First version released
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for libtcod_cffi-0.2.8-pp250-pypy_41-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b73cb91632d0517ef38e8ecd529991d3450b13a704bd1b902024343d3f88d70b |
|
MD5 | b547510c8de87b6670070f28dc829afb |
|
BLAKE2b-256 | af003ac6bfaa4e6af9da4426df020208deb974b50cd0156141d9572cae95a16f |
Hashes for libtcod_cffi-0.2.8-cp35-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3be2b76ea04d97f15b415587b8a6aa100302258eb54a2acf6d4e684f2178a713 |
|
MD5 | 2233d1dfc6bb8f436a7763679a55c6af |
|
BLAKE2b-256 | 634a68ad28cbf68c4bd1d366f24279c21f6a8b71096e777f3f18abc84b418a3a |
Hashes for libtcod_cffi-0.2.8-cp34-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8e18e374bd3638037bd2b8efab95f7e1b5442a9f79cc84eea33edbf87d4e38d |
|
MD5 | c5b9de90c96334789c604abb32cb2083 |
|
BLAKE2b-256 | f9c0f6043be6800f070d2e4342c18aa1c4d7348eef6160f7503b7381d6fb1f75 |
Hashes for libtcod_cffi-0.2.8-cp33-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b5b3cd02cb82c1ea16b7fbe37f5a0f94cee73d6177c42e8329f891897397818 |
|
MD5 | b0bb23352c1a28f1c00a91919be95a14 |
|
BLAKE2b-256 | 21ff3fca66cf4f920bb57e64b0b37bbd969a88c1ea23175109f6cb882a42e1e8 |
Hashes for libtcod_cffi-0.2.8-cp32-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f57f7c093cb460bbafc49757e35fa7c773576a798efaaa3dca5b191d8ebd0891 |
|
MD5 | 6db939cf930c130ead30ef28fa26187f |
|
BLAKE2b-256 | b8e7c602cfe058408e49dc8d6dd669ba360f75317d06e28b6facb83d92159710 |
Hashes for libtcod_cffi-0.2.8-cp27-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4756436b2c140d867bdf7f2a56392369ab80c5105b09fe1e5df57541a4a711e |
|
MD5 | 1c4792eea834b0c401b1643ee5d86620 |
|
BLAKE2b-256 | aace289bf1f6d2968b891491e0b0c7db2048820a7dc266bdc889c23feef77866 |
Hashes for libtcod-cffi-0.2.8.win32-py3.5.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd2cb5c0e8c42f9ff2c96f7a1fd156f47d4061d0d1a61c2d8d93ec5fe85f8363 |
|
MD5 | 6b6f4d0d9a4910ae23d2e157cf76f559 |
|
BLAKE2b-256 | 3a5dd8bb5a0068f5d9197bc231debe9f7479129fccb734812c451ac849538354 |
Hashes for libtcod-cffi-0.2.8.win32-py3.4.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32c22262c08249b8e6f8609da6d23ecb9bf471962029c2d3618fc845c694ddb9 |
|
MD5 | 0b7c5d944f9172f75a371929a8914095 |
|
BLAKE2b-256 | 52327d65a5ac1c57e1031b44a1b5ebf03334dd9d1e6c3ecd1ff4efaeeb411e6c |
Hashes for libtcod-cffi-0.2.8.win32-py3.3.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ba086dd8728b18e1b29fec13fbd2b28faf38f3f84e98a86e19f8b63a867e1e8 |
|
MD5 | cb7d465ec22f292ddeae4d0c2494343d |
|
BLAKE2b-256 | 6ea8b24acae67b9f0809d64e144d868c2f7fa0b3ac9eab05bb182ddabbbbebd3 |
Hashes for libtcod-cffi-0.2.8.win32-py3.2.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27ebbca4d7940bc9fb1cc890b4e6c95f58f84a9f8e5ee15c57e50eeec1ff34de |
|
MD5 | 2667416558aff198cb06df5557a3b68e |
|
BLAKE2b-256 | 0ac8339b2c16bf2563266ea09097955e964649289319ca156872eebd98e94cce |
Hashes for libtcod-cffi-0.2.8.win32-py2.7.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53237f4655a377927854c2def2272f6426cce37d0907f9c3d6ff38b2712c7b48 |
|
MD5 | 2a54ca81d71403ae157f2e9869093827 |
|
BLAKE2b-256 | bf250465813cc4ad76202847bbca78d9ebe6b300d0bfe92f79690789f46fb9c9 |