Subcells, trees, python…

I think I finally reached the limit of 2×2 subcell graphics… Even with a small 8×8 font, the 4×4 subcells are too big for such usage…

subcell graphics gone wrong…

Now I’m left with two solutions : either allow true graphics which would be a terrible blasphemy or give up with such embellishment… The other feature I’ll have to cancel was to display the character’s face in their dialog box, to give more personality to all those @ :). With the subcell resolution, this would require the face bitmap to cover half of the screen… Impossible to stuff in a small dialog box using only a few console lines… I have still a small hope to succeed, using very small faces sprites… Keep posted…

I also worked a bit on trees and forest. I tried my best to have something as hot as in Aviel’s stand… and I failed ! Forests don’t look that bad, but on another hand, they don’t look that good neither :). I have still to work on them.

aviel’s stand trees rip-off gone wrong…

At least I’ve found a new usage for the packer (to be included in libtcod 1.5). I use it to easily put forests on top of cities without bothering about tree/building overlapping.

city in the middle of a forest

Now concerning libtcod, I’ve just released a new 1.4.1 beta for all platforms/languages including an improved python wrapper. The heightmap tool can now generate code in every supported language (C, C++, python).

10 comments so far

Add Your Comment
  1. More and more promising! I like the idea of trees occupying more than one tile, but can you walk under them? That would need multiple layers I guess, and some fov headackes :-).

    As a sidenote, I’ve shown your library to a collegue, he is very impressed!

  2. Yeah indeed, you can walk under them (only the trunk is non walkable) but i’m not very satisfied with the rendering yet. I’ll post a screenshot to show it when it’s good enough 🙂

  3. Just keep on trying how you generate those trees, and keep changing the parameters. It was all just a big experimentation process for me.

    Btw, with university starting for me, it’s hard to get anything big done Aviel’s Stand these days, expect an update soon though.

  4. Update ? Yaaayy !! 🙂

  5. Wow, pretty screenies! Sweet!

    Character portraits, hm, that’s nice. You’re gonna need pixel art if you wanna squeeze every bit of resolution you have though. I’m curious to see how it looks!

    This gives me an idea for an improvement on the sub-cell accuracy toolkit…


    Ok, these algorithms are supposed to enlarge a pixel-artsy image while preserving its pixel-artsy edges and colors. They map a pixel and its neighbors to a new set of pixels.

    This inspires the following: How about having a few special characters that have nice round edges and such, and then map a pixel and its neighbors to one of these characters? I’m sure we can come up with a rule that minimizes the number of needed characters while preserving smoothness and roundness. Our beloved blocky images deserve it 🙂 What do you think?

  6. Now I’m left with two solutions : either allow true graphics which would be a terrible blasphemy or give up with such embellishment

    A blasphemy, maybe, but au good library for rpg games, surely.

  7. mmh guys.. don’t say no more. I’m already almost convinced… I WANT THOSE CHARACTER PORTRAITS..! I’ve tried with 10×10 bitmap. It’s impossible. Even with 20×20, it requires amazing pixel art skills that I don’t have… I’m definitely thinking about adding true graphics in place of or along with subcell resolution…

  8. All right then. You’re damning your soul, I tell you. Damning it!! 🙂

    I call for Greenspun’s Tenth Rule:
    “Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.”

    You’re turning this into a generic game library 🙂

    I’d look around for a different solution before giving in too soon…

    Can’t you just turn the portrait into a custom font (with, like, 12 custom characters for a 3×4 portrait, meaning an 24×32 pixels image using an 8×8 pixels font)? And then blit those custom characters where you want the portrait.

    It would have only 2 base colors (and all shades interpolated between the two, since now we’ve got alpha) but IMHO it would probably give the portraits a distinguished effect. Like vintage or something. You’d get per-pixel accuracy. Plus you get to choose colors that blend in nicely with the interface, and also change them dynamically to reflect status.

  9. Progress is made through change. I say go for it and if you don’t like it you can always remove it.

  10. Jotaf you’re a freaking genius ! I’ve never thought about using the alpha property to allow color gradient on a single cell. Greyscale pixels are better than full color 4×4 super pixels… Man, this opens a whole new world of possibilities…

    Also 2xSal looks pretty cool, but I don’t think I can use it at cell level. This would require hundreds of different special cells to handle all possibilities…
    But we could use it as a post-processing effect on the whole console background layer. I wonder how it would look ?…