Skip to main content

A Python cffi port of libtcod.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libtcod-cffi-0.2.8.zip (1.9 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

libtcod_cffi-0.2.8-py2.7.egg (588.6 kB view details)

Uploaded Egg

libtcod_cffi-0.2.8-pp250-pypy_41-win32.whl (1.7 MB view details)

Uploaded PyPyWindows x86

libtcod_cffi-0.2.8-cp35-none-win32.whl (630.6 kB view details)

Uploaded CPython 3.5Windows x86

libtcod_cffi-0.2.8-cp34-none-win32.whl (1.6 MB view details)

Uploaded CPython 3.4Windows x86

libtcod_cffi-0.2.8-cp33-none-win32.whl (1.6 MB view details)

Uploaded CPython 3.3Windows x86

libtcod_cffi-0.2.8-cp32-none-win32.whl (1.6 MB view details)

Uploaded CPython 3.2Windows x86

libtcod_cffi-0.2.8-cp27-none-win32.whl (1.6 MB view details)

Uploaded CPython 2.7Windows x86

libtcod-cffi-0.2.8.win32-py3.5.exe (761.5 kB view details)

Uploaded Source

libtcod-cffi-0.2.8.win32-py3.4.exe (1.8 MB view details)

Uploaded Source

libtcod-cffi-0.2.8.win32-py3.3.exe (1.8 MB view details)

Uploaded Source

libtcod-cffi-0.2.8.win32-py3.2.exe (1.8 MB view details)

Uploaded Source

libtcod-cffi-0.2.8.win32-py2.7.exe (1.8 MB view details)

Uploaded Source

File details

Details for the file libtcod-cffi-0.2.8.zip.

File metadata

  • Download URL: libtcod-cffi-0.2.8.zip
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for libtcod-cffi-0.2.8.zip
Algorithm Hash digest
SHA256 f3e627fc240e40b9950324fad64e901e3619bc5bc74dcdd2ab401fb730866b61
MD5 97a790694da1ea7eccb426a25c76f462
BLAKE2b-256 701c95e82ecba941b5eb5537e9dd7f509afd5d79a8b8c2d6dd7cf9a407e57055

See more details on using hashes here.

File details

Details for the file libtcod_cffi-0.2.8-py2.7.egg.

File metadata

File hashes

Hashes for libtcod_cffi-0.2.8-py2.7.egg
Algorithm Hash digest
SHA256 74bb736d9c7e5c4bbbe71420fc486aa8438cc7cf99c2e4b659af16ec9016b5be
MD5 33ecce5ae6a24f265c79ceb5db1cb4fb
BLAKE2b-256 356547c2a59bee6ed59a82af84f0fc07ffade8492ee8bf957ca452f755d52978

See more details on using hashes here.

File details

Details for the file libtcod_cffi-0.2.8-pp250-pypy_41-win32.whl.

File metadata

File hashes

Hashes for libtcod_cffi-0.2.8-pp250-pypy_41-win32.whl
Algorithm Hash digest
SHA256 b73cb91632d0517ef38e8ecd529991d3450b13a704bd1b902024343d3f88d70b
MD5 b547510c8de87b6670070f28dc829afb
BLAKE2b-256 af003ac6bfaa4e6af9da4426df020208deb974b50cd0156141d9572cae95a16f

See more details on using hashes here.

File details

Details for the file libtcod_cffi-0.2.8-cp35-none-win32.whl.

File metadata

File hashes

Hashes for libtcod_cffi-0.2.8-cp35-none-win32.whl
Algorithm Hash digest
SHA256 3be2b76ea04d97f15b415587b8a6aa100302258eb54a2acf6d4e684f2178a713
MD5 2233d1dfc6bb8f436a7763679a55c6af
BLAKE2b-256 634a68ad28cbf68c4bd1d366f24279c21f6a8b71096e777f3f18abc84b418a3a

See more details on using hashes here.

File details

Details for the file libtcod_cffi-0.2.8-cp34-none-win32.whl.

File metadata

File hashes

Hashes for libtcod_cffi-0.2.8-cp34-none-win32.whl
Algorithm Hash digest
SHA256 a8e18e374bd3638037bd2b8efab95f7e1b5442a9f79cc84eea33edbf87d4e38d
MD5 c5b9de90c96334789c604abb32cb2083
BLAKE2b-256 f9c0f6043be6800f070d2e4342c18aa1c4d7348eef6160f7503b7381d6fb1f75

See more details on using hashes here.

File details

Details for the file libtcod_cffi-0.2.8-cp33-none-win32.whl.

File metadata

File hashes

Hashes for libtcod_cffi-0.2.8-cp33-none-win32.whl
Algorithm Hash digest
SHA256 0b5b3cd02cb82c1ea16b7fbe37f5a0f94cee73d6177c42e8329f891897397818
MD5 b0bb23352c1a28f1c00a91919be95a14
BLAKE2b-256 21ff3fca66cf4f920bb57e64b0b37bbd969a88c1ea23175109f6cb882a42e1e8

See more details on using hashes here.

File details

Details for the file libtcod_cffi-0.2.8-cp32-none-win32.whl.

File metadata

File hashes

Hashes for libtcod_cffi-0.2.8-cp32-none-win32.whl
Algorithm Hash digest
SHA256 f57f7c093cb460bbafc49757e35fa7c773576a798efaaa3dca5b191d8ebd0891
MD5 6db939cf930c130ead30ef28fa26187f
BLAKE2b-256 b8e7c602cfe058408e49dc8d6dd669ba360f75317d06e28b6facb83d92159710

See more details on using hashes here.

File details

Details for the file libtcod_cffi-0.2.8-cp27-none-win32.whl.

File metadata

File hashes

Hashes for libtcod_cffi-0.2.8-cp27-none-win32.whl
Algorithm Hash digest
SHA256 b4756436b2c140d867bdf7f2a56392369ab80c5105b09fe1e5df57541a4a711e
MD5 1c4792eea834b0c401b1643ee5d86620
BLAKE2b-256 aace289bf1f6d2968b891491e0b0c7db2048820a7dc266bdc889c23feef77866

See more details on using hashes here.

File details

Details for the file libtcod-cffi-0.2.8.win32-py3.5.exe.

File metadata

File hashes

Hashes for libtcod-cffi-0.2.8.win32-py3.5.exe
Algorithm Hash digest
SHA256 bd2cb5c0e8c42f9ff2c96f7a1fd156f47d4061d0d1a61c2d8d93ec5fe85f8363
MD5 6b6f4d0d9a4910ae23d2e157cf76f559
BLAKE2b-256 3a5dd8bb5a0068f5d9197bc231debe9f7479129fccb734812c451ac849538354

See more details on using hashes here.

File details

Details for the file libtcod-cffi-0.2.8.win32-py3.4.exe.

File metadata

File hashes

Hashes for libtcod-cffi-0.2.8.win32-py3.4.exe
Algorithm Hash digest
SHA256 32c22262c08249b8e6f8609da6d23ecb9bf471962029c2d3618fc845c694ddb9
MD5 0b7c5d944f9172f75a371929a8914095
BLAKE2b-256 52327d65a5ac1c57e1031b44a1b5ebf03334dd9d1e6c3ecd1ff4efaeeb411e6c

See more details on using hashes here.

File details

Details for the file libtcod-cffi-0.2.8.win32-py3.3.exe.

File metadata

File hashes

Hashes for libtcod-cffi-0.2.8.win32-py3.3.exe
Algorithm Hash digest
SHA256 9ba086dd8728b18e1b29fec13fbd2b28faf38f3f84e98a86e19f8b63a867e1e8
MD5 cb7d465ec22f292ddeae4d0c2494343d
BLAKE2b-256 6ea8b24acae67b9f0809d64e144d868c2f7fa0b3ac9eab05bb182ddabbbbebd3

See more details on using hashes here.

File details

Details for the file libtcod-cffi-0.2.8.win32-py3.2.exe.

File metadata

File hashes

Hashes for libtcod-cffi-0.2.8.win32-py3.2.exe
Algorithm Hash digest
SHA256 27ebbca4d7940bc9fb1cc890b4e6c95f58f84a9f8e5ee15c57e50eeec1ff34de
MD5 2667416558aff198cb06df5557a3b68e
BLAKE2b-256 0ac8339b2c16bf2563266ea09097955e964649289319ca156872eebd98e94cce

See more details on using hashes here.

File details

Details for the file libtcod-cffi-0.2.8.win32-py2.7.exe.

File metadata

File hashes

Hashes for libtcod-cffi-0.2.8.win32-py2.7.exe
Algorithm Hash digest
SHA256 53237f4655a377927854c2def2272f6426cce37d0907f9c3d6ff38b2712c7b48
MD5 2a54ca81d71403ae157f2e9869093827
BLAKE2b-256 bf250465813cc4ad76202847bbca78d9ebe6b300d0bfe92f79690789f46fb9c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page