AuthorTopic: TWBT Next (Read 15875 times)

I suddenly found an easy and reliable way to implement new rendering features I was thinking about for a long time. A separate thread to attract attention of tileset authors because the new features require changes to tilesets.

Features

1. Buildings and items are now rendered separately from the floor - you can notice that coffins, chairs, slabs and so on have different colours but their backgrounds stay the same, and are actual floor tiles - rough, smooth, engraved. No stockpiles on this screenshots, but you'd see stockpile tiles behind items as well.

2. Look at the beds. The bed frames have different colours depending on their material, but pillows and sheets stay the same, i.e. not all tile pixels are affected by the foreground colour.

2. To support these new features, tilesets need to have three "layers":

First is used to render background colours and normally should just be white for non-empty tile pixels. This is supplied as e.g. Spacefox-bg.pngSecond is the main tile image which will be coloured using foreground tile colour, can now have fully transparent pixels where floor should be visible. This is supplied as usual Spacefox.pngThird is just the pixels that won't change colour. This is supplied as Spacefox-top.pngIf -bg and -top files are not available, the corresponding features will be disabled and the tileset will work as before.

Notes

1. Binaries are available from build.mifki.com. When installing, copy white1px.png and transparent1px.png to data/art folder. An example tileset based on Spacefox is included.

2. This works the same way for overrides, just supply additional -bg and -top images for each tileset used by overrides. However due to 3 times more tiles now being used and restrictions on the largest texture size, tileset authors using a lot of overrides and/or very big tile sizes need to be careful not to waste any space in tileset images, i.e. having three images with just half of the tiles actually used is bad because all tiles will still be loaded.

3. If you can't see the floor though some of the buildings/items, it's because I forgot to include them, there are quite a few of such (that is, in the code, the example tileset has just a few tiles modified to demo the new features).

white1px.png and transparent1px.png don't seem to be included (though I think I can guess their contents)Also, would it be possible for the zip to include the folder structure? It would make installation much simpler.

Also, would it be possible for the zip to include the folder structure? It would make installation much simpler.

One of the reasons is that on macOS, when you copy folder structure to a location where same folders already exist, they will be overwritten, not merged. Better to copy everything manually than give users a chance to lose their saves.

ptwI know a tileset I would like to see modded to utilize this.... I'll have to go put a bug in someones's ear...

Logged

Legendary Dwarf FortressLegendary Discord Group"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

I seem to be encountering an issue with the new version in Windows 8.1. When I embark on a site with TWBT on, the game crashes when leaving the "Strike the Earth" screen. It works fine if I change the print mode to standard and has the same issue with just the curses font instead of my tileset.

so this is basically the latest version of TWBT with an option to add in XX-bg.png and XX-top.png of your image file? So if the extra files aren't available it would just operate as the normal version? I see its 43.05 now i finally downloaded it and opened it lol...

oh and just so you know your site throws certification errors on chrome:

This server could not prove that it is build.mifki.com; its security certificate is not trusted by your computer's operating system. This may be caused by a misconfiguration or an attacker intercepting your connection. Learn more.

lol, I trust you, but I just wanted you to know what it said.

« Last Edit: March 22, 2017, 07:53:33 pm by Amostubal »

Logged

Legendary Dwarf FortressLegendary Discord Group"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

I seem to be encountering an issue with the new version in Windows 8.1. When I embark on a site with TWBT on, the game crashes when leaving the "Strike the Earth" screen. It works fine if I change the print mode to standard and has the same issue with just the curses font instead of my tileset.

Hm, I tested on Windows now and doesn't crash for me. Does the normal TWBT 5.77 work fine if you just copy it instead?

so this is basically the latest version of TWBT with an option to add in XX-bg.png and XX-top.png of your image file? So if the extra files aren't available it would just operate as the normal version?

It renders things a bit different way. But for end users yes the result is the same if no additional images present.