CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.62k stars 4.17k forks source link

Cut off tall textures to see behind trees #73581

Open Brambor opened 6 months ago

Brambor commented 6 months ago

Is your feature request related to a problem? Please describe.

When I wander in a forest with the UtiliCa tileset, I cannot see what is behind trees. I can "look around" ;, but that gets tedious.

image

Solution you would like.

I want a toggle I can bind to keybinding. It would "cut tall textures" in a radius around the character. Or cursor, if it doesn't point to the character (look around).

Mouse cursor pointing is almost as annoying as cursor pointing since your mouse cursor won't be pointing at the same tile when you move

I'm not talking about the mouse cursor, but the centre of the screen.

The radius is a subsequent setting, if a single optimal value isn't found. It shall be set in Options > Interface > Accessibility Options > "cut tall textures radius".

I would expect a simple cutoff for textures that don't support additional features (cut off everything that "leaves" the current tile) Example: only this stump would be rendered, tileset: UtiliCa: image I don't care if it is pretty, it is a live toggle with a keybinding. Later, we could add some fade or something.

In Utilica_iso does do some transparency around the cursor: image

image

Related code: https://github.com/CleverRaven/Cataclysm-DDA/blob/5ca7f4e59c2d7b0a93fb801a31138477f7b4a761/src/cata_tiles.cpp#L2408-L2411

docs: https://github.com/CleverRaven/Cataclysm-DDA/blob/5ca7f4e59c2d7b0a93fb801a31138477f7b4a761/doc/TILESET.md#L124-L126

Implementation notes:

Describe alternatives you have considered.

If only we could rotate the camera, walking towards the bottom of the screen would leave enemies on the visible side of the large sprites.

That is implemented in Don't Starve. But I think CDDA can do better. Rotating the world can be disorienting. (INSERT Don't Starve gif)

This also wouldn't necessarily solve my problem. I am not looking at where the enemies are. I am looking at the forest floor to see where should I step. This is not unique to running from enemies. I would probably have it on all the time in some capacity.

I think rotating the view could be a nice additional feature. Personally, I wouldn't use it as rotating breaks my brain, it disorients me.

Additional context

This issue is a summation of ideas from Discord. I am not the only author. I'm citing the others.

The conversation started here: https://discord.com/channels/598523535169945603/642349261320880128/1237733201758130237

KHeket commented 6 months ago

Some time ago there was a bug #66052 , fixed in the past, and this bug makes items and creatures ignore the high furniture and threes, as you can see at screenshots in linked issue And I made an issue to make this bug as a feature #66275 , because it was very helpful, you can easily see creatures and items in the woods So, as an idea, if it will be ok for programmers, they can just use the logic of this bug and make it as a toggleable function

Brambor commented 6 months ago

That could be an easy and good solution. Put what you suggest on a keybinding toggle.

Note: Factorio has arm inserters in front as a feature: https://forums.factorio.com/viewtopic.php?f=23&t=1005

Qrox commented 6 months ago

they can just use the logic of this bug and make it as a toggleable function

As said in that issue, it would result in an illusion of height which could be confusing. Besides, maintaining multiple versions of a single feature is tedious and prone to error. I think it's better to automatically generate retracted/transparent sprites for tiles that do not have one specified, as suggested in this issue.

Brambor commented 5 months ago

This PR about occlusions and hotkeys is very relevant:

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.