===== BearLibTerminal ===== [[#download]] | [[#documentation]] | [[https://github.com/cfyzium/bearlibterminal|source code]] | [[http://forums.roguetemple.com/index.php?topic=3896.0|forum]] BearLibTerminal is a library that creates a terminal-like window facilitating flexible textual output and uncomplicated input processing. A lot of roguelike games intentionally use asketic textual or pseudographic visual style. However, native output via the command line interface ususally have a few annoying shortcomings like low speed or palette and font restrictions. Using an extended character set (several languages at once or complicated pseudographics) may also be tricky. BearLibTerminal solves that by providing it's own window with a grid of character cells and simple yet powerful API for configuration and textual output. Notable features of BearLibTerminal include: * Ease of Unicode usage. * Support for bitmap and vector (TrueType) fonts. * Extended output facilities: tile composition, alignment, offsets. * High performance (uses OpenGL). * Keyboard and mouse support. * Windows, Linux and OS X builds. * Bindings for several programming languages: С/С++, C#, Lua, Pascal, Python, Ruby. There are similar tools, also primarily intended for roguelike development: * [[http://doryen.eptalys.net/libtcod/|libtcod]] * [[https://github.com/tommyettinger/TinyCurses|TinyCurses]] Unlike popular libtcod library, BearLibTerminal focuses on graphics output. It does not include random number generators or path finding algorithms. Instead BearLibTerminal provides a lot more options for font/tileset configuration and tile-based output. ==== Some screenshots ==== {{gallery>:en:bearlibterminal?demo*.png&107x80&crop&lightbox}} ==== Simple example: C/C++ ==== #include "BearLibTerminal.h"   int main() {     terminal_open();       // Printing text     terminal_print(1, 1, "Hello, world!");     terminal_refresh();       // Wait until user close the window     while (terminal_read() != TK_CLOSE);       terminal_close(); } ==== Simple example: Python ==== from bearlibterminal import terminal terminal.open() terminal.printf(1, 1, 'Hello, world!') terminal.refresh() while terminal.read() != terminal.TK_CLOSE: pass terminal.close() ==== Download ==== Current version is 0.15.8 ([[en:bearlibterminal:changelog|changelog]]). Archives for {{en:bearlibterminal:bearlibterminal_0.15.8.zip|Windows}}, {{en:bearlibterminal:bearlibterminal_0.15.8.tar.bz2|Linux}} and {{en:bearlibterminal:bearlibterminal_0.15.8_osx.zip|OS X}} contain library binary (both 32 and 64 bit versions), a quick showcase of library capabilities and header files for several programming languages. Python version (library binary + wrapper module) may be installed directly from pypi:\\ ''**pip install bearlibterminal**''\\ (You may want to adjust the command a bit, e. g. use ''**pip3**'' for Python3 or add ''**%%--%%user**'' to install locally.) ==== Documentation ==== * [[.:bearlibterminal:design|Design overview]] * [[en:bearlibterminal:reference|API reference]] ==== License ==== The library is licensed mainly under the [[http://opensource.org/licenses/MIT|MIT license]] with a few parts under other permissive licenses: * Modified [[http://www.freetype.org/freetype2/|FreeType2]]: FreeType License. * [[http://lodev.org/lodepng/|PicoPNG]]: zlib license. * [[http://keyj.emphy.de/nanojpeg/|NanoJPEG]]: custom KeyJ's Research License.