Another graphical glitch

Discuss PoP1 for DOS here.
Post Reply
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Another graphical glitch

Post by dmitrys »

I found another graphical glitch. It happens when a loose tile is put above a tile with snowflake wall pattern.
image1.jpg
After the loose tile falls the lower part of the snowflake is not getting re-rendered. That happens because debris tiles do no have a modifier that renders the tile with snowflake pattern. However, the redraw height of the tile only goes up until the blue line, so the upper part of the line is not getting rerendered.
image2.png
And if we run in and out of the room we can see that the tile pattern is gone.
image3.png
This bug happens in the original POP and it is not really possible to fix without introducing a new modifier for the debris tile. It is just something to keep in mind when creating new levels.

Jordan Mechner typically kept close attention to make sure blue lines connect and behave correctly. But level 11, which seems rushed to me since it is pretty short and has a few bugs, has this problem.
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Another graphical glitch

Post by David »

There is something similar at the beginning of level 8.
If you fall down together with the loose floor in the first room, you'll see as it lands on a floor with the wall pattern.
When it lands, the bottom of that wall pattern disappears.

On level 12, the same can happen with the second loose floor after the spikes.

Level 11 has a more obvious glitch in addition: When the loose floors land in front of the level door, they just disappear.
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Another graphical glitch

Post by dmitrys »

David wrote: November 7th, 2020, 11:03 pm There is something similar at the beginning of level 8.
If you fall down together with the loose floor in the first room, you'll see as it lands on a floor with the wall pattern.
When it lands, the bottom of that wall pattern disappears.
Yeah, that looks like the same problem with debris tile re-render height.

This is the line where the value be set to 63, just like in the "redraw_at_trob" method. But it would break DOS POP compatibility and clear the wall pattern right away.
https://github.com/NagyD/SDLPoP/blob/1e ... 07.c#L1094
David wrote: November 7th, 2020, 11:03 pm On level 12, the same can happen with the second loose floor after the spikes.
There is a similar but different glitch on level 12. The first tile that appears after you unite with the shadow changes the wall pattern. That happens because a wall pattern without a tile underneath is different from wall patterns with tiles.
David wrote: November 7th, 2020, 11:03 pm Level 11 has a more obvious glitch in addition: When the loose floors land in front of the level door, they just disappear.
Debris only appear on regular tiles and torches. The game does not have level door tiles with debris.

The same glitch can be reproduced with other tiles like the bottom part of a large pillar if you put a lose tile on top of it, which is not something authors would typically do.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Another graphical glitch

Post by atrueprincefanfrom18 »

dmitrys wrote: November 7th, 2020, 8:01 pm Jordan Mechner typically kept close attention to make sure blue lines connect and behave correctly. But level 11, which seems rushed to me since it is pretty short and has a few bugs, has this problem.
Well, maybe he didn't notice this issue, as it's not a route that you would take. You would either not notice there are loose tiles above you or you would notice and run through them (and most probably you would fall the loose tile which is before the chomper). So maybe he didn't notice this issue.

There are also many tiles which don't behave properly when put together.

I think Level 11 and 12 both are rushed.
11 because it could have been better similar to Level 10, but it's short because Mechner would have thought people might not finish it in time.
And 12 because it contains a shortcut. Maybe they got pretty close to the date when they had to ship it.

By the way, which bugs you are talking on Level 11? :P It contains almost 0 bugs I guess?
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Another graphical glitch

Post by dmitrys »

I am talking about graphical glitches which do not affect gameplay.

A minor glitch includes snowflake wall pattern under loose tiles in the first guard room that does not refresh properly if a loose tile above falls.

There are also 2 different drawn room glitches in the second guard room. If you push guard far enough into the spike in the next room, the guard appears behind the wall in the previous room where kid is. Also, if kid jumps from a specific place into spikes, the drawn room switches to the room to the right of the room with spikes. Obviously those glitches are present throughout the game but only the layout of that room on level 11 makes them apparent.

Level 12 has a few quirks as well. The first one is not really a glitch but there are 2 shortcuts available to the platform before the skeleton room. Then you have the overflow bug that can also speed up the gameplay. And for some reason hit points get restored in the shadow room before the fight despite the fact that merging with shadow restores them as well + an additional hp from the potion on level 5. But hit points do not get restored on level 12B if you fall 2 levels down in the last room of level 12A.

And I am not sure this fix is worth merging as it changes the behavior from the DOS version of POP. And snowflake or wall pattern in dungeons would fully disappear after a loose tile falls instead of partially disappearing which is weird as well.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Another graphical glitch

Post by atrueprincefanfrom18 »

dmitrys wrote: November 15th, 2020, 5:36 am I am talking about graphical glitches which do not affect gameplay.
Ah, ok, I got it.
dmitrys wrote: November 15th, 2020, 5:36 am There are also 2 different drawn room glitches in the second guard room. If you push guard far enough into the spike in the next room, the guard appears behind the wall in the previous room where kid is. Also, if kid jumps from a specific place into spikes, the drawn room switches to the room to the right of the room with spikes. Obviously those glitches are present throughout the game but only the layout of that room on level 11 makes them apparent.
Yup, that's right. It should be fixed, now that we have the source code available.
dmitrys wrote: November 15th, 2020, 5:36 am Level 12 has a few quirks as well. The first one is not really a glitch but there are 2 shortcuts available to the platform before the skeleton room. Then you have the overflow bug that can also speed up the gameplay. And for some reason hit points get restored in the shadow room before the fight despite the fact that merging with shadow restores them as well + an additional hp from the potion on level 5. But hit points do not get restored on level 12B if you fall 2 levels down in the last room of level 12A.
Well, those are due to the special events. The HPs gets restored, if you re-enter. There's another bug actually: If the Kid dies there because of spikes, then the game restores the points, but you can't do anything, you would have to use CTRL + A and restart the level. Maybe it can be fixed as well? I'll show a demo. See the attachment:

Level12a_Problem.zip
(3.61 MiB) Downloaded 53 times

And yes, hit points do not get restored on Level 12b, because it's a special event as well. You can use CTRL + A and then the points get restored.
dmitrys wrote: November 15th, 2020, 5:36 am And I am not sure this fix is worth merging as it changes the behavior from the DOS version of POP. And snowflake or wall pattern in dungeons would fully disappear after a loose tile falls instead of partially disappearing which is weird as well.
Actually, if it affects the gameplay (not visual), I think it's fine to merge it. But after all, David is the one who would decide.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Another graphical glitch

Post by dmitrys »

atrueprincefanfrom18 wrote: November 15th, 2020, 6:59 am Well, those are due to the special events. The HPs gets restored, if you re-enter. There's another bug actually: If the Kid dies there because of spikes, then the game restores the points, but you can't do anything, you would have to use CTRL + A and restart the level. Maybe it can be fixed as well? I'll how a demo. See the attachment:
That looks like a combination of the overflow bug and the special event. Short of disabling the event, it might be possible to add a check to the event that the current kid's frame is not dead, spiked or chomped. But it would have to be tested to ensure there is no race condition there.

My problem with that event is there is no reason for the hitpoints to get restored since it does not happen in other levels with the shadow.

And the Ctrl-A workaround on level 12B is what makes it look like a bug.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Another graphical glitch

Post by atrueprincefanfrom18 »

dmitrys wrote: November 15th, 2020, 7:40 am And the Ctrl-A workaround on level 12B is what makes it look like a bug.
If you check the special events document on PoPOT and/or the Jordan Mechner's old documents, you can see that what Jordan Mechner wanted to show is that you are just entering into a fight with Jaffar in the same dungeons. If you see the layout, it looks like you are into same level although, technically you can't have 2 types of guards per level.

So Level 13 is actually loaded, and the problem is if you don't want the player to show that a different level is loaded, you shouldn't regenerate the health points and that's what happens.

But on the contrary, you are right. After CTRL + A, you should logically have same number of hit points as you had in Level 12a. So maybe this is another todo to do. :)
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: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Another graphical glitch

Post by atrueprincefanfrom18 »

A weird graphical glitch in SDLPoP.
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: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Another graphical glitch

Post by David »

atrueprincefanfrom18 wrote: January 6th, 2021, 11:14 am A weird graphical glitch in SDLPoP.
I haven't seen this glitch yet.

Additional information to reproduce it:
1. The floor above the gate is loose.
2. The gate was opened by a button, and it's not permanently open.

Here is my fix: https://github.com/NagyD/SDLPoP/commit/ ... 5702801794

By the way, this glitch looks different in the DOS version.
Where the loose floor overlaps the wall, it becomes a brownish color.
(I wanted to attach a screenshot but a forum bug is preventing that.)
Post Reply