MestreLion / hackmatch

Exapunks Hack*Match Bot
GNU General Public License v3.0
4 stars 2 forks source link

[Window] Game not detected #5

Open Siluni opened 1 year ago

Siluni commented 1 year ago

Hi, i've installed but the game isn't detected when i run the cmd but the game launch correctly (1600*900)

.\hackmatch-bot.exe --verbose [2023-09-11 18:54:50 DEBUG ] main: Namespace(loglevel=10, benchmark=False, watch=False, timeout=850, string=None, path=None, debug=True) [2023-09-11 18:54:50 INFO ] game: Read game settings: C:\Users\user\Documents\My Games\EXAPUNKS\123456789\config.cfg [2023-09-11 18:54:50 DEBUG ] game: Parsed game settings: {'DisplayIndex': '0', 'EnableCrtDistortion': 'False', 'EnableHistograms': 'True', 'EnableLeaderboards': 'True', 'EnableMultiplayer': 'True', 'FilterProfanity': 'False', 'ForceLowQualityTextures': 'False', 'Fullscreen': 'True', 'GifOutputDirectory': '', 'KeyMapping.Down': '115', 'KeyMapping.Left': '97', 'KeyMapping.Right': '100', 'KeyMapping.Start': '13', 'KeyMapping.Up': '119', 'KeyMapping.X': '106', 'KeyMapping.Y': '107', 'KeyMapping.Z': '108', 'Language': 'English', 'OS.Windows.UseOpenGL': 'False', 'Resolution.Height': '1080', 'Resolution.Width': '1920', 'ShowTenthPercentile': 'False', 'ShowTopPercentile': 'False', 'UseLargeFonts': 'False', 'UseSoftwareCursor': 'False', 'Volume.Music': '0', 'Volume.Sound': '0', 'Volume.Voice': '0'} [2023-09-11 18:54:50 INFO ] main: Launching game and waiting 60 seconds for game window [2023-09-11 18:54:50 INFO ] game: Launch game by Steam URI: steam://rungameid/716490 [2023-09-11 18:55:50 CRITIC] main: Game did not start after 60 seconds

MestreLion commented 11 months ago

What exact Operating System? I assume it's Windows, but what version and details?

Can you switch the game to windowed mode and take a few screenshots of the desktop, specially the game window title bar? I suspect in your system the game window isn't named EXAPUNKS as the game expects

(PS: You sure you're running 1600*900? The detected game config says it's 1920x1080, Fullscreen. Which is fine tho, the bot runs fine in that setup)

Siluni commented 11 months ago

Window mode seem to work fine, but it say Unsupported game window size: (1606, 929), must be one of ((1920, 1080), (1920, 1200), (1600, 900), (1366, 768)) i set 1600/900 in setting

in the config.cfg it's set to OS.Windows.UseOpenGL = False Resolution.Height = 900 Resolution.Width = 1600

MestreLion commented 9 months ago

The fix proposed in #8 might fix this too.

Aratietur commented 9 months ago

Hi, i've installed but the game isn't detected when i run the cmd but the game launch correctly (1600*900)

If you press "Alt" + "enter" wait some seconds and press it again (fullscreen --> windowed --> fullscreen) it starts to generate screenshots. so the bot should work after this with the correct resolution.

MestreLion commented 9 months ago

@Aratietur I wonder why is this needed... if you set fullscreen in the game settings, doesn't it already starts at the specified, correct resolution? Well, even if it starts as a window, if it automatically goes fullscreen afterwards the bot should detect that transition the same way it does when you manually switch back and forth.

Can someone post the initial debug log lines so I can check if there's anything I can do on my part to avoid the need of this workaround?