Broderick-Westrope / tetrigo

Play Tetris in your terminal.
GNU General Public License v3.0
363 stars 16 forks source link

Misaligned rows in gameplay #21

Open vincentaxhe opened 2 weeks ago

vincentaxhe commented 2 weeks ago

use git, go-task build, then run 'tetrigo', found grid tearing. 2024-11-09T20:10:43,878508145+08:00

Broderick-Westrope commented 2 weeks ago

Hi @vincentaxhe, thanks for raising an issue. I was not able to reproduce this issue, but I think I know what the cause is.

What font are you using in your terminal? This program only works with monospaced fonts, meaning all the characters have the same width.

In your screenshot most of the shorter rows are using the character - which may be thinner than other characters. This would cause the output to become unaligned. Could you please try using a monospaced font and let me know if you continue seeing this issue? If you're unsure which to use, I suggest FiraCode Nerd Font which can be found here.

vincentaxhe commented 2 weeks ago

Surely I use mono font always, I try Fira nerd font, and run with alacritty, kitty, foot, xfce4-terminal, and run on xfce4 after log out from hyprland, It all behaves same misaligned rows. In detail, It misaligned on particular line and mess alignment while bricks fall,Maybe the behavior can give you some clue. https://github.com/user-attachments/assets/84397d33-566b-4563-b982-d503baac6fe8

Broderick-Westrope commented 2 weeks ago

Unfortunately that didn’t help. Could you provide the following information:

vincentaxhe commented 2 weeks ago

inxi say;

System:
  Kernel: 6.6.54-2-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
  Desktop: Hyprland v: 0.43.0 Distro: Manjaro rolling base: Arch Linux
Machine:
  Type: Laptop System: Acer product: Swift SF514-55TA v: V1.11
    serial: <superuser required>
  Mobo: TGL model: Tiger_TL v: V1.11 serial: <superuser required>
    UEFI: Insyde v: 1.11 date: 10/20/2022
Battery:
  ID-1: BAT0 charge: 37.8 Wh (100.0%) condition: 37.8/56.0 Wh (67.5%)
    volts: 16.2 min: 15.4 model: SMP KT00407008 AP18C7M status: full
CPU:
  Info: quad core model: 11th Gen Intel Core i5-1135G7 bits: 64 type: MT MCP
    arch: Tiger Lake rev: 1 cache: L1: 320 KiB L2: 5 MiB L3: 8 MiB
  Speed (MHz): avg: 1305 min/max: 400/4200 cores: 1: 1305 2: 1305 3: 1305
    4: 1305 5: 1305 6: 1305 7: 1305 8: 1305 bogomips: 38720
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics]
    vendor: Acer Incorporated ALI driver: i915 v: kernel arch: Gen-12.1
    bus-ID: 0000:00:02.0
  Device-2: Chicony HD User Facing driver: uvcvideo type: USB bus-ID: 3-7:7
  Display: wayland server: X.org v: 1.21.1.14 with: Xwayland v: 24.1.4
    compositor: Hyprland v: 0.43.0 driver: X: loaded: modesetting dri: iris
    gpu: i915 resolution: 1: 2560x1440~60Hz 2: 1920x1080~60Hz
  API: EGL v: 1.5 drivers: iris,swrast platforms:
    active: gbm,wayland,x11,surfaceless,device inactive: N/A
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.2.4-arch1.0.1
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel Xe Graphics (TGL GT2)
  API: Vulkan v: 1.3.295 drivers: intel surfaces: xcb,xlib,wayland
    devices: 1
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio
    vendor: Acer Incorporated ALI driver: sof-audio-pci-intel-tgl
    bus-ID: 0000:00:1f.3
  Device-2: SAVITECH NuForce USB Audio
    driver: hid-generic,snd-usb-audio,usbhid type: USB bus-ID: 3-1:2
  Device-3: D&M Holdings (Denon/Marantz) DA-10
    driver: hid-generic,snd-usb-audio,usbhid type: USB bus-ID: 3-3.2.4:12
  API: ALSA v: k6.6.54-2-MANJARO status: kernel-api
  Server-1: sndiod v: N/A status: off
  Server-2: PipeWire v: 1.2.5 status: active
Network:
  Device-1: Intel Wi-Fi 6 AX201 driver: iwlwifi v: kernel bus-ID: 0000:00:14.3
  IF: wlp0s20f3 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB
    bus-ID: 3-10:10
  Report: btmgmt ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 5.2
    lmp-v: 11
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
    v: 0.6 bus-ID: 0000:00:0e.0
Drives:
  Local Storage: total: 3.92 TiB used: 1.41 TiB (35.9%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVL2256HCHQ-00A00
    size: 238.47 GiB temp: 24.9 C
  ID-2: /dev/sda vendor: Micron model: 2 210 MTFDHBA1T0QF size: 953.87 GiB
    type: USB
  ID-3: /dev/sdb vendor: Seagate model: Expansion size: 1.82 TiB type: USB
  ID-4: /dev/sdc vendor: SK Hynix model: HFS001T39TNH-73A0A size: 953.87 GiB
    type: USB
Partition:
  ID-1: / size: 238.17 GiB used: 173.78 GiB (73.0%) fs: btrfs
    dev: /dev/nvme0n1p2
  ID-2: /boot/efi size: 299.4 MiB used: 584 KiB (0.2%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-3: /home size: 238.17 GiB used: 173.78 GiB (73.0%) fs: btrfs
    dev: /dev/nvme0n1p2
  ID-4: /var/log size: 238.17 GiB used: 173.78 GiB (73.0%) fs: btrfs
    dev: /dev/nvme0n1p2
Swap:
  ID-1: swap-1 type: zram size: 15.42 GiB used: 0 KiB (0.0%) dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 46.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 16 GiB available: 15.42 GiB used: 2.77 GiB (17.9%)
  Processes: 286 Uptime: 6m Init: systemd
  Packages: 2014 Compilers: clang: 18.1.8 gcc: 14.2.1 Shell: Zsh v: 5.9
    inxi: 3.3.36

about alacritty

Name            : alacritty
Version         : 0.13.2-3
Description     : A cross-platform, GPU-accelerated terminal emulator
Architecture    : x86_64
URL             : https://github.com/alacritty/alacritty
Licenses        : Apache-2.0  MIT
Groups          : None
Provides        : None
Depends On      : freetype2  fontconfig  libxi  libxcursor  libxkbcommon  libxkbcommon-x11  libxrandr
Optional Deps   : ncurses: for alacritty terminfo database [installed]
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 8.33 MiB
Packager        : Antonio Rojas <arojas@archlinux.org>
Build Date      : Sat 14 Sep 2024 05:26:11 AM CST
Install Date    : Thu 10 Oct 2024 07:53:26 PM CST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

alacritty config

#base16-pinky-256.yml
live_config_reload = true
# log_level = "Off"
# print_events = false
# window.opacity = 0.8

[colors]
draw_bold_text_with_bright_colors = false

[colors.cursor]
cursor = "0xb4d5ff"
text = "0xbbbbbb"

[colors.primary]
foreground = "0xf5f5f5"
background = "0x171517"
bright_foreground = "0xffffff"
dim_foreground = "0xeff0f1"

[colors.normal]
black = "0x171517"
blue = "0x00ffff"
cyan = "0x6600ff"
green = "0xff0066"
magenta = "0x007fff"
red = "0xffa600"
white = "0xf5f5f5"
yellow = "0x20df6c"

[colors.bright]
black = "0x383338"
blue = "0x00ffff"
cyan = "0x6600ff"
green = "0xff0066"
magenta = "0x007fff"
red = "0xffa600"
white = "0xf7f3f7"
yellow = "0x20df6c"

# [colors.dim]
# black = "0x31363b"
# blue = "0x1b668f"
# cyan = "0x186c60"
# green = "0x17a262"
# magenta = "0x614a73"
# red = "0x783228"
# white = "0x63686d"
# yellow = "0xb65619"

[font]
size = 15

[font.bold]
family = "Cascadia Code"
style = "Bold"

[font.bold_italic]
family = "Cascadia Code"
style = "Bold Italic"

[font.glyph_offset]
x = 0
y = 0

[font.italic]
family = "Cascadia Code"
style = "Italic"

[font.normal]
family = "Cascadia Code"
style = "Regular"

[font.offset]
x = 0
y = 0

[[keyboard.bindings]]
action = "Paste"
key = "V"
mods = "Control|Shift"

[[keyboard.bindings]]
action = "Copy"
key = "C"
mods = "Control|Shift"

[[keyboard.bindings]]
action = "ScrollLineUp"
key = "Up"
mods = "Control|Shift"

[[keyboard.bindings]]
action = "ScrollLineDown"
key = "Down"
mods = "Control|Shift"

[scrolling]
history = 10000
multiplier = 10

[selection]
save_to_clipboard = true
semantic_escape_chars = ",│`|:\"' ()[]{}<>"

[window]
decorations = "full"

[window.dimensions]
columns = 85
lines = 40

[window.padding]
x = 2
y = 2