A new look for the base environment
Hi everyone,
I've just published a new build , in addition to some bug fixes (and fixing a big regression when selling buildings). I also created a new look for the base. Previously, the rock cells that surround the base were made of different assets, being smaller and darker further away they were from the base. Every time you dug a rock cell, the neighboring cells would update.
Now, every rock cell is completely full, and there is a fog of war surrounding them moves slowly. The truth is, it was my second attempt to produce this effect. I gave up the first time because I could not create something that looked nice.
First approach
For the first approach, I used a viewport texture when I drew the base cells in white against a black background. Because I knew the cell size, I could calculate in a shader using the viewport as a texture the position of the neighboring cell in the texture. Based on which neighbors are black or white, I did a bilinear interpolation to create a gradient . It was more or less working, but it took way too much time for not a great result.
Second approach
Well, it is way easier than the first one. For every base cell, I draw again into a viewport, but this time, I use a texture of a rounded square with a fading edge. I draw them larger the cell. I do it twice, once with a gray color and larger, and a second time in white and smaller to give a bit of a two-level fog. Then, this texture is used in a shader to simply do a threshold between the base and a texture of rocky ground.
Files
Get Packed Lair
Packed Lair
Villainous base-builder mixed with inventory management auto-battler roguelike!
| Status | In development |
| Author | Fables of Wits |
| Genre | Strategy |
| Tags | 2D, Roguelike, Singleplayer, Tactical |
More posts
- Focusing on the core gameplay5 days ago

Leave a comment
Log in with itch.io to leave a comment.