Thursday, September 12, 2013

Improved map display

Just an update to confirm that things haven't ground to a halt despite me being snowed under with a bunch of real life priorities.

While using libtcod, there's a limitation on being locked into a single font size for the entire display, which is great for a traditional roguelike but a bit restrictive when it comes to graphical tiles. Previously, the small sized graphics were a bit difficult to take in and it was a bit weird to have them the same size as each letter used for text.

With this workaround, I don't get around the libtcod limitation but work with it by having an alternative tile for each and every image to be used in the map only which are then split into four characters. Once all four of those characters are written together, a larger font is simulated quite simply and the above screenshot shows what it looks like. It doesn't allow me to get around the limitation with respect to other variations in font size, but there's no reason why that can't be planned for in other projects, and what I've done above is a big improvement in my opinion.


  1. Welcome back! :D Wow that makes a huge difference. When I first saw the screen shot I even doubted whether it was even libtcod anymore or not.

    I've been considering doing the same thing, and found that breaking up the map tiles is the easiest way. It takes as much space in the font file as if you could have differently sized fonts natively. And as a bonus, you get higher resolution for lighting effects if you want (without using blit2x which sometimes is not very convenient).

  2. Hey, it's good to know that someone is reading this!

    Yeah, I must say it wasn't the most intuitive solution to the problem and before I bothered to sit down and get it done, it seemed like it would be way too much trouble for the payoff. But it really isn't all that complicated when you break it down and it actually allows for a fair bit of complexity within the constraints of libtcod.

    The resolution issue is a good point as well - there's no reason why those larger tiles couldn't have twice the detail and they don't have to be pixely or blocky or whatever you call it. I don't think I'll change that aspect of it though, I'm pretty happy with how it's looking as I am trying to make it as like an early 90's RPG as possible.