2007
12.20

C/C++ libtcod

Some news about the Doryen library. I was about to release it when I thought that it would be very interresting to also have a C interface, not only for C developpers, but a C version of libtcod will allow to easily write wrappers for most languages (for example a Java jar using JNI).

Well I’ve just finished the first version of this C/C++ library. The core library is in C and there is just a slim C++ wrapper on top of it. Both layers are stored in a single dll. I have now to let it mature a few days before releasing it. The updated specs are now :
C/C++ dynamic library for roguelike development
supported platforms : windows/mingw32, windows/Visual Studio 2005, linux/gcc
main features :

  • lightweight, fast, simple
  • true color console (windowed or fullscreen) with keyboard handling
  • mersenne twister pseudorandom number generator
  • bresenham line drawing toolkit

7 comments so far

Add Your Comment
  1. Can’t wait til it gets out 🙂

  2. 🙂
    The content of the library is now stable. I have working versions for the 3 platforms, I’m currently working on the documentation, but it will slow down during christmas. There is a beta version here :
    http://jice.nospam.googlepages.com/libtcod-1.0b-VS2005.zip
    Though, I’m not sure you will be able to use it without the complete documentation.
    I have also to provide samples with source code so that you can easily see how it works. For now, the samples only do the console initialization.

  3. Beta version updated with a more complete documentation (the console part is complete). It still lacks documentation about the pseudorandom number generator and the bresenham toolkit.
    libtcod-1.0b-VS2005.zip

  4. Damn this stuff is useful! I’m thinking about using it for my next 7dRL. Very good and clear documentation! Would it be much work to add pixel exact drawing of characters, as well as drawing single rotated and alpha blended characters? I am aware that this is meant to emulate a classic console (with more colors) but it would make the library so much more useful for my next project. If you say it’s not too much effort I could try to add this functionalities. Not much C++ knowledge on my side though…

  5. Nice, this isn’t anything short of what I expected! It’s very well laid out, I see you’re keeping bloat to a minimum. My next RL (hopefully it will be something releasable) will definitely be using this.

  6. To Christopher :
    Pixel positionned, rotated and alpha blended characters (two characters on top of each other) are not possible without breaking the console paradigm. The cleanest way to do it may be to add another toolkit (for example a graphic toolkit). I’m not ready to do this because I’m already late on the TCOD beta.
    Note that there are already lots of good libraries that offer such features (SDL, clanlib, allegro, …).

  7. Beta version updated with the random number generator and line drawing documentation. It still lacks documentation about the system layer.
    libtcod-1.0b-VS2005.zip