Table of contents
- Table of contents
- What can it do?
- How do I get set up?
- Getting Started
libtcod is a free, fast, portable and uncomplicated API for roguelike developers providing an advanced true color console, input, and lots of other utilities frequently used in roguelikes.
What can it do?
If you want to get a quick overview of the features that libtcod provides, check out the Features page.
If you want to get a quick overview of games which have used libtcod, check out the Projects page.
libtcod is also well known for it's easy to follow tutorial, which many people have used to get started developing a roguelike. Follow the relevant links the tutorial gives, and it will point you to the right locations.
How do I get set up?
Using one of our downloads
Windows and MacOS binaries are available from the GitHub Releases page.
If you are programming in C or C++, various sample projects are included within the repository which can be used as examples of various features.
For those who wish to program in Python the basics are described in part 1 of the tutorial. It's currently recommended to install libtcodpy via python-tcod rather than using the libtcodpy package included in this repository.
Warning: If you download these builds, run
samples.exe as your very first
If you are unable to and get an error about
vcruntime140.dll being missing,
you need to install the two
Visual Studio 2015 runtimes.
Make sure you install the 32-bit runtime.
And make sure you also install the 64-bit runtime.
samples.exe again, and it should now work.
Whether you plan to develop in C, C++, Python or some other language, this is
Compiling from source
You can clone with Mercurial via the BitBucket repository, or with Git via the GitHub repository. You can then checkout a specific tag or get the in-development version from the default or master branches.
All compilation methods, currently including Visual Studio (Windows),
SCons (Windows, Linux, MacOS) and Autotools (Linux, MacOS), are located within
Windows users who prefer to use Visual Studio directly can either run the top-level 'build.bat' script, or locate and open the provided solution directly using Visual Studio. The solution is currently for Visual Studio 2015, and the free community edition is highly recommended.
SCons automatically downloads SDL2 and can be used on all platforms. Instructions are provided here. The current release builds are built using SCons.
Autotools is a common standard on Linux, and can be used for MacOS. Instructions are provided here.
If you ever need to statically compile libtcod the easiest method would be to
src/libtcod.cpp source files, which include all
the other sources. Further instructions are included in those files.
libtcod comes with a sample application, implementations of which are provided
in each of
and Python (samples_py.py).
This provides a decent overview of the basic features, in an interactive
Each should be identical for the most part, so if you are using Windows,
downloading the pre-compiled binaries and running the included
which is compiled from the C source code, should be representative of the other