Prince can survive at 0 HP!

Discuss PoP1 for DOS here.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Prince can survive at 0 HP!

Post by atrueprincefanfrom18 »

Hey,

I was playing the original PoP1 without megahit and I discovered something very very strange. I was in Level 13 (Jaffar Level). I killed Jaffar while I had 1 HP and accidently landed on the first platform as circled in yellow ink from the top platform as circled in yellow color.

Flashing was going on while this happened. It didn't kill the Prince! Check the screenshot:
Screenshot (120)_LI.jpg
Kid (Prince) was behaving as if he had enough health and could also run, jump and do all sort of movements. I could even go to the next level from door.

Any idea why this could have happened? Is it because the system doesn't register the changes while flashing is going on?

Thanks!
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5745
Joined: April 9th, 2009, 10:58 pm

Re: Prince can survive at 0 HP!

Post by Norbert »

atrueprincefanfrom18 wrote: January 23rd, 2020, 8:24 am Hey,

I was playing the original PoP1 without megahit and I discovered something very very strange. I was in Level 13 (Jaffar Level). I killed Jaffar while I had 1 HP and accidently landed on the first platform as circled in yellow ink from the top platform as circled in yellow color.

Flashing was going on while this happened. It didn't kill the Prince! Check the screenshot:

Screenshot (120)_LI.jpg

Kid (Prince) was behaving as if he had enough health and could also run, jump and do all sort of movements. I could even go to the next level from door.

Any idea why this could have happened? Is it because the system doesn't register the changes while flashing is going on?

Thanks!
A quick way to replicate this is to win from Jaffar while having only 1 potion left.
Then all HP potions are displayed empty.

Alternatively, win with 2 potions left, and then find a way to lose another potion.
For example the method mentioned in atruep's post.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince can survive at 0 HP!

Post by atrueprincefanfrom18 »

Norbert wrote: January 23rd, 2020, 9:15 pm
atrueprincefanfrom18 wrote: January 23rd, 2020, 8:24 am Hey,

I was playing the original PoP1 without megahit and I discovered something very very strange. I was in Level 13 (Jaffar Level). I killed Jaffar while I had 1 HP and accidently landed on the first platform as circled in yellow ink from the top platform as circled in yellow color.

Flashing was going on while this happened. It didn't kill the Prince! Check the screenshot:

Screenshot (120)_LI.jpg

Kid (Prince) was behaving as if he had enough health and could also run, jump and do all sort of movements. I could even go to the next level from door.

Any idea why this could have happened? Is it because the system doesn't register the changes while flashing is going on?

Thanks!
A quick way to replicate this is to win from Jaffar while having only 1 potion left.
Then all HP potions are displayed empty.

Alternatively, win with 2 potions left, and then find a way to lose another potion.
For example the method mentioned in atruep's post.
Yes, I tried and it works! But the question still remains, WHY this happens? I am extremely curious to know this...
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: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince can survive at 0 HP!

Post by David »

It's because of what I wrote here: viewtopic.php?p=25859#p25859

If the prince has 1 HP then it blinks (between 1 HP and 0 HP).
However, this blinking is controlled by the remaining time.
If the timer stops then the blinking stops as well, it remains in the state in which it was when the timer stopped.
So you have a 50% chance that 1 HP will be displayed as 0 HP.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince can survive at 0 HP!

Post by atrueprincefanfrom18 »

Great! Thank you! It answered my question! :)
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
yourantumayel69
Calif
Calif
Posts: 565
Joined: November 12th, 2019, 9:53 am
Location: Indonesia
Contact:

Re: Prince can survive at 0 HP!

Post by yourantumayel69 »

Prince is survive at 9 or 10 HP in level 13 original PoP
Pengkhotbah 3:1 (TB) Untuk segala sesuatu ada masanya, untuk apa pun di bawah langit ada waktunya.
David
The Prince of Persia
The Prince of Persia
Posts: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince can survive at 0 HP!

Post by David »

David wrote: January 25th, 2020, 6:40 pm If the prince has 1 HP then it blinks (between 1 HP and 0 HP).
However, this blinking is controlled by the remaining time.
If the timer stops then the blinking stops as well, it remains in the state in which it was when the timer stopped.
So you have a 50% chance that 1 HP will be displayed as 0 HP.
A similar thing can happen if a guard has 1 HP when he kills the prince.
Time stops while the prince is dead (see the bottom of this post), so the guard's HP will stop blinking.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince can survive at 0 HP!

Post by atrueprincefanfrom18 »

More killer fact here!
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: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince can survive at 0 HP!

Post by David »

(Moved from "Off-Topic" to "Prince of Persia 1 for DOS".)
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

No blink one hit point

Post by Emiliano »

Hi guys, in my mod in progress I found something I haven't seen before, if you have one hit point in level 14 or a guard has it, the only hit point does not blink in this level
Do you need an evidence?
Is it because I use a cracked version?
65536
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: No blink one hit point

Post by atrueprincefanfrom18 »

Emiliano Fierro wrote: September 3rd, 2020, 1:10 am If you have one hit point in level 14 or a guard has it, the only hit point does not blink in this level.
Yes, I tried it works. Maybe because in the original game there is no chance to lose any health point and that's why some code related to Level 14 and Health Points is changed. David can find it. :)
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: No blink one hit point

Post by Emiliano »

I will keep the no blink one hit point for my sixth mod maybe in my seventh mod I will get a hack for it ;)
65536
David
The Prince of Persia
The Prince of Persia
Posts: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: No blink one hit point

Post by David »

Emiliano Fierro wrote: September 3rd, 2020, 1:10 am Hi guys, in my mod in progress I found something I haven't seen before, if you have one hit point in level 14 or a guard has it, the only hit point does not blink in this level
That happens because the blinking of the hit point is controlled by the elapsed time, and the timer is stopped on level 14.
See also:
viewtopic.php?p=25859#p25859 -- PoP1 Special Events
viewtopic.php?p=27523#p27523 -- "Prince can survive at 0 HP!"
viewtopic.php?p=28901#p28901 -- one of the hacks for the 30th Anniversary Port SNES mod by Shauing


You could change where the timer stops:

Search: 83 3E 9E 0F 0D 7F 5F
Change: 0D to the level number.

Code: Select all

seg008:24BC 83 3E 9E 0F 0D                       cmp     current_level, 13 ; Special event: time stops if Jaffar died, and on the next level
seg008:24C1 7F 5F                                jg      loc_C142
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: No blink one hit point

Post by Emiliano »

I also found the opposite case, I arrived to level 14 fairly (playing all previous levels) and the one hit point was invisible
65536
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: No blink one hit point

Post by dmitrys »

I had the same issue on level 14 when working on my mod. As mentioned, blinking is driven off the same timer that is responsible for the amount of ticks left before the game is over. When the time stops (typically on level 13 after defeating Jaffar), the blinking stops working. It can get stuck at a tick either when the last hit point is being displayed while blinking or when it is off. So I just created a separate timer for blinking hit points in the SDLPOP source because in my mod the time stops as soon as you face off with Jaffar.
Post Reply