Game screen: write terminal emulator or use libtcod?

This page summarizes the projects mentioned and recommended in the original post on /r/roguelikedev

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • libtcod

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

  • Libtcod itself uses SDL2. It maps tile glyphs to a texture atlas and maps Unicode codepoints to tile positions. Then it has another data structure called a console which has the background color, foreground color, and codepoint for each tile on that console. It then uses SDL_RenderGeometry to quickly render the background and colored glyphs to an SDL texture, skipping unchanged tiles as an optimization, then renders that texture to the window. The C99 source is here: renderer_sdl2.h renderer_sdl2.c, a C++ version would surely look better.

  • liveonce

    You Only Live Once is a Seven Day Roguelike written by Jeff Lait

  • Jeff Lait has a very no-nonsense homebrew curses-or-SDL emulator he uses in his 7drls. See eg. You only live once. The main logic is in gfxengine.cpp, and gfx_curses and gfx_sdl are the curses and SDL backends respectively. gfx_sdl.cpp is less than 500 lines of code, so these things aren't terribly complex. Simplest thing to do is probably just implement your own from scratch using something like this as the reference.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts