adventuregamestudio / ags

AGS editor and engine source code
Other
697 stars 159 forks source link

Wrong walkspeed / unsolvable puzzle in Apprentice #2004

Closed tag2015 closed 1 year ago

tag2015 commented 1 year ago

Describe the bug This bug was originally reported on the scummvm bugtracker 12921 , but it was never solved and also occurs with the latest AGS. There is a timed puzzle in Apprentice that can't be solved, possibily related to the walkspeed that is much slower compared to the original game.

AGS Version 84949ac release from CI

Game https://herculeaneffort.com/index.php?page=apprentice1

To Reproduce Please see 12921 for detailed explanation

Desktop (please complete the following information):

ivan-mogilko commented 1 year ago

Yes, I confirm that walking speed and/or animation speed is slower when running current engine. in AGS there's "Movement linked to the animation" property, which also affects this.

This may be related to incorrect interpretation of an old game data.

ivan-mogilko commented 1 year ago

Another possible suspect is this code:

https://github.com/adventuregamestudio/ags/blob/84949acf29bd95111c32facac536d0cac84e6782/Engine/ac/room.cpp#L1107-L1115

disabling this makes character walk as fast as in the original game. But I am not certain how to deal with this correctly yet.

EDIT: Okay, I think I realized what the mistake is, will try to make a fix soon.

ivan-mogilko commented 1 year ago

Pushed a fix: 1b4117a6d2bc9e5a70739d7d73ab77e616320fdb

In short, this is caused by the previous incorrect fix to the legacy "upscale" mode (900f47bddd7ca6aa953b58d6b7f3d56fbb7e2c4c), which resized the walkable area to match the upscale room bg. Instead of resizing the mask, it will now modify the MaskResolution property that defines coordinate conversions.

Also, apparently, this is an alternate approach to fix the scaling bug mentioned here: #1383

tag2015 commented 1 year ago

Thanks for the quick fix! I tested other old games and I found no regressions