dxx-rebirth icon indicating copy to clipboard operation
dxx-rebirth copied to clipboard

Runtime bug: some menu screens overflow in 4x3 aspect resolutions

Open ghost opened this issue 5 years ago • 3 comments

Environment

The issue is probably minimal since widescreen resolutions are the standard nowadays, but since the assets of the game were made for 4x3, I like to play in matching resolutions (1280x960) where the issue manifests.

The issues appear in ff9cff4fea8820c425fefd21ce68cc092e4dd457 and were present before.

Operating System Environment

  • Microsoft Windows
    • [ ] Microsoft Windows XP
    • [ ] Microsoft Windows Vista
    • [ ] Microsoft Windows 7
    • [ ] Microsoft Windows 8
    • [ ] Microsoft Windows 8.1
    • [X] Microsoft Windows 10
  • Mac OS X
    • [ ] Mac OS X 10.8
    • [ ] Mac OS X 10.9
    • [ ] Mac OS X 10.10
    • [ ] Mac OS X 10.11
    • [ ] Mac OS X 10.12
    • [ ] Mac OS X 10.13
  • Debian

    • [ ] Debian Wheezy
    • [ ] Debian Jessie
    • [ ] Debian Stretch
    • [ ] Debian Buster
  • Fedora

    • [ ] Fedora 26
    • [ ] Fedora 27
    • [ ] Fedora 28
    • [ ] Fedora 29
    • [ ] Fedora 30
    • [ ] Rawhide
  • Ubuntu

    • [ ] Ubuntu 16.04 LTS (Xenial Xerus)
    • [ ] Ubuntu 16.10 (Yakkety Yak)
    • [ ] Ubuntu 17.04 (Zesty Zapus)
    • [ ] Ubuntu 17.10 (Artful Aardvark)
    • [ ] Ubuntu 18.04 LTS (Bionic Beaver)
    • [ ] Ubuntu 18.10 (Cosmic Cuttlefish)
    • [ ] Ubuntu 19.04 (Disco Dingo)
  • [X] Arch

  • [ ] Gentoo

  • [ ] OpenBSD

  • [ ] FreeBSD

  • [ ] NetBSD

CPU environment

  • [ ] x86 (32-bit Intel/AMD)
  • [X] x86_64 (64-bit Intel/AMD)
  • [ ] ARM (32-bit)
  • [ ] ARM64 (64-bit; sometimes called AArch64)

Game environment

The issue appears only in the menus of the game, mainly the ADVANCED OPTIONS when creating a MULTIPLAYER game (D1X-Rebirth and D2X-Rebirth) as well as the GAMPLEAY OPTIONS of D2X-Rebirth.

Description

In the menus listed above, the test overflows and is cut off on the right end of the screen due to too many characters being used in the affected menu items.

Regression status

The issue was introduced over multiple commits, i.e. when the affected options were introduced.

Steps to Reproduce

  1. Start the game (D1X-Rebirth or D2X-Rebirth)
  2. Set the game to a 4x3 resolution (320x240, 640x480, 1280x960, etc)
  3. go to MULTIPLAYER, select HOST GAME and then select ADVANCED OPTIONS -> observe how the texts and sliders don't fit on the screen)
  4. D2X-Rebirth only: Navigate to OPTIONS and then GAMEPLAY (also see attached screenshots)

2019-07-18 11-00-25 2019-07-18 11-00-35

I had encountered similar issues in the past and pondered how to solve this properly. Obviously keeping the texts short enough works, but it's obviously not always possible. In such cases it would be good if the game could add automatic line breaks, which I tried to add in the past, but always ended up running into problems due to the newmenu system expecting every line being its own element, causing issues in highlighting selected items and scrolling in particular.

So I am honestly not sure how this could be solved the best without giving the newmenu system a massive overhaul.

  • Engines affected:

    • [X] D1X-Rebirth
    • [X] D2X-Rebirth
  • Game modes affected:

    • [ ] Single player
    • [ ] Multiplayer competitive
      • [ ] Anarchy
      • [ ] Team Anarchy
      • [ ] Robo-Anarchy
      • [ ] Capture the Flag
      • [ ] Bounty
    • [ ] Multiplayer cooperative
  • Players affected by issue:
    • [ ] Game host
    • [ ] Game guests

ghost avatar Jul 18 '19 11:07 ghost

I have no objection if you want to patch newmenu to handle this better.

vLKp avatar Jul 21 '19 04:07 vLKp

Forgot to give an update. I'll definitely give this one a go. Looking forward to it. :) Looking over newmenu, I think I can make line breaking happening - not sure if automatic because of different text scaling cases - but assuming manually set newlines will be doable.

As for the multiplayer menu, I think the problem here is the slider. I have a few ideas how to improve that one, but given the fairly low resolution and possible slider steps, it wouldn't be really more useful i.e. the smaller the slider in horizontal space, the less accurate you can control it. So I figure with the current Kill Goal limit, an input box would actually make more sense from a usability standpoint.

ghost avatar Jul 30 '19 16:07 ghost

Worked a bit on this today, but didn't make a whole lot of progress. Technically newline support for individual menu items is there, but I can't seem to figure out things as simple as to count the amount of newlines per line. Once that is done, half the problem is solved, leaving the bigger issue: I need to figure out a safer way how to restrict the amount of displayed items per menu based on the current scroll position - right now that is done on the creation of the menu, assuming that each item is just one line. So this needs to be adjusted on a case by case basis.

I need to familiarize myself with this code more again.

ghost avatar Aug 01 '19 11:08 ghost