Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terrain tiles on different z level no longer drawing. #71185

Closed
amadcow4u2 opened this issue Jan 23, 2024 · 11 comments · Fixed by #71306
Closed

Terrain tiles on different z level no longer drawing. #71185

amadcow4u2 opened this issue Jan 23, 2024 · 11 comments · Fixed by #71306
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@amadcow4u2
Copy link

amadcow4u2 commented Jan 23, 2024

Describe the bug

Z-level terrain is no longer drawing graphically. Experimental Z-levels are disabled.

Attach save file

N/A

Steps to reproduce

  1. Create a new world at evac center with experimental z-levels disabled.
  2. Climb to roof.
  3. z-0 terrain tiles are 'visible' when moused over, but graphics are not revealed.
  4. Peeking down will reveal the tiles, and they will be visible from memory afterwards.

Alternatively, fly around in a helicopter.

Expected behavior

Terrain tiles graphics should be drawn, expected behavior still works in 2023-12-18-0506. Experimental Z-levels functioning a bit oddly too, but peeking seems to be working properly.

Screenshots

Before peeking and after peeking. ''Below: Grass" is visible in both screenshots.
beforepeek
afterpeek

From top of apartment building, before and during peek.
zlevels odd
zlevels peek

view from z-5 in 2023-12-18-0506 with FOV off and no map memory

z5 expected

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.3930 (22H2)
  • Game Version: 31e4c0e [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth]
    ]

Additional context

Possibly related to #70957 ? Just a wild guess.

@amadcow4u2 amadcow4u2 added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Jan 23, 2024
@Qrox
Copy link
Contributor

Qrox commented Jan 23, 2024

Probably caused by #70301? It checks the visibility cache of other z-levels, which probably causes it to not count z-levels below as visible with FOV_3D off until the tiles are memorized after looking down. I think the proper fix would be not showing any tiles outside the current z-level, including those memorized, if FOV_3D is off. @Rewryte what are your thoughts?

@amadcow4u2
Copy link
Author

Just to clarify, FOV_3D on is only drawing terrain one z-level down. FOV_3D off is drawing terrain zero z-levels down. From a gameplay and visual standpoint I think terrain should be visible through open air regardless of the FOV setting. Only gray looks terrible.

@Qrox
Copy link
Contributor

Qrox commented Jan 24, 2024

FOV_3D on is only drawing terrain one z-level down

What is the value of your Vertical range of 3D field of vision setting?

I think terrain should be visible through open air regardless of the FOV setting

The FOV setting controls whether the terrain is visible, so you need to turn it on if you want it to be visible. It being visible previously was actually a bug that showed the terrain (but not monsters etc) even if your character does not see the terrain. I do wish we can draw all terrain regardless of the z-level when it is on, but currently the performance is terrible so we'll have to wait for some form of optimization before that is possible.

@amadcow4u2
Copy link
Author

amadcow4u2 commented Jan 24, 2024

this is from z5 with FOV 10. Nothing visible. A month ago terrain was drawing fine with or without FOV_on
z5fov10
I did a little further testing, and it looks like this was also the way it functioned in 0.G. I suppose this may not be a bug, just happenstance, but i much prefer the way things were being drawn in 2023-12-18-0506.

@Qrox
Copy link
Contributor

Qrox commented Jan 24, 2024

I did some testing, and when climbing up ladders the visibility is not updated before moving horizontally, but apart from that it is mostly working as expected since turning FOV_3D off makes the player character have no, well, FOV, in the z-direction.

When FOV_3D is on, terrain visible to the player character within the FOV range is displayed correctly, although the limited line of sight and the distance fog may have made it appear to not show much terrain.

It might indeed look more visually appealing before when all terrain is drawn, but do note that the game is supposed to draw the terrain from the perspective of the player character, not from the perspective of the monitor, so the previous behavior is actually incorrect and I don't think we can really support it.

Maybe we can make it so that the player character sees more terrain below when they are at the edge of a building, but that's a different matter not related to rendering.

@Rewryte
Copy link
Contributor

Rewryte commented Jan 24, 2024

Thanks everyone for testing. Looks like some of the visibility caches aren't updating properly when experimental 3D is off.

On my end, disabling the fov_3d check in map::build_seen_cache solves most of these issues. There are still some dark spots that should not be there so likely another cache is involved somewhere else.

On this matter, I think it's time we properly define what each 3D setting does. Currently, "Experimental 3D FOV" largely governs creature visibility while "Vertical range of 3D FOV" controls terrain.

I think the proper fix would be not showing any tiles outside the current z-level, including those memorized, if FOV_3D is off.

I think terrain should be visible through open air regardless of the FOV setting. Only gray looks terrible.

I think it would be desirable for players to be able to have 3D terrain regardless of 3D creature visibility. We could rename the settings so that they accurately reflect what they do. Code that checks for 3D terrain visibility, such as map::build_seen_cache in this case, should check for fov_3d_z_range == 0 instead of fov_3d.

@Qrox
Copy link
Contributor

Qrox commented Jan 25, 2024

I think it would be desirable for players to be able to have 3D terrain regardless of 3D creature visibility.

It seems strange to me that anyone would want to see terrain below without also seeing the creatures there. Sounds like option for option's sake to me. In my opinion a single option to control the vertical view range is sufficient and the FOV_3D option can simply default to on and be removed. If the player doesn't want 3D vision they can set 3D_FOV_Z_RANGE to 0 to revert to the legacy colored blocks display.

@Rewryte
Copy link
Contributor

Rewryte commented Jan 25, 2024

In my opinion a single option to control the vertical view range is sufficient and the FOV_3D option can simply default to on and be removed. If the player doesn't want 3D vision they can set 3D_FOV_Z_RANGE to 0 to revert to the legacy colored blocks display.

That works too I guess. If anything, switching things up lets us get more feedback from the player base to see if they like the changes. Was the 3D-as-default issue fixed? I might have been out of the loop.

@Qrox
Copy link
Contributor

Qrox commented Jan 26, 2024

Not yet. The player activity interruption test is still failing when 3D FOV is on, but only when running all tests and succeeds when run on its own, and the map/avatar are already reset before the test, so I really have no idea what could be causing the failure.

@Rewryte
Copy link
Contributor

Rewryte commented Jan 26, 2024

Looks like fixing that would precede any settings changes then. In favor of hotfixing this issue first? Should only take a line of code.

@Qrox
Copy link
Contributor

Qrox commented Jan 27, 2024

Yeah, a hotfix would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
3 participants