New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ags3: path issues with 1271.Maniac Mansion Mania #663
Comments
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
Hmm, I was able to do this in first attempt in original game and running latest ags3 branch. It works if I click anywhere on the stairs "object" or above it. |
Okay, don't know if related, but if character stands to the right from stairs clicking anywhere around them works. Original game seem to have about same behavior, I did not notice significant difference. |
This comment was marked as abuse.
This comment was marked as abuse.
I fear this won't progress as it is now because it's difficult to understand problem description without visual feedback, and also we need to define what is correct expected behavior and what is not. For the reference, here's a screenshot of the room with translucent walkable area overlay. I had to combine two screenshots myself because AGS only displays room and areas in game separately: For an in-game testing we'd need to change the way debug features work from showing areas on a still screen to displaying them as transparent overlay as game progresses. Same for character walk paths. |
This comment was marked as abuse.
This comment was marked as abuse.
They are run by script_debug function, but they normally are activated by command from script, so this may be complicated. For this case I hacked engine code in check_keyboard_controls and made it call script_debug(2,0) at an arbitrary key code. That draws walkable areas on screen. |
@rofl0r , an unrelated question, have you played this game further, and have you noticed any issues with the loading savegames? |
This comment was marked as abuse.
This comment was marked as abuse.
Oh, you are playing using 3.4.1, that explains why it worked, I was testing in wip 3.5.0 branch which has a new save format. |
It's been a while, and I decided to recall what was going on there, to find out that it does not work for me anymore like I described in a comment above. The engine uses legacy pathfinder since it's a pre-3.5.0 game. EDIT: so, apparently besides "walkable" area, a "region" mask has a small area at the stairs too. Maybe it is meant to trigger change room when player stands on it, but for some reason does not. |
So, what is happening is that there's a small region near the stairs, that has "on step" interaction and triggers a change to another room, but for some reason character does not stand right on it; or maybe logic of "stepping on" changed in between the versions. For example, when the light/tint is applied by the region, engine tests not only character's position, but also tests with 3 pixel offset in 4 directions around it. But it does not do same thing for interactions, at least in the current code. |
Found something else interesting: if you try to get as high as possible in a room, it seems that the character can go 1 pixel further in the original game... Ran with |
I did some research on this. The issue occurs on pre-3.0 games using the Bernard-Haus resources. |
@tag2015 thank you for this research. I make a guess that this setting could have been changed around the time when the users of AGS started to make more high resolution games. The old pathfinder was too slow for higher resolutions. This is also the reason why 640x400 (and higher) games originally used 1:2 walkable masks, instead of 1:1. Perhaps this granularity may be set depending on a game resolution (or even room size, but that may be more bug prone). |
@tag2015 I made an experiment by extracting the room in question, and building dummy games in several versions of AGS. It appears that the change in pathfinding occured between versions 3.0 and 3.0.1. Changelog has this line under 3.0.1 notes:
although I cannot exactly tell if this is related. Comparison may be done not only visually by where character stands, but also by pressing Ctrl+A to display walkable areas, and observing the "collision box" made by character inside a walkable area (if Character's Solid property is enabled). If a game is run without scaling filter, making screenshot and comparing where collision box is positioned may tell where character's position is. EDIT: I tried your "granularity" fix, but unfortunately, it did not work for me... at least it does not change where character ends up standing in that room, if you walk straight up as much as possible. EDIT2: Ah, I think I understand now. There are two sweeps, one in a 50-pixel radius, and another around whole area. |
Pushed fix : 1c22681 Went a "configuration" way for easier experimenting. |
just left of the room one starts in, there's a stair going down and according to the walkthrough https://www.maniac-mansion-mania.com/index.php/en/spiele/komplettloesungen/episoden/219-lg-episode-16-meteor-family-die-rehr-des-meteoriten.html one is supposed to be able to walk down. i didn't find any way to walk down the stairs, and suspect the pathfinding is somehow broken.
The text was updated successfully, but these errors were encountered: