View Single Post
Old February 12, 2019, 11:56   #15
tangar
Knight
 
tangar's Avatar
 
Join Date: Mar 2015
Location: Moscow, Russia
Posts: 542
tangar is on a distinguished road
Lightbulb [tileset] Rubble problem: add new type of terrain - 'things'

Quote:
Originally Posted by t4nk View Post
Interesting... I recall seeing rubble on black background quite a while ago, but I assumed that was because these tiles were placeholders, for lack of better ones... Now I'm looking at code, and it seems that rubble should have black background because its a feature, so it doesn't get a proper floor feature underneath it?
Nick, you might want to take a look at grid_data_as_text(). It should probably check whether feat is rubble, and if yes, it should save coordinates of floor tile in tap and tcp.
I suppose this is right point, but I also wanna share my (maybe wrong) idea about this problem - as I work with tileset atm to make custom world map for Angband Online and there are similar problems with other objects like trees..

Why rubble atm got black background?

I suppose, it's because the game 'thinks' that rubble is not a separate object ('thing') to put it on the floor tile, but a 'floor'-like tile. Even if rubble tile is transparent - game can not put it above 'open floor' tile, because rubble is managed as 'floor'-like tile (even if it doesn't have FLOOR flag).

So if we would look at terrain.txt, we could divide all tiles there in two groups:

1) ie terrain objects like floors and walls - 'backgrounds'
2) terrain 'things' - rubble, veins, lava (there could be also included trees and some more new stuff) - 'textures'

So it would be great if objects in terrain.txt would have special transparent-friendly flag, so some objects could be noted as 'backgrounds' (floors, walls) and some would be like 'textures' - which means that at level genaration they would be placed after 'backgrounds' as transparent ones. Then this new terrain things would have proper (floor or wall - for veins or lava) background, like traps have, for example.

p.s.
(silly) idea: maybe right now it's easier just to make 'hack' which would make rubble handled like a trap or immobile monster (lol) with certain properties (to dig it, block vision)
__________________
http://tangaria.com - persistent online multiplayer roguelike game
tangar.info - my website ⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽ My chars @ angband.oook.cz
youtube.com/GlazGame — streams in English ⍽ youtube.com/StreamGuild — streams in Russian

Last edited by tangar; February 12, 2019 at 13:22.
tangar is offline   Reply With Quote