Opened 2 years ago

Closed 2 years ago

#13251 closed defect (fixed)

GOG version of Zniw Adventure

Reported by: joeraz Owned by: antoniou79
Priority: normal Component: Engine: AGS
Version: Keywords: Zniw Adventure
Cc: Game:

Description

The AGS game Zniw Adventure was recently released on GOG. When I tried to add it (with the latest daily build), it was recognized as an Unknown Game Variant.

{"ctgame.exe", 0, "8a2d48ee8d92bad3c5cacd8b883c5871", 100046802},

Game still can be added and launches, but is not playable because the initial language select screen (in-game) is not responding to mouse clicks.

Change History (7)

comment:1 by antoniou79, 2 years ago

Keywords: Zniw Adventure added

I can confirm the issue with a daily 2.6.0git (Feb 06 2022) (local build msys2 in Windows 10, from master HEAD)

I don't know much of why the mouse click is not detected as of yet, since I'm not the expert on the AGS engine. I can observe different behavior in IsButtonDown(int which) from ac\mouse.cpp as compared to a game like Gemini Rue where mouse click works. Looks like in Zniw Adventure this method is fired a lot more times, and its argument {{which}} seems to fluctuate rather than reflect the pressed button. Could it be a game framerate related issue?

comment:2 by criezy, 2 years ago

Owner: set to criezy
Resolution: fixed
Status: newclosed

Thank you. This has now been added.

in reply to:  2 comment:3 by antoniou79, 2 years ago

Replying to criezy:

Thank you. This has now been added.

As far as I can tell the second issue still persists (Game being unplayable since mouse click does not work in the first screen). Should we open a new ticket for that?
I only have the GOG version of the game -- I don't know if it's the same for the Steam version.

comment:4 by criezy, 2 years ago

Resolution: fixed
Status: closednew

Sorry, I missed the second part of the report. Since that issue is likely still here, I am reopening the ticket.

I don't have the full game though. I tried with the demo, but for me the language selection screen works properly in the demo.

comment:5 by antoniou79, 2 years ago

I checked the demo (from Indie DB) and you're right. The demo works, the full game (GOG at least) does not, when using ScummVM.

Both work if they are run form their own executables.

Some observations from running both with ScummVM (latest master HEAD) on Windows 10:
Demo init (console output):
https://pastebin.com/0FJcmLGF

Full game init (console output):
https://pastebin.com/m704jWmH

In the full game, hovering the mouse over the buttons in the intro language selection screen will not cause the subtitle to be displayed. In the demo the subtitle is displayed, but it has some rendering issues wrt how it looks running the demo from the executable -- this is for another bug ticket.

It seems there's a problematic(?) gui in the full game, with ID 160, name "gEndtitle" and z-order 1200. This is both visible and clickable and its width, height is 640, 480 respectively.
There is no such gui in the demo.
If I force the engine to skip checking this particular gui ID for being interactable (via .IsInteractableAt() in gui_on_mouse_move() (gui.cpp) and GetGUIAt() (global_gui.cpp), the language selection screen starts working properly; subtitles are shown when hovering over the buttons and clicking on the buttons works.

Of course, skipping checking the ID 160 gui, is not a proper solution. But I don't know enough on AGS engines to create a proper patch that handles this special case.

comment:6 by antoniou79, 2 years ago

Looking at the AGS github in the IsInteractableAt() implementation, I found the cause for the issue.
According to the comment there:

	// The Transparency test was unintentionally added in 3.5.0 as a side effect,
	// and unfortunately there are already games which require it to work.

Their implementation of IsInteractableAt() now includes a check to detect this case.
This is part of this commit from AGS repo: https://github.com/adventuregamestudio/ags/commit/a087584a26106d2fb6a17c13b0cb3f6857f4cbed

I made a PR to integrate this change, which I can confirm that fixes the issue with Zniw full game, to our AGS engine here:
https://github.com/scummvm/scummvm/pull/3715

comment:7 by criezy, 2 years ago

Owner: changed from criezy to antoniou79
Resolution: fixed
Status: newclosed

Thank you for the investigation and the fix. The pull request has been merged now, so the issue should be fixed.

Note: See TracTickets for help on using tickets.