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

Black line and artifact at the bottom of screen that does not get redrawn #77325

Open
NetSysFire opened this issue Oct 25, 2024 · 8 comments
Open
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Help Wanted Not particularly urgent or easy (see Good First Issue for this), but help is appreciated with this! ImGui Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds (P4 - Low) Low priority issues: things which are e.g exotic, minor and/or hard to encounter (S2 - Confirmed) Bug that's been confirmed to exist SDL: Tiles / Sound Tiles visual interface and sounds.

Comments

@NetSysFire
Copy link
Member

NetSysFire commented Oct 25, 2024

Describe the bug

image

Related: #74073

Attach save file

n/a

Steps to reproduce

  1. Load any tiles game.
  2. Trigger a long, scrolling menu. In this case, I opened the inventory and (e)xamined the emergency jacket I am wearing.
  3. Close said menu.
  4. Artifact remains.

Expected behavior

No artifact. Also no black line. I think this black line was not present in earlier version and the entire tile was rendered there.

By putting it out of fullscreen and back into fullscreen you can force the entire screen to get redrawn and as such temporarily get rid of the artifact.

Relevant options.json snippets:

  { "info": "Sets which video display will be used to show the game.  Requires restart.", "default": "Default: 0 - Values: 0", "name": "DISPLAY", "value": "0" },
  { "info": "Starts Cataclysm in one of the fullscreen modes.  Requires restart.", "default": "Default: windowedbl - Values: no, maximized, fullscreen, windowedbl", "name": "FULLSCREEN", "value": "maximized" },
  { "info": "Set which renderer to use.  Requires restart.", "default": "Default: software - Values: software, opengl, opengles2", "name": "RENDERER", "value": "opengl" },
  { "info": "If true, use render batching for 2D render API to make it more efficient.  Requires restart.", "default": "Default: True", "name": "RENDER_BATCHING", "value": "true" },
  { "info": "If true, use hardware acceleration for the framebuffer when using software rendering.  Requires restart.", "default": "Default: False", "name": "FRAMEBUFFER_ACCEL", "value": "true" },
  { "info": "If true, tries to use color modulated textures to speed-up ASCII drawing.  Requires restart.", "default": "Default: False", "name": "USE_COLOR_MODULATED_TEXTURES", "value": "true" },
  { "info": "Sets the scaling mode, 'none' (default) displays at the game's native resolution, 'nearest' uses low-quality but fast scaling, and 'linear' provides high-quality scaling.", "default": "Default: none - Values: none, nearest, linear", "name": "SCALING_MODE", "value": "none" },
  { "info": "Factor by which to scale the display.  Requires restart.", "default": "Default: 1 - Values: 1, 2, 4", "name": "SCALING_FACTOR", "value": "1" }

Screenshots

No response

Versions and configuration

  • OS: Linux
    • OS Version: LSB Version: n/a; Distributor ID: Arch; Description: Arch Linux; Release: rolling; Codename: n/a;
  • Game Version: cdda-experimental-2024-10-23-1516 99d27e5 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • 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

No response

@NetSysFire NetSysFire added (S1 - Need confirmation) Report waiting on confirmation of reproducibility SDL: Tiles / Sound Tiles visual interface and sounds. ImGui Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds labels Oct 25, 2024
@rubenpd
Copy link

rubenpd commented Oct 25, 2024

immagine_2024-10-25_145010957
after some time passed playing the game i can say this happens to me as well on the most recent experimental, i wasn't able so far to pinpoint what was happening...

@NetSysFire NetSysFire added (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Oct 25, 2024
@RenechCDDA RenechCDDA added [C++] Changes (can be) made in C++. Previously named `Code` Help Wanted Not particularly urgent or easy (see Good First Issue for this), but help is appreciated with this! (P4 - Low) Low priority issues: things which are e.g exotic, minor and/or hard to encounter labels Oct 25, 2024
@RenechCDDA
Copy link
Member

I've been experiencing this for some time. Long enough that I learned to subconsciously ignore it...

I did some troubleshooting with Harakka previously on the development discord, it appears that the terminal size may be getting set incorrectly.

https://discord.com/channels/598523535169945603/598523535169945607/1283377930654974032

Note that the line is not always black - it's usually black because the game draws nothing there during the loadscreen. But I was testing with full-size (or indeed, oversized) loading screen images and you can clearly see that the loading screen gets drawn there at the time and then never redrawn.

@IdleSol
Copy link
Contributor

IdleSol commented Oct 26, 2024

This is from the time of switching to ImGui

@RenechCDDA
Copy link
Member

I have it all the way back on 0.G so it's not imgui related.

image

@NetSysFire NetSysFire added ImGui Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds and removed ImGui Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds labels Oct 26, 2024
@NetSysFire
Copy link
Member Author

I'll keep the imgui label because the black line is not what's important here, its the artifacts that are mildly distracting.

@CoroNaut
Copy link

CoroNaut commented Oct 27, 2024

I'm fairly certain this is just a terminal size issue. I have my terminal set to 210x65 in-game which is 1680x1040. My monitor is 1680x1050. Setting the game to 210x66 would be 1680x1056. It's not possible to exactly match the terminal ratio to my monitor ratio, so I have 10 pixels at the bottom that never get used. This has nothing to do with ImGui and has been a thing for a very long time, The black line cannot be removed unless you can exactly match the game width/height to your monitor width/height.

If a window tries to draw past the bottom of the screen, then yeah, that probably shouldn't happen. It's just that ImGui draws differently than the previous window drawing method that used tiles, and stuck to the 210x65 terminal tile grid. ImGui draws characters off the 210x65 tile grid, thus the artifact at the bottom.

I'm thinking the best fix would be to make ImGui use the terminal width/height instead of the window width/height to bound it's windows.

Just an example of the fact that the font/characters in ImGui are not strictly on the terminal 210x65 tile grid: (Notice the cut-off of characters on the top and bottom of the list
image

In a window that doesn't use ImGui, All characters are strictly on the 210x65 tile grid (and the 10 un-used pixels at the bottom from the ImGui window):
image

@IdleSol
Copy link
Contributor

IdleSol commented Nov 17, 2024

1

White bar at the bottom of the screen. In reality, it is more striking than on the screenshot. Especially now the window frames are thicker and brighter.

cdda-windows-with-graphics-x64-2024-11-17-0712

@db48x
Copy link
Contributor

db48x commented Nov 19, 2024

The fix is to make the sdltiles code erase the space it doesn’t use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Help Wanted Not particularly urgent or easy (see Good First Issue for this), but help is appreciated with this! ImGui Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds (P4 - Low) Low priority issues: things which are e.g exotic, minor and/or hard to encounter (S2 - Confirmed) Bug that's been confirmed to exist SDL: Tiles / Sound Tiles visual interface and sounds.
Projects
None yet
Development

No branches or pull requests

6 participants