Demo by Suave Prince

David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Demo by Suave Prince

Post by David »

atrueprincefanfrom18 wrote: February 20th, 2021, 6:32 pm
David wrote: February 20th, 2021, 6:00 pm The glitch might be prevented by this change: https://github.com/NagyD/SDLPoP/commit/ ... d69a994f8b
Interesting. So if you rollback that change, it works? By just reading the code, I am not understanding why it might stop the default behaviour.
I undid that change, but unfortunately it didn't make the glitch possible.
Sorry, it was just a guess.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1786
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Demo by Suave Prince

Post by atrueprincefanfrom18 »

David wrote: February 21st, 2021, 9:24 pm
atrueprincefanfrom18 wrote: February 20th, 2021, 6:32 pm
David wrote: February 20th, 2021, 6:00 pm The glitch might be prevented by this change: https://github.com/NagyD/SDLPoP/commit/ ... d69a994f8b
Interesting. So if you rollback that change, it works? By just reading the code, I am not understanding why it might stop the default behaviour.
I undid that change, but unfortunately it didn't make the glitch possible.
Sorry, it was just a guess.
Umm... I think there's some problem with code in broken room links. This bug only happens in DOSBox with the broken room links. So I think you should look commits regarding those... But still, it's just a guess.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Demo by Suave Prince

Post by David »

I finally figured out how to make the glitch possible in SDLPoP: https://github.com/NagyD/SDLPoP/commit/ ... c54b8e271d

As it turns out, I have added those extra lines (within the new #ifdefs) before v1.00!
Unfortunately I don't remember what did they fix.

I'm still not fully sure why those line affect this glitch.
What I know is that they make a difference here: https://github.com/NagyD/SDLPoP/blob/90 ... 004.c#L480
At the point where the prince should go through the closed gate, the checked flags both become zero after three bumps if FIX_COLL_FLAGS is defined, but they remain 0xFF longer if it's undefined.

Before the fix I made a savestate where prince is standing right under the closing gate.
I could not reproduce the glitch from that state, I had to start from an earlier room.
Maybe the collision flags become 0xFF while the prince is in one of the earlier rooms.

I have also added a new folder called replays-testcases, for replays which test glitches and their fixes.
https://github.com/NagyD/SDLPoP/tree/ma ... -testcases
There I added a replay for this glitch.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1786
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Demo by Suave Prince

Post by atrueprincefanfrom18 »

David wrote: February 27th, 2021, 12:26 pm I finally figured out how to make the glitch possible in SDLPoP: [...]
Great! It works perfectly, as intended. In DOSBox, the Prince is still in first room so you have to be sure to hit the gate at the right time, but in SDLPoP, even if you hit the gate the first moment you climb, you can get to the other room, but it's fine, at least it works! :)

Edit: Saw the replay file too, it's funny that you removed the chompers! :lol:
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1786
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Demo by Suave Prince

Post by atrueprincefanfrom18 »

The latest SDLPoP on GitHub doesn't seem to allow this bug enabled by default?
If you just copy the p1r file into the replays folder without modifying any source code, it doesn't work... Does it work for anyone else?
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Demo by Suave Prince

Post by David »

atrueprincefanfrom18 wrote: April 25th, 2021, 5:23 pm The latest SDLPoP on GitHub doesn't seem to allow this bug enabled by default?
If you just copy the p1r file into the replays folder without modifying any source code, it doesn't work... Does it work for anyone else?
Sorry, it seems something broke it.
I did a git bisect, and it turned out the bug got fixed by this commit: https://github.com/NagyD/SDLPoP/commit/ ... 163d752899
If you disable FIX_CAPED_PRINCE_SLIDING_THROUGH_GATE in config.h then it will work.

I have clarified the requirements for the replay: https://github.com/NagyD/SDLPoP/commit/ ... c958b30811
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1786
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Demo by Suave Prince

Post by atrueprincefanfrom18 »

David wrote: May 1st, 2021, 5:52 pm Sorry, it seems something broke it.
David wrote: May 1st, 2021, 5:52 pm I have clarified the requirements for the replay: https://github.com/NagyD/SDLPoP/commit/ ... c958b30811
Thanks! Now it works.

What exactly is the room requirements? Sometimes it doesn't work if I try to create the rooms myself in Apoplexy. How the rooms should logically be linked back and only then the trick would work? Any ideas?
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Demo by Suave Prince

Post by David »

atrueprincefanfrom18 wrote: May 1st, 2021, 6:17 pm What exactly is the room requirements? Sometimes it doesn't work if I try to create the rooms myself in Apoplexy. How the rooms should logically be linked back and only then the trick would work? Any ideas?
I remember it's also related to something you do in one of the previous rooms.

I know this because the trick/glitch didn't work when I started from a savestate where the prince was in the room where the gate pushes him. Or maybe it was the room below that.
(I made that savestate before I made the trick possible in SDLPoP, and the various coll_flags were already zeroed then, making the trick impossible.)

So I had to start from the room with the many chompers, as you can see in the replay in the replays-testcases folder.
Post Reply