Researching the Repetition of Time

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

Re: Researching the Repetition of Time

Post by dmitrys »

I believe the same behavior happens in the DOS version of POP so it would only be an SDLPoP fix.

In my mod I could not use the default logic because it is possible for Jaffar to die in the same room as the gate that leads to the princess in which case it would have never opened. So I created a timer where if prince is in that room and the guard is dead it would open the gate by hitting a button in a hidden room.

If you have multiple Jaffars in rooms next to each other it would have been more complicated.
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Researching the Repetition of Time

Post by dmitrys »

atrueprincefanfrom18 wrote: October 17th, 2020, 6:16 pm Right, main question is how can it be fixed? It's a rare case, but technically should be fixed.
Now that I have done a lot of more work with the guards logic, I have more understanding what is happening. On every frame the game checks if there is a non-hidden guard (facing left or right) in the room with 0 hit points. If so, the code marks the guard as dead, plays victory music and enables hard-coded events like opening the level door during Jaffar's death.

However, the "leave_guard" function that gets called when you exit the room changes guard's direction to "none" which makes him disappear. But it also causes the logic in the paragraph above to skip guard's death on the next frame. Guard's information is stored into the "level" variable arrays that correspond to that room. But when you enter the room again, the guard will not appear since he was offscreen (tile = 30) when kid had left the room.

That also explains why guards that fell out do not appear in the room below. The reason for this behavior is there is only 1 guard slot per room so drawing fallen out dead guards could cause active guards to disappear.

I had been able to reproduce a scenario where kid left before guard completely fell out of the room. The death music does not play when you leave the room. But when you enter the room again, the guard appears falling in the bottom row for 1 frame and then the victory music plays.

In my mod I created a new "fallout" action that gets assigned to the guard (all characters have an action variable) in that scenario. The death logic also works on guards with that action despite of direction. That might be enough to fix the issue but is not something that can be added to the DOS version.

In my mod that action also triggers additional logic that calculates were the dead guard falls (it could be in next room or multiple rooms below until he hits the floor). The dead guard then appears in one of the "dead guard" slots of that room so he would not interfere with active guard in that room, if one is available. The logic also works on a timer based on how many rows the guard falls to death since it can take a few seconds for guard to fall down through several rooms.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Researching the Repetition of Time

Post by atrueprincefanfrom18 »

dmitrys wrote: October 17th, 2020, 6:44 am
atrueprincefanfrom18 wrote: October 17th, 2020, 3:58 am No wonder KingOfPersia has seriously played very very very very great attention to these things.
The same is true about level 12B considering it does not have any regular loose tiles.
Also, now I understand why there were blue potions all over the place in Level 8. It somehow tricks the player to give up drinking those and in the end: get stuck in room 16. Hmm, nice thinking! I hope he returns back to at least say "Hello!" :|

By the way, can't we find out anything about who he was? I mean how did the mod got into PoPOT or where was the first release? Norbert, your memory test?
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: 5746
Joined: April 9th, 2009, 10:58 pm

Re: Researching the Repetition of Time

Post by Norbert »

atrueprincefanfrom18 wrote: January 2nd, 2021, 3:40 pmBy the way, can't we find out anything about who [KingOfPersia] was? I mean how did [Repetition of Time] got into PoPOT or where was the first release?
I got Repetition of Time from PoP1 Total Pack, which was created by starwindz. And starwindz got it from PoPUW. PoPUW webmaster/owner Jalal (profile, email) had added it to PoPUW per KingOfPersia's request, and KingOfPersia announced it on the PoPUW forum (archive, b). Jalal would know which email address (and IP address) once belonged to KingOfPersia, but it's probably not enough to actually reach KingOfPersia.
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Researching the Repetition of Time

Post by dmitrys »

dmitrys wrote: October 17th, 2020, 6:44 am The same is true about level 12B considering it does not have any regular loose tiles.
That level actually has 1 loose tile right in front of Jaffar (in the original PoP1) that can be used to easily win the game. But it does not shake when kid jumps.
Last edited by dmitrys on January 2nd, 2021, 6:26 pm, edited 1 time in total.
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Researching the Repetition of Time

Post by dmitrys »

atrueprincefanfrom18 wrote: January 2nd, 2021, 3:40 pm Also, now I understand why there were blue potions all over the place in Level 8. It somehow tricks the player to give up drinking those and in the end: get stuck in room 16. Hmm, nice thinking! I hope he returns back to at least say "Hello!" :|
Yes, blue poison potions are typically used in mods to mask a gate/door opening potion. But typically it is done in the same room. King of Persia took it a notch up.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Researching the Repetition of Time

Post by atrueprincefanfrom18 »

Norbert wrote: January 20th, 2020, 3:27 am True. I'll update the collage after Newton's next on-topic video is live.
Yet on to-do? ;)
Norbert wrote: January 2nd, 2021, 4:07 pm [...] KingOfPersia announced it on the PoPUW forum (archive, b).
Both of the links point to same page. And isn't it possible to read the rest of the pages? I can only read 1st page, not the rest 4.
Norbert wrote: January 2nd, 2021, 4:07 pm Jalal would know which email address (and IP address) once belonged to KingOfPersia, but it's probably not enough to actually reach KingOfPersia.
Yup, definitely it's a difficult task, since Jalal doesn't seem active as well. Bringing two guys back is more difficult...
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: 5746
Joined: April 9th, 2009, 10:58 pm

Re: Researching the Repetition of Time

Post by Norbert »

atrueprincefanfrom18 wrote: January 3rd, 2021, 6:38 pm
Norbert wrote: January 20th, 2020, 3:27 am True. I'll update the collage after Newton's next on-topic video is live.
Yet on to-do? ;)
No, see: viewtopic.php?p=27774#p27774
atrueprincefanfrom18 wrote: January 3rd, 2021, 6:38 pm
Norbert wrote: January 2nd, 2021, 4:07 pm [...] KingOfPersia announced it on the PoPUW forum (archive, b).
Both of the links point to same page. And isn't it possible to read the rest of the pages? I can only read 1st page, not the rest 4.
Their URLs differ slightly. The same page, but parsed at different moments in time by the Internet Archive. Maybe one day, Jalal will find the time to do something with the full PoPUW forum archive, as he still planned in 2015.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Researching the Repetition of Time

Post by atrueprincefanfrom18 »

Norbert wrote: January 3rd, 2021, 8:39 pm Maybe one day, Jalal will find the time to do something with the full PoPUW forum archive, as he still planned in 2015.
Maybe drop him an email (of course, if you have the ID!)?
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: 5746
Joined: April 9th, 2009, 10:58 pm

Re: Researching the Repetition of Time

Post by Norbert »

atrueprincefanfrom18 wrote: January 4th, 2021, 1:27 pmMaybe drop him an email (of course, if you have the ID!)?
Every couple of years I've been reaching out to him. Per your suggestion I've done so again recently, and he and I have been emailing back and forth these last few weeks. The communication atmosphere has been jovial, so that's good. Unfortunately, in addition to a slight language barrier (with his English being, let's say, good but not excellent), I think there is a cultural barrier where I, as a Dutchman, am far more direct than he appears to be. It feels like I have to do a lot of reading between the lines. My impression is that he is surprisingly pessimistic about the chances of the PoPUW forum ever coming back online, regardless of whether this would be as a static archive or live forum, and regardless of whether he'd get my or anyone else's help. Again, I have to do a lot of reading between the lines, but I think he currently has no PHP functionality for his website, and I think he only wants the forum to return if it can be live and (inter)active, alongside the Princed forum, and then it would focus primarily on the newer PoP games, with the modding threads getting posts with links to where conversations continued on the Princed forum. Maybe it's primarily a hosting issue, that he cannot currently find affordable PHP hosting. I've written I'm willing to do literally all the work for him, and that we can first publicly announce what the plan is, in case he's hesitant or thinks maybe I'd use the archive differently than privately agreed. I'm not sure there's anything else I can do.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Researching the Repetition of Time

Post by atrueprincefanfrom18 »

Hmm, that's a great thing to do: bringing PoPUW back.

Well, to be honest, finding a good PHP host is not at all difficult. You can get it from IONOS, the cheapest hosting I have ever found. (Note: An affiliate link. I will get a small commission at no extra cost of anyone's). I even use it for my projects, and I guess even US $2/month or maximum US $5/month would be enough, as there aren't a lot of (active) people who will visit the website (at least as of now that I'm writing this post). You could also try web hosting which might reduce the cost, but I haven't yet tried that yet.

Apart from the costs, I guess you could perhaps create a overall general topics you covered from the conversation you had with him. Of course, only if you have the time and energy to do this big task. The reason is basically to keep the people updated on the task of bringing PoPUW back and also a backup, just in case the e-mails get deleted or something like that.

Or maybe you could just ask him in a straight-forward way of what you want or reply to him how you (or rather me too, if my capabilities support) can help him. (You might have done it already, but I don't know as I don't have any e-mail records I can check).
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
Post Reply