David's Levels

Post Reply
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5786
Joined: April 9th, 2009, 10:58 pm

David's Levels

Post by Norbert »

[Edit: Basically this entire post has been updated.]

Download links for David's Levels can be found further down in this thread.
(Jakim mentioned this mod when he posted videos about it.)
I didn't know about this mod. I've just started playing it and, so far, I like it.

David, can you explain how level 3 works, one event changes another event... but how?
And level 5, how do the tiles fall somewhere else? And, is it possible to obtain the LP there?
Was this five-level mod ever officially released? May I add it to popot.org?
Last edited by Norbert on June 13th, 2013, 12:57 pm, edited 1 time in total.
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: David's Levels

Post by David »

Norbert wrote: David, can you explain how level 3 works, one event changes another event... but how?
As HTamas explained on PoPuw:
htamas wrote:When you drop that loose tile, it falls down to "room 26", according to the links table. While that room doesn't really exist, it corresponds to byte 0+26*30 for the walls and 720+26*30 for the background (if the level file is loaded contiguously into memory, which I assume). The fictive tile to which the loose tile falls changes to debris, which changes the file (loaded in memory) in such a way that the trigger opens a different door.
That is, the tiles of "room 26" are actually the modifiers of room 2 (that has the button). The loose floor changes the tile/modifier from 0x01 (floor) to 0x0E (debris).
(Further rooms would mean further sections of the level data... Hmm...)
Norbert wrote: And level 5, how do the tiles fall somewhere else?
Because of irregular room linking. The room above you has the loose floors, but the room below the loose floors is not where you are, but a room with buttons.
Norbert wrote: And, is it possible to obtain the LP there?
No. It's there only for the shadow. :)
Actually, you can get to the door in the potion room: If you climb up onto one of the loose floors, you'll fall into the room with buttons. If you go right, you'll get to the door, but it will be closed.
Norbert wrote: Was this five-level mod ever officially released?
It was on PoPuw. (Titled Four new levels.) Actually there was a newer version, with levels 1-6 and the demo level changed. I attached it to this post.
Norbert wrote: May I add it to popot.org?
Yes, but please use the attached version.

Hey, I found a bug in PoP!
If you press Shift-L at the sword, the kid will pick the sword up, but the screen will change to the princess's room, and the yellow flash will appear there!
Attachments
David's levels.zip
(7.62 KiB) Downloaded 192 times
User avatar
musa
Vizier
Vizier
Posts: 112
Joined: March 27th, 2011, 2:06 pm
Location: Nairobi, Kenya

Re: David's Levels

Post by musa »

David wrote: Hey, I found a bug in PoP!
If you press Shift-L at the sword, the kid will pick the sword up, but the screen will change to the princess's room, and the yellow flash will appear there!
Which version does is the bug in?
-- Michael, the boy who makes Shaw's Nightmare.
Visit here to download Shaw's Nightmare: http://shawsnightmare.ucoz.com
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5786
Joined: April 9th, 2009, 10:58 pm

Re: David's Levels

Post by Norbert »

David, thanks for the explanation.
David wrote:(Further rooms would mean further sections of the level data... Hmm...)
:mrgreen:
David wrote:
Norbert wrote: And, is it possible to obtain the LP there?
No. It's there only for the shadow. :)
Tiny missed opportunity, since you were so close to making it possible. :)
David wrote:
Norbert wrote: May I add it to popot.org?
Yes, but please use the attached version.
Thanks, I've added it here.
musa wrote:
David wrote: Hey, I found a bug in PoP!
If you press Shift-L at the sword, the kid will pick the sword up, but the screen will change to the princess's room, and the yellow flash will appear there!
Which version does is the bug in?
The version probably doesn't matter.
You need to wait a tad between pressing down Shift and hitting l:

David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: David's Levels

Post by David »

(from the chat)
Norbert wrote:interesting, level 3 of David's mod crashes apoplexy
I just tried it, but it doesn't. (At least on Windows. Perhaps memory is allocated differently? Exactly which statement crashes the editor?)
However, the pillars next to the button show up as question marks, and room 26 is full of question marks.
Also, when I save the level, it becomes unplayable.
(I don't think these bugs need to be fixed, because there are not much levels that use this trick. - In fact I don't know any other!)
Jakim wrote:It could be used as anti-edit "feature".
However, RoomShaker says: "Corrupt Levels File! Unable to load level!"
It also can't open level 2 (because of the irregular links), but it can open level 5 (which also has irregular links - and clicking the arrows in room-edit mode follows the irregular links correctly).
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5786
Joined: April 9th, 2009, 10:58 pm

Re: David's Levels

Post by Norbert »

David wrote:(from the chat)
Norbert wrote:interesting, level 3 of David's mod crashes apoplexy
I just tried it, but it doesn't. (At least on Windows. Perhaps memory is allocated differently? Exactly which statement crashes the editor?)
On GNU/Linux it first crashes on...
CheckSides (iRoom=26, iX=-1, iY=1)
...when loading the level, and (when I code a workaround) then on...
ShowImage (iThing=1, iModifier=208462408, screen=0x9a658b0, iLocation=1, iFromImageX=0, iFromImageY=0, iFromImageWidth=120, iFromImageHeight=155)
...when loading room 26. (The level itself loads though. Saving level 3 doesn't make the level unplayable/unfinishable.)
I may look into it further at some point, but as you write it's not a priority/not really necessary.
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: David's Levels

Post by David »

David wrote:Actually there was a newer version, with levels 1-6 and the demo level changed. I attached it to this post.
Hey, wait, that newer version *is* in the Total Pack. It's called "david's 6 levles.dat" (sic).
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5786
Joined: April 9th, 2009, 10:58 pm

Re: David's Levels

Post by Norbert »

David wrote:Hey, wait, that newer version *is* in the Total Pack. It's called "david's 6 levles.dat" (sic).
Yeah, it is in Total Pack v2.06, but it's not in the drop-down list on the Setup tab.
It doesn't have its own number, so one needs to pick "xx: Custom Games..." and then select the DAT file from the Custom Games Setup tab.
Now I'm curious if there are any other DAT files there from mods that aren't yet on popot.org.
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: David's Levels

Post by David »

I was thinking... Was this the first mod where a close button opens the exit on some levels?

What I know is that I got the idea from RoomShaker's help:
"Exit doors cannot be closed after they have been opened."
So I tried what happens instead...
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5786
Joined: April 9th, 2009, 10:58 pm

Re: David's Levels

Post by Norbert »

David wrote:I was thinking... Was this the first mod where a close button opens the exit on some levels?
No, it's not.

I did a rough check by modifying apoplexy and running a script.

This is what I added to the end of LoadLevel():

Code: Select all

  int iRoom, iTile, iThing, iEvent;
  for (iRoom = 1; iRoom <= iRooms; iRoom++)
  {
    for (iTile = 0; iTile <= 29; iTile++)
    {
      iThing = iThingA[iRoom][iTile];
      if ((iThing == 6) || (iThing == 38)) /*** drop ***/
      {
        iEvent = iModifierA[iRoom][iTile][1] - 1;
        do {
          iEvent++;
          iThing = iThingA[EventInfo (iEvent, 1)][EventInfo (iEvent, 2) - 1];
          if ((iThing == 16) || (iThing == 48)) /*** level door, left ***/
          {
            printf ("[BINGO] Drop button raises level door: level %i, room %i,"
              " tile %i!\n", iLevel, iRoom, iTile + 1);
          }
        } while (EventInfo (iEvent, 3) == 1);
      }
    }
  }
And this is what I put in the script:

Code: Select all

#!/bin/bash
COUNTER=2
while [ $COUNTER -lt 162 ]; do
  NUMBER=$(printf "%07d" $COUNTER)
  echo Testing mod $NUMBER...
  UNZIP=/media/norbert/hd/www/popot/custom_levels/software/$NUMBER.zip
  rm -rf prince
  unzip -q $UNZIP
  mv -i $NUMBER prince
  ./apoplexy -x | grep BINGO
  let COUNTER=COUNTER+1
done
This isn't perfect, because it doesn't work if the mod uses a filename other than LEVELS.DAT, and it includes rooms that aren't in use.
However, it's enough for me to answer your question.
Because your mod is from 2007, and for example the 2005(*) mod KX - Out of Time opens a level door with a drop button in level 6.
Repetition of Time, which is from 2006 also does it in some places, including in level 11.
Kid of Persia, 2007, does this in level 5, where one drop button first drops a gate and then opens a level door.
Most likely there are other cases, but I didn't look into it further since I could already answer your question.
(*) Its title screen even copyrights it 2004.

[Edit: In fact, even the 2nd oldest mod known to us, Super Prince of Persia from 1995, gives a hit: "[BINGO] Drop button raises level door: level 11, room 13, tile 8!"]
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: David's Levels

Post by David »

Thank you!
I played some of those mods some time ago, but I never reached the mentioned levels.
Norbert wrote:I did a rough check by modifying apoplexy and running a script.
Now that's an interesting method!
Post Reply