Useless glitches
Useless glitches
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?
Are there any other of these glitches (the prince ending in a weird place, and yet surviving) that do not result in saving time?
- atrueprincefanfrom18
- Site Shah
- Posts: 1786
- Joined: January 21st, 2020, 2:53 pm
- Contact:
Re: Useless glitches
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...
I am still finding more, will post here if I find anything more...
Re: Useless glitches
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
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
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
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.
Before:
After:
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)) {
After:
Re: Useless glitches
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
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
Yeah, enabling the FIX_JUMP_THROUGH_WALL_ABOVE_GATE fixes that glitch as well. Thanks.
Re: Useless glitches
I think this trick is also very much useless
- atrueprincefanfrom18
- Site Shah
- Posts: 1786
- Joined: January 21st, 2020, 2:53 pm
- Contact:
Re: Useless glitches
It is useful! Let me try to replicate it after a few hours...
- atrueprincefanfrom18
- Site Shah
- Posts: 1786
- Joined: January 21st, 2020, 2:53 pm
- Contact:
Re: Useless glitches
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):
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
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).
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
Falling through the floor on level 7: https://github.com/NagyD/SDLPoP/issues/229