Checkpoint trigger (level3)

Discuss PoP1 for DOS here.
Post Reply
User avatar
jjur
Efendi
Efendi
Posts: 13
Joined: February 7th, 2015, 10:56 pm
Location: Slovakia
Contact:

Checkpoint trigger (level3)

Post by jjur »

I'm working on my first custom levels and I want use checkpoint special event from level 3 in level 12. I have edited prince.exe from web-based cuspop. Now i have problem find working trigger for this event.
http://www.popot.org/documentation/documents/2013-08-29_PoP1_Special_Events.pdf wrote: Level 3 has a checkpoint. If the player dies after having reached this point, he or she
will respawn ­ come back to life ­ at the checkpoint and doesn't have to restart the
level. The checkpoint is being activated when the player leaves room 7 to the left.
In my tests, player can leave room 7 to the up and checkpoint works (in original PoP1 level 3). And in my game, it not work in room 7.
http://www.popot.org/other_useful_tools.php?tool=CusPop wrote: Respawn room:

This is not the checkpoint trigger, only the room where you appear, the trigger is 'moving from room 7 to 2'
This not work too, In my game it sometimes works between 18 and 19 too.



See video from my level:

1:12 - Reached checkpoint, but how?

Room map:
19 _ _ _
18 12 14 (Start)
6 _ _ _

What i'm doing wrong?
David
The Prince of Persia
The Prince of Persia
Posts: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Checkpoint trigger (level3)

Post by David »

jjur wrote: In my tests, player can leave room 7 to the up and checkpoint works (in original PoP1 level 3). And in my game, it not work in room 7.
I could not reproduce that.
Could you please post your test level and prince.exe so I could see it myself?
jjur wrote: 1:12 - Reached checkpoint, but how?
I can see the following differences from the first two tries:
* (room 12) The false kid falls out of the room.
* (room 12) You break the loose floor next to the button.
* (room 19) You press the button, and the loose floors fall.
However, none of these seem to explain how/why you reached the checkpoint.

Again, I'd like to try it myself.

By the way, what does "Error504 in 75m" mean?
I think you changed the "%d MINUTES LEFT" message, but why "Error504"?
User avatar
jjur
Efendi
Efendi
Posts: 13
Joined: February 7th, 2015, 10:56 pm
Location: Slovakia
Contact:

Re: Checkpoint trigger (level3)

Post by jjur »

I don't have original levels from video. I have changed it :cry: .

There some similar versions:
prince.zip
(350.2 KiB) Downloaded 160 times
prince2.zip
(350.26 KiB) Downloaded 79 times
prince3.zip
(350.22 KiB) Downloaded 86 times


David wrote:By the way, what does "Error504 in 75m" mean?
I think you changed the "%d MINUTES LEFT" message, but why "Error504"?
Error 504 is as basic HTTP Error 504 (Gateway timeout) - http://www.checkupdown.com/status/E504.html
User avatar
jjur
Efendi
Efendi
Posts: 13
Joined: February 7th, 2015, 10:56 pm
Location: Slovakia
Contact:

Re: Checkpoint trigger (level3)

Post by jjur »

David wrote: * (room 19) You press the button, and the loose floors fall.
After next changes in level, i retry captured my checkpoint (video 0:00 - 0:21). It was after fight shadow vs. prince. Shadow press button and all loose titles fall. And after kill, I'm respawned.
I have made some changes (0:22) and now it work, see video:
David
The Prince of Persia
The Prince of Persia
Posts: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Checkpoint trigger (level3)

Post by David »

Wait, so now there are two checkpoints?

I looked into your levels, prince2.zip is the most similar to your first video.
I still don't know how to reproduce it.

However, I found some other bug:
If I want to start level 7 or 14 then the game crashes DOSBox.
I guess it's because you changed their cutscenes from none to something else.
User avatar
jjur
Efendi
Efendi
Posts: 13
Joined: February 7th, 2015, 10:56 pm
Location: Slovakia
Contact:

Re: Checkpoint trigger (level3)

Post by jjur »

Only one, but it is actived by falling all titles in any room. In old filese prince.zip prince2.zip prince3.zip is title 29 from room 15 changed into solid title.

Try my new final version -
prince.zip
(340.44 KiB) Downloaded 121 times
(cheat code is "error").
David wrote:However, I found some other bug:
If I want to start level 7 or 14 then the game crashes DOSBox.
I guess it's because you changed their cutscenes from none to something else.
Thanks, i restored cutscenes back to default values.
I'm using DosBox on linux and it doesn't crash.
David
The Prince of Persia
The Prince of Persia
Posts: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Checkpoint trigger (level3)

Post by David »

jjur wrote:Only one
Oh, I was confused by what I saw at 0:23 and 0:47.
But at 0:23, that room is directly after the cutscene, so it's the starting room.

I see a bug at 0:05-6: The kid is standing straight, but he is still holding the sword. :)
jjur wrote: but it is actived by falling all titles in any room. In old filese prince.zip prince2.zip prince3.zip is title 29 from room 15 changed into solid title.
Thanks for the information.

It's enough if the rightmost loose floor falls.
But I still don't know why does that activate the checkpoint.
You don't even have to use a button, it also works if you break that floor by jumping up below it.

Update:
I looked into the disassembly, and I think I found it:
The checkpoint flag is directly after the "redraw_frames_above" array.
This array is used for marking the redrawing of the tiles you see from the room above the current room.
The valid indexes of the array are from 0 to 9, but this loose floor sets "item 10", which is actually the checkpoint flag.

Code: Select all

data:4C64 ?? ?? ?? ?? ?? ?? ??+redraw_frames_above db 10 dup(?)
data:4C64 ?? ?? ??
data:4C6E ?? ??                checkpoint      dw ?
data:4C6E
An index overflow error in the "Lost in Errors" mod, how appropriate. :)
User avatar
jjur
Efendi
Efendi
Posts: 13
Joined: February 7th, 2015, 10:56 pm
Location: Slovakia
Contact:

Re: Checkpoint trigger (level3)

Post by jjur »

David wrote:I see a bug at 0:05-6: The kid is standing straight, but he is still holding the sword
Yes, i saw, it is also in original starting room. Problem is prince is frozen until somebody hit him.
David wrote: An index overflow error in the "Lost in Errors" mod, how appropriate. :)
In my levels you can see Trobs error and DRects error.
Trobs.png
DRect.png

(Turn on sounds)

You can see it in level 14.
Trobs error shows when all loose titles fall from above.
DRect error shows when all loose titles fall from above and prince is in down row.
After it screen rotate, prince is flashing and music is played.

In final version removed button in front of gate in starting room and fall only 9 titles.
David
The Prince of Persia
The Prince of Persia
Posts: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Checkpoint trigger (level3)

Post by David »

So your goal is to have as many errors as possible? :)
Both in the texts (Loading error, Lock error, Error504, Error no joystick), and actual errors (Trobs, DRects).
jjur wrote: DRect error shows when all loose titles fall from above and prince is in down row.
After it screen rotate, prince is flashing and music is played.
This is an index overflow, again.
The following variables are after drects:

Code: Select all

data:4D9A ?? ?? ?? ?? ?? ?? ??+drects          db 240 dup(?)
data:4E8A ?? ??                is_paused       dw ?
data:4E8C ?? ??                gate_top_y      dw ?
data:4E8E ?? ??                word_1FB6E      dw ?
data:4E90 ?? ??                united_with_shadow dw ?
data:4E92 ?? ??                upside_down     dw ?
data:4E94 ?? ?? ?? ??          sound_pointers  dd ?
The "effects" are caused by the overwriting of these variables:
united_with_shadow -> flashing, music
upside_down -> screen is flipped
Post Reply