Page 1 of 2

Useless glitches

Posted: July 19th, 2020, 11:32 am
by dronno
I was thinking about the well-known glitches of Levels 5, 7, 10, where the prince falls/moves into an unexpected part of the level, effectively saving time.

Are there any other of these glitches (the prince ending in a weird place, and yet surviving) that do not result in saving time?

Re: Useless glitches

Posted: August 8th, 2020, 7:00 am
by atrueprincefanfrom18
There's a less known glitch in Level 4, which never ever results in saving time, hope this is what you wanted? :)





I am still finding more, will post here if I find anything more...

Re: Useless glitches

Posted: October 12th, 2020, 12:37 am
by dmitrys
I fell through the floor below the left gate in the room to the left of the starting room on level 4 once right after a running jump. I was not able to reproduce it since.

Re: Useless glitches

Posted: October 12th, 2020, 2:47 pm
by Norbert
dmitrys wrote: October 12th, 2020, 12:37 am I fell through the floor below the left gate in the room to the left of the starting room on level 4 once right after a running jump. I was not able to reproduce it since.
Unless I'm mistaken, that's trick 128:

(Of course, it only requires the right distance, not the exact movements as shown in the video.)

Re: Useless glitches

Posted: October 12th, 2020, 6:56 pm
by dmitrys
That is very helpful. I'll try to see if I can find the bug in the code that causes the kid to fall through.

Re: Useless glitches

Posted: October 12th, 2020, 7:56 pm
by dmitrys
I was able to fix the bug. But the reason is pretty strange. In that case the "Char" reference does not have the same values as the "Kid" reference even though the character id is kid.

Here is how I fixed it but there is probably a bigger issue that needs to be fixed to ensure the coordinates match.

Code: Select all

void __pascal far check_on_floor() {
	if (cur_frame.flags & FRAME_NEEDS_FLOOR) {
		if (get_tile_at_char() == tiles_20_wall) {
			in_wall();
		}
		// Bug fix: when kid does a running jump and falls into a lower row right next to the wall (popot trick 128),
		// Char.curr_col is not the same as Kid.curr_col causing the floor check to fail.
		if (Char.charid == charid_0_kid &&
			Char.curr_col != Kid.curr_col &&
			Char.frame >= frame_40_running_jump_1 && Char.frame <= frame_44_running_jump_5) {
			get_tile(Kid.room, Kid.curr_col, Kid.curr_row);
		}
		if (! tile_is_floor(curr_tile2)) {
Before:


After:

Re: Useless glitches

Posted: October 12th, 2020, 9:21 pm
by dmitrys
I think I found a better solution. it seems the "Char.curr_col" is not being updated fast enough when the "get_tile_at_char()" function is getting called. So the solution would be to calculate it from the "Char.x" coordinate instead.

Code: Select all

void __pascal far check_on_floor() {
	if (cur_frame.flags & FRAME_NEEDS_FLOOR) {
		if (get_tile_at_char() == tiles_20_wall) {
			in_wall();
		}
		
		// Bug fix: when kid does a running jump and falls into a lower row right next to the wall (popot trick 128),
		// the Char.curr_col value does not update fast enough.
		if (Char.frame == frame_44_running_jump_5) {
			get_tile(Char.room, get_tile_div_mod_m7(Char.x), Char.curr_row);
		}
		
		if (! tile_is_floor(curr_tile2)) {

Re: Useless glitches

Posted: October 18th, 2020, 8:21 pm
by David
Norbert wrote: October 12th, 2020, 2:47 pm
dmitrys wrote: October 12th, 2020, 12:37 am I fell through the floor below the left gate in the room to the left of the starting room on level 4 once right after a running jump. I was not able to reproduce it since.
Unless I'm mistaken, that's trick 128:
This might be related: viewtopic.php?p=15042#p15042
That change made the level 7 trick possible, which is mentioned in the description of trick 128.

(There is also a fix in SDLPoP called FIX_JUMP_THROUGH_WALL_ABOVE_GATE. Its description mentions the level 7 trick as well.)

Re: Useless glitches

Posted: October 19th, 2020, 5:57 am
by dmitrys
Yeah, enabling the FIX_JUMP_THROUGH_WALL_ABOVE_GATE fixes that glitch as well. Thanks.

Re: Useless glitches

Posted: February 17th, 2021, 12:20 am
by VelCheran
I think this trick is also very much useless :lol:


Re: Useless glitches

Posted: February 17th, 2021, 2:44 am
by atrueprincefanfrom18
It is useful! Let me try to replicate it after a few hours...

Re: Useless glitches

Posted: February 17th, 2021, 10:28 am
by Norbert
VelCheran wrote: February 17th, 2021, 12:20 am I think this trick is also very much useless :lol:

[video]
Interesting. Can you describe how to do it?
I know the video shows arrow keys, but I'm unable to replicate it.

Re: Useless glitches

Posted: February 17th, 2021, 10:49 am
by atrueprincefanfrom18
Norbert wrote: February 17th, 2021, 10:28 am Interesting. Can you describe how to do it?
I know the video shows arrow keys, but I'm unable to replicate it.
I think it only works when Prince has 1 HP. Check the hit points in the video. I think it's basically the case where Prince HP becomes 0 (because of lose tile has hit him), and the game doesn't check if it should stop the Prince from going through the wall when he jumps. The jump keys should be pressed perfect enough, otherwise you would die. I think it's the only frame where you can perform this trick. One frame before or one frame later and the trick won't work. I could do it in SDLPoP (needed 20+ Quickloads, but it should be possible with DOSBox too):

the_trick.p1r
(3.11 KiB) Downloaded 85 times

Could be useful if merged with trick 88.

Norbert, I think you should add this to PoPOT (something after a long time ;))...

Re: Useless glitches

Posted: February 17th, 2021, 3:44 pm
by VelCheran
Basically, the same thing happens when bumping too late into the wall to avoid the falling tile and pressing up nonetheless: the prince will jump, hang a little while, then fall and die.
To perform this trick, you have to try to use a standing jump to avoid taking damage from the falling tile, but jumping too late to avoid it. I was able to do it using dosbox-x (a fork of Dosbox with savestates).

Re: Useless glitches

Posted: March 7th, 2021, 11:22 am
by David
Falling through the floor on level 7: https://github.com/NagyD/SDLPoP/issues/229