Skip to content

Screen resolution bug when running the game #35

Description

@iampurplebug

Hello @JonathanMurray. Hello everyone.
Here I bring a temporary solution when running the game and shows screen resolution bug when running the game.

To reproduce this problem:
Just start the game and some incompatibility with the screen resolution identification will appear. Causes a resolution bug, the game is immediately stopped.

Causes investigated:
Relatively associated this error with incompatibility of the video driver with openGL applications. I still don't know which video cards can be affected, here I am using the VGA compatible controller for Intel Skylake GT2 [HD Graphics 520].

Temporary solution:
Disable the fullscreen at line 47 of the main.py file in the "/python-2d-game-3/pythongame" installation directory of the game.
Change self.fullscreen = True to self.fullscreen = False

So that it is:

classMain:
def__init__(self, map_file_name: Optional[str], chosen_hero_id: Optional[str], hero_start_level: Optional[int],
start_money: Optional[int]):
cmd_flags=CommandlineFlags(map_file_name, chosen_hero_id, hero_start_level, start_money)
pygame.init()
print("Available display modes: "+str(pygame.display.list_modes()))
self.fullscreen=Falseself.pygame_screen=self.setup_screen()

Error message:

X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 153 (XFree86-VidModeExtension)
Minor opcode of failed request: 10 (XF86VidModeSwitchToMode)
Value in failed request: 0x220000e
Serial number of failed request: 265
Current serial number in output stream: 268

Video card system registration and installed driver:

 *-display
description: VGA compatible controller
product: Skylake GT2 [HD Graphics 520]
manufacturer: Intel Corporation
ID: 2
bus information: pci@0000:00:02.0
version: 07
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:156 memória:a0000000-a0ffffff memória:90000000-9fffffff porta de E/S:4000(tamanho=64) memória:c0000-dffff

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions