Documentation (Prince of Persia 1 Special Events)

User avatar
SuavePrince
The Prince of Persia
The Prince of Persia
Posts: 1091
Joined: January 26th, 2015, 6:21 pm

Re: Documentation (Prince of Persia 1 Special Events)

Post by SuavePrince »

David wrote: You can (or other guy)enable this event in my level dat?
You don't need to enable it, it's already enabled.
SuavePrince wrote: but remmber,dont add raise or drop in room 24..
I don't understand this...[/quote]
This event is a secret,because is my new mod,dont want share video,my question is,why work this event only in my other level.dat
Need show you video in PM
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Documentation (Prince of Persia 1 Special Events)

Post by Norbert »

David wrote:what behavior?
See my post here.
The top portion of that post mentions the event.
The bottom portion is me trying to explain what's happening in SuavePrince's (unreleased) mod.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Documentation (Prince of Persia 1 Special Events)

Post by Norbert »

Just a note for myself (or whoever), for a future version of this document: see this post.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Documentation (Prince of Persia 1 Special Events)

Post by Norbert »

Small addition for section 9.1 ("Falling Tiles").
If there is no room above room 16 or 23, then tiles in the bottom row will be triggered instead. The tile effects this triggers are the same as what would normally happen above the room, e.g. spikes come out, gates open instantly, etc. Loose tiles are a little different: they make noise and disappear, but visually they remain stuck halfway their animation until the prince re-enters the room.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Documentation (Prince of Persia 1 Special Events)

Post by David »

Norbert wrote:Small addition for section 9.1 ("Falling Tiles").
That's check_fall_flo() in SDLPoP.
Norbert wrote:If there is no room above room 16 or 23, then tiles in the bottom row will be triggered instead.
That's because the game tries to use room 0, but get_room_address() keeps using the last used room in that case.
Norbert wrote:Loose tiles are a little different: they make noise and disappear, but visually they remain stuck halfway their animation until the prince re-enters the room.
The rest of the game uses room 0, that's why those loose floors won't land anywhere.
And I think that's why their original place doesn't get redrawn until you reenter the room (or use Shift+B).

They will appear falling near the top of the screen, but only if there is some room below the current room.
draw_mob() shows why this happens: room is 0, and room == room_B has to be false (a room is below) but room == room_A has to be true (no room is above).

Also, in some mods I saw some loose floors that fell into room 0 flashing in other rooms. Maybe that's why.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Documentation (Prince of Persia 1 Special Events)

Post by Norbert »

Something else that could be modified, in 8.3 Tiles Appear, as implemented in Mysterious Castle by Aram: where it says "merged with the shadow" it should say something like "merged at least once with a shadow somewhere in the level".
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Documentation (Prince of Persia 1 Special Events)

Post by Norbert »

Three more things to add:
- In "9.3 Jaffar's Death", add to the screen flashes text that the flash color is "white".
- Add a "1.3 Sword Pickup", that mentions the screen flashes yellow.
- In "1.2 Tile Activation", add that the insta-closing of the gate can be heard in all rooms.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Documentation (Prince of Persia 1 Special Events)

Post by David »

Norbert wrote: March 18th, 2018, 1:03 am - Add a "1.3 Sword Pickup", that mentions the screen flashes yellow.
I don't think that is a special event, since you can put a sword on any level with a level editor.
Norbert wrote: March 18th, 2018, 1:03 am - In "1.2 Tile Activation", add that the insta-closing of the gate can be heard in all rooms.
This is not special either, the insta-closing (by a drop button) can always be heard in every room.
The same is true for opening.
It's only the slow closing of gates that can't be heard if the gate is not visible. Well, except as described in 2.1.

By the way, if there will be a next version of the document, you could add empty chapters about the levels that don't have special events, so the level numbers will match the chapter numbers.
Just like you did with PoP1 for SNES Special Events and PoP2 Special Events.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Documentation (Prince of Persia 1 Special Events)

Post by Norbert »

Good points.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Documentation (Prince of Persia 1 Special Events)

Post by David »

David wrote: July 13th, 2012, 1:25 pm After Jaffar died, entering any room from the right will trigger the top left tile of room 24. On the original level, this opens the exit door.
I figured out yesterday that the Apple II original does this differently.
There, the exit opens immediately when Jaffar died.
Here is it in the Apple II source: https://github.com/jmechner/Prince-of-P ... BS.S#L1738
The "exit room to the left" events are here: https://github.com/jmechner/Prince-of-P ... TO.S#L1550

The NES version does the same as the Apple II version.
(It even displays "EXIT OPENED".)

The Genesis version does the same as the DOS version, but it differs from DOS in some other respects.
For example, on level 12, there is no sword that the shadow would take.
Also, the shadow has no hit points: if you hurt him, it will simply take one HP from the prince.

(Maybe I should move this post to a new topic?)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Documentation (Prince of Persia 1 Special Events)

Post by Norbert »

David wrote: April 8th, 2018, 10:36 amI figured out yesterday that the Apple II original does this differently.
There, the exit opens immediately when Jaffar died.
I also figured this out not too long ago.
After posting this, then reading his reply and checking the GitHub issue (which didn't seem to mention what I'd brought up), and finally checking what actually happens in the Apple II version.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Documentation (Prince of Persia 1 Special Events)

Post by Norbert »

The Macintosh version appears to have one or more additional checks when it comes to whether the mouse appears in level 8. I haven't done any extensive testing yet (I may when the editor is ready), but just the level exit door being open and then staying in the mouse-room for a long time isn't enough.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Documentation (Prince of Persia 1 Special Events)

Post by David »

Norbert wrote: August 11th, 2018, 8:01 pm The Macintosh version appears to have one or more additional checks when it comes to whether the mouse appears in level 8. I haven't done any extensive testing yet (I may when the editor is ready), but just the level exit door being open and then staying in the mouse-room for a long time isn't enough.
That's odd.
I played this version some time ago, I'm sure that on the original level 8 that is enough for the mouse to appear.
Did you change something on the level?

Here is the relevant part of the disassembly of PoP1 Mac.
I don't see any difference when compared to the DOS version.

Code: Select all

03:16e6: 0c 6d 00 08 a9 0c        CMP.W  #0x0008,(D_A90C,A5) ; current level
03:16ec: 66 1e                    BNE    B_170C
03:16ee: 0c 2d 00 10 b9 4f        CMP.B  #0x0010,(D_B94F,A5) ; Char.room
03:16f4: 66 16                    BNE    B_170C
 ; special event: level 8 room 16 mouse
03:16f6: 4a 6d ba 3c              TST.W  (D_BA3C,A5) ; exit open
03:16fa: 67 10                    BEQ    B_170C
03:16fc: 52 6d ba 3c              ADDQ.W #1,(D_BA3C,A5) ; exit open
03:1700: 0c 6d 00 96 ba 3c        CMP.W  #0x0096,(D_BA3C,A5) ; exit open
03:1706: 66 04                    BNE    B_170C
03:1708: 4e ba 03 3c              JSR    (D_033C,PC) ; = 03:1A46 ; do mouse
03:170c: 4e 75                    RTS
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Documentation (Prince of Persia 1 Special Events)

Post by Norbert »

David wrote: August 12th, 2018, 3:55 pmDid you change something on the level?
Yes, but with these changes the DOS version works and the Macintosh version does not.

Maybe TPC is the problem. I've been unable to use TPC to get to levels 5+, by the way. No idea if it even has that implemented.

Anyway, in about 6-7 weeks, I'll post again in this thread to describe which exact level changes I made.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Documentation (Prince of Persia 1 Special Events)

Post by David »

Norbert wrote: August 12th, 2018, 6:30 pm Yes, but with these changes the DOS version works and the Macintosh version does not.
That is odd.
One thing I can think of is that if there is no room on the right side of the mouse room then the mouse is erased in the Mac version, since the mouse would start in that nonexistent room.
I haven't tried this, though.
Norbert wrote: August 12th, 2018, 6:30 pm Anyway, in about 6-7 weeks, I'll post again in this thread to describe which exact level changes I made.
I guess I should wait until then.
Norbert wrote: August 12th, 2018, 6:30 pm Maybe TPC is the problem. I've been unable to use TPC to get to levels 5+, by the way. No idea if it even has that implemented.
It's a demo version. Probably all functions work in the full version, but I don't know if it's available anywhere...

You could try the "Prince of Persia Editor", which is a savegame editor, from here.
You could make a savegame for each level or something.
Post Reply