Skip to main content

Pythonic 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

Installation

The latest Windows installer can be found on PyPI: https://pypi.python.org/pypi/tdl

If it’s available you can use pip instead by running the command:

pip install tdl

This module can also be manually installed by going into the “setup.py” directory and running the command:

python setup.py install

This will require that your Python installation can compile binaries.

About

TDL is a port of the C library libtcod in an attempt to make it more “Pythonic”

The library can be used for displaying tilesets (ANSI, Unicode, or graphical) in true color.

It also provides functionality to compute path-finding and field of view.

python-tdl is hosted on GitHub: https://github.com/HexDecimal/python-tdl

Online Documentation: http://pythonhosted.org/tdl/

Issue Tracker: https://github.com/HexDecimal/python-tdl/issues

python-tdl is a cffi port of “libtcod”. You can find more about libtcod at http://roguecentral.org/doryen/libtcod/

Requirements

License

python-tdl is distributed under the Simplified 2-clause FreeBSD license. Read LICENSE.txt for more details.

Changelog

1.5.0
  • python-tdl distributions are now universal builds

  • new Map class

  • map.bresenham now returns a list

1.4.0
  • The DLL’s have been moved into another library which you can find at https://github.com/HexDecimal/libtcod-cffi You can use this library to have some raw access to libtcod if you want. Plus it can be used alongside TDL.

  • The libtocd console objects in Console instances have been made public.

  • Added tdl.event.wait function. This function can called with a timeout and can automatically call tdl.flush.

1.3.1
  • Fixed pathfinding regressions.

1.3.0
  • Updated backend to use python-cffi instead of ctypes. This gives decent boost to speed in CPython and a drastic to boost in speed in PyPy.

1.2.0
  • The set_colors method now changes the default colors used by the draw_* methods. You can use Python’s Ellipsis to explicitly select default colors this way.

  • Functions and Methods renamed to match Python’s style-guide PEP 8, the old function names still exist and are depreciated.

  • The fgcolor and bgcolor parameters have been shortened to fg and bg

1.1.7
  • Noise generator now seeds properly

  • The OS event queue will now be handled during a call to tdl.flush. This prevents a common newbie programmer hang where events are handled infrequently during long animations, simulations, or early development

  • Fixed a major bug that would cause a crash in later versions of Python 3

1.1.6
  • Fixed a race condition when importing on some platforms

  • Fixed a type issue with quickFOV on Linux

  • Added a bresenham function to the tdl.map module

1.1.5
  • a for loop can iterate over all coordinates of a Console

  • drawStr can be configured to scroll or raise an error

  • You can now configure or disable key repeating with tdl.event.setKeyRepeat

  • Typewriter class removed, use a Window instance for the same functionality

  • setColors method fixed

1.1.4
  • Merged the Typewriter and MetaConsole classes, You now have a virtual cursor with Console and Window objects

  • Fixed the clear method on the Window class

  • Fixed screenshot function

  • Fixed some drawing operations with unchanging backgrounds

  • Instances of Console and Noise can be pickled and copied

  • Added KeyEvent.keychar

  • Fixed event.keyWait, and now converts window closed events into Alt+F4

1.1.3
  • Some of the setFont parameters were incorrectly labeled and documented

  • setFont can auto-detect tilesets if the font sizes are in the filenames

  • Added some X11 unicode tilesets, including unifont.

1.1.2
  • Window title now defaults to the running scripts filename

  • Fixed incorrect deltaTime for App.update

  • App will no longer call tdl.flush on its own, you’ll need to call this yourself

  • tdl.noise module added

  • clear method now defaults to black on black

1.1.1
  • map submodule added with AStar class and quickFOV function

  • new Typewriter class

  • most console functions can use Python-style negative indexes now

  • new App.runOnce method

  • rectangle geometry is less strict

1.1.0
  • KeyEvent.keyname is now KeyEvent.key

  • MouseButtonEvent.button now behaves like KeyEvent.keyname does

  • event.App class added

  • drawing methods no longer have a default for the character parameter

  • KeyEvent.ctrl is now KeyEvent.control

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

tdl-1.5.0.zip (2.6 MB view details)

Uploaded Source

Built Distributions

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

tdl-1.5.0.win32.msi (147.5 kB view details)

Uploaded Source

tdl-1.5.0-py2.py3-none-any.whl (37.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file tdl-1.5.0.zip.

File metadata

  • Download URL: tdl-1.5.0.zip
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tdl-1.5.0.zip
Algorithm Hash digest
SHA256 f9109553062afa697036d0574af680fcc9cb4bc947d257e30ad590160fe75971
MD5 123aed41483a486beb30969b60cffa3a
BLAKE2b-256 d16d64dcab731207911b9da0d5516a6b16cd194df8b97d3d0101da7b4140e84f

See more details on using hashes here.

File details

Details for the file tdl-1.5.0.win32.msi.

File metadata

  • Download URL: tdl-1.5.0.win32.msi
  • Upload date:
  • Size: 147.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tdl-1.5.0.win32.msi
Algorithm Hash digest
SHA256 387c6fd0b26f88fdcfd84b0185db271a8c03e226dc0cce4a29b42f36626d3cca
MD5 11c016a07cf574eb2f56577ff0c0b122
BLAKE2b-256 266e429165cdabd0a1dc1fa47001f41038b1a5aedea872823093663fe3a2e2c0

See more details on using hashes here.

File details

Details for the file tdl-1.5.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for tdl-1.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 de5959b3ed1f9ebe96d322d59a34d7b2f271cdbc78cbf86cb9fdc4666eb8c2bc
MD5 fc64431531531d2c98cc2a23f3d8ea13
BLAKE2b-256 06f95e09e3febcacf1b823370657f545e8806ee58431a458744cbf052340412d

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