Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A collection of tools and algorithms for developing traditional roguelikes. Such as field-of-view, pathfinding, and a tile-based terminal emulator.

License

Notifications You must be signed in to change notification settings

libtcod/libtcod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

libtcod

libtcod is a free, fast, portable and uncomplicated API for roguelike developers providing a true color console, pathfinding, field-of-view, and a few other utilities frequently used in roguelikes.

GitHub Workflow Status Documentation Status codecov GitHub commits since latest release (by date) Packaging status

Getting Started

Using Vcpkg

Libtcod is included as a port in Vcpkg. You can install libtcod via Vcpkg and then link the library using a CMake script as you normally do for that package manager. You may want to fork this template project if you plan on starting a project with this setup.

As a submodule

This is the best option for testing the development versions of libtcod.

You can include libtcod in a project by adding the libtcod repository as a submodule and then adding that directory to a CMake script with add_subdirectory.

See CONTRIBUTING.md for more details on configuring dependencies.

Using FetchContent

Libtcod can be included via FetchContent in a projects CMakeLists.txt:

cmake_minimum_required(VERSION 4.2)
include(FetchContent)

FetchContent_Declare(
    libtcod
    GIT_REPOSITORY https://github.com/libtcod/libtcod
    GIT_TAG main  # Replace main with desired version or revision later than 2.2.1
)
FetchContent_MakeAvailable(libtcod)

Afterwards libtcod can be linked to a project as normal.

target_link_libraries(${PROJECT_NAME} PRIVATE libtcod::libtcod)

See CONTRIBUTING.md for more details on configuring dependencies.

Using a pre-built binary

This is not recommend as these releases are unwieldy, are more difficult to update, and are less cross-platform. Do not upload binary files to your projects source repository.

If you are programming in C or C++ then Windows and MacOS binaries are available from the GitHub Releases page.

Keep in mind that as a C++ library, you may need to distribute the appropriate runtime with your program such as the Visual Studio 2015 runtimes or else the program will fail to run.

Compiling from source

This is only recommended for libtcod developers. See CONTRIBUTING.md.

Documentation and Tutorials

The latest documentation is here. It is incomplete, so most people will want to read the 1.6.4 documentation instead. Python users should use the python-tcod documentation.

libtcod comes with a sample application, implementations of which are provided in each of C (samples_c.c), C++ (samples_cpp.cpp), and Python (samples_py.py). This provides a decent overview of the basic features, in an interactive fashion. Each should be identical for the most part, so if you are using Windows, downloading the pre-compiled binaries and running the included samples.exe which is compiled from the C source code, should be representative of the other versions.

Contact / Community

For reporting bugs or requesting features you should use the GitHub Issues page. For smaller questions or help with a tutorial or project you can join #libtcod on the Roguelikes Discord or on the Libera.​Chat IRC.

Sponsors

Sponsors donating $25 or more per month will have their names or logos listed here.

About

A collection of tools and algorithms for developing traditional roguelikes. Such as field-of-view, pathfinding, and a tile-based terminal emulator.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published