In the last few days I continued my efforts by putting very basic train depots in the game.
I very quickly got completely swamped in extremely messy folder/file system in by BRIX repository. This was caused by many aspects, most importantly the fact that I work on BRIX in a very on-and-off fashion, and the long time periods between my activity usually mean that I figure out how to do things better in some way each time.
For example:
- BRIX 0.0.1 was created from 3D renders from 3DS MAX. BRIX 0.0.2 did not even open those and I don't even install 3DS MAX on my computers anymore so that part of the source is basically useless to me now, but a lot of files around it still remained around.
- To create BRIX 0.0.2, I used a lot of messy hacks that don't go well with long-term health of the file system, and the After Effects mega-project in a single file became so large that it's completely unfeasible to work with.
- Since I have RGBA Eater, I don't need to avoid 8bpp conversion anymore, and using big spritesheets instead of more smaller files has basically no benefit anymore.
All in all, I've created a new BRIX repository on github where is not going to be any of this type of mess - 3D and other graphics files won't even be included. I'll just put there everything necessary to build the game from existing sprites. The only extra there will be is the existing setup including RGBA Eater and other scripts that are being used to process the sprites (After Effects outputs), for example from 32bpp RGBA x4 zoom all the way nto 8bpp x1.
https://github.com/V453000/BRIX
It went hand in hand that I also created a new github repository for RGBA Eater itself, as I've been planning to do that for some time now, and it makes sense for such a tool. It's very barebones and the documentation is a bit crude, but that will get improved eventually.
https://github.com/V453000/RGBA-Eater
This all lead into major cleanup of BRIX repository and graphics pipeline. I have a /gfx folder which then forks into /32bpp and /8bpp sub-folders. Most of the time there is one more sub-folder level: /x4 or /x1. Some sprites don't have the last split as the spritesheets combine both x4 and x1 - typically ground tiles as those aren't just downscaled because the tile edges need to be precise for each zoom level specifically.
As a result of the cleanup, I now have a tandem of scripts that take care of resizing to x1, 8bpp conversion and combining some 8bpp files in specific cases.
The fact that I had a clean repository and RGBA Eater in its own made me curious if I could solve the tree shadows in 8bpp.
In 32bpp of BRIX 0.0.2, trees have shadows which has major impact on how they fit in the world. The 8bpp trees simply omit the shadows as I could either have fully opaque shadows or nothing, I chose nothing in the situation when trying to finish 0.0.2.
A related issue happens with Tubular bridges where 32bpp version uses semi-transparency but 8bpp does not - for example TTD graphics address this by a checker pattern of transparent and opaque pixels.
- Tree-shadow-tech.png (51.18 KiB) Viewed 2684 times
With the cleaner system and git in place, I thought I could try to add checker-alpha support to RGBA Eater and solve both the 8bpp tree shadows and tubular bridges with that.
I was quite surprised when I saw that the tree shadow is not really visible - this was because the grass terrain is already dark gray and there was very little contrast. In fact even on snow or desert in some cases the shadow didn't have as much impact as I had hoped.
So next up I added support to RGBA Eater for probability-based-alpha. This takes the input alpha-gradient, and based on the opacity of the pixel it randomly converts the pixel into opaque or transparent. This results in a nice effect, but all of a sudden in snow and desert such shadows are completely brutal.
download/file.php?id=207647
I realized that snow capped trees mostly show only on snow, and cacti only in desert - so I tried to give the shadow different colour than pure black and I came to a reasonable result.
download/file.php?id=207648
I might still tweak it but I consider this to be a big improvement of the 8bpp version, and lets see how does the checker work with tubular bridges.