libtcod 1.4.1 beta 4 released

This release contains a few fixes in the python wrapper and a new fov module supporting several fov algorithms. Currently, it supports the previous basic raycasting algorithm (named circular raycasting) and a new algorithm recently discussed on r.g.r.d (I called it “diamond raycasting”. See this article). While it seems to work, it’s still highly unoptimized. It should be much faster in the next release.


[update] Here are a few performance results on my Athlon 64 2800+ :

CIRCULAR FOV time : 0.73648s => 137.139 call/s 7ms/call
DIAMOND FOV time : 12.9762s => 7.78351 call/s 128ms/call

Tests are done with a 600×600 map filled with 5000 random obstacles.
DIAMOND will probably be faster than CIRCULAR in the next release. Until then, use it only for testing purpose…

4 comments so far

Add Your Comment
  1. Great! Smashing! Super!

    Nice to see an alternate FOV standard being brought into the public eye. I’ve seen that page before and wondered how hard it would be to implement – it seems to do a better job in some circumstances than “normal” raycasting.

    And thanks for the (many) fixes.

  2. Wow, that was fast… When did I suggest implementing it? On Friday, wasn’t it? You’re one fast coder, especially taking in account that you managed to release Arena 0.8 as well in those 3 days :).

  3. Hehe 🙂 thanks, but I didn’t do anything on arena. It has been in this state for months. I wanted to do more stuff but I finally released it as is.

  4. Having choice in FOV algorithms may be quite important if one is developing a roguelike based on stealth or ranged combat, so this is good news.

    Also interesting was the option in the demo program to turn off wall illumination. It looks a bit weird at first, but might be useful in avoiding walls that appear lit to the player even if the light source is on the other side.