Sunday, May 25, 2008

libtcod 1.4 candidate features

You can vote for the features of the next release. Here is what I have in mind :

  • BSP toolkit :

This toolkit allows you to easily create BSP trees and traverse them in various way. BSP trees are currently used in TCOD to create dungeons (see this).

  • Heightmap toolkit :

This toolkit, combined with the Perlin noise toolkit, is used to build realistic overmaps (see this). But anything that needs a 2D array of floats can use it. TCOD uses it for the cloud layer of its weather system.

  • Subcell graphics toolkit :

This toolkit will allow to draw bitmaps using a resolution twice bigger than the console's resolution. For example, you can draw a 16x16 bitmap on a region of 8x8 co
nsole cells. It sounds too good, but there are a few limitations : you won't be able to draw text of this region because the subcell toolkit already uses the foreground color. Also, your bitmap's colors will be altered since the toolkit uses posterization. This toolkit uses the following 6 special characters to simulate pixels smaller than the console cells :
  • Pathfinding toolkit :

This toolkit will be linked with the FOV toolkit and will allow you to easily :
find the path from a creature to the player at no cost by tagging the cells in the player field of view.
find a path from two arbitrary points using Djikstra algorithm.
find a path from two arbitrary points using A* algorithm.