SDLPoP v1.21 release

Open-source port of PoP that runs natively on Windows, Linux, etc.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: SDLPoP v1.21 release

Post by Norbert »

David wrote: November 29th, 2020, 5:41 pm
atrueprincefanfrom18 wrote: October 17th, 2020, 8:40 am ` - key which increases the speed of the game has a todo: after drinking a floaty potion the Kid can move very fast however the floaty effect stays longer because music is not at the speed of the game...
Fixed: https://github.com/NagyD/SDLPoP/commit/ ... c9f55b2173
I also added a few related compile-time options.
I'm curious how accurate is this fix. Is it frame-accurate? By that I mean, does the float effect end at the exact same frame as without speed-up? I saw the request/suggestion by atrueprincefanfrom18, and I thought it would be near-impossible to implement - and yet, you apparently pulled it off. My own solution would probably be way more basic, and involve figuring out the number of frames the original sound effect plays. One possible advantage of that route might be that if this total number of frames is then always used, it should work even with custom music.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1786
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: SDLPoP v1.21 release

Post by atrueprincefanfrom18 »

Norbert wrote: November 30th, 2020, 2:29 pm
David wrote: November 29th, 2020, 5:41 pm
atrueprincefanfrom18 wrote: October 17th, 2020, 8:40 am ` - key which increases the speed of the game has a todo: after drinking a floaty potion the Kid can move very fast however the floaty effect stays longer because music is not at the speed of the game...
Fixed: https://github.com/NagyD/SDLPoP/commit/ ... c9f55b2173
I also added a few related compile-time options.
I'm curious how accurate is this fix. Is it frame-accurate? By that I mean, does the float effect end at the exact same frame as without speed-up? I saw the request/suggestion by atrueprincefanfrom18, and I thought it would be near-impossible to implement - and yet, you apparently pulled it off.
Even I thought it would be a difficult to do this. If it could have been easy, David would have done it initially itself when the feature was developed.
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: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: SDLPoP v1.21 release

Post by David »

Norbert wrote: November 30th, 2020, 2:29 pm I'm curious how accurate is this fix. Is it frame-accurate? By that I mean, does the float effect end at the exact same frame as without speed-up?
Unfortunately it isn't.
I added some debug printouts where is_feather_fall is set to 1 or 0, and these were the results:

Without fast forward:
slow fall started at: rem_min = 60, rem_tick = 589
slow fall ended at: rem_min = 60, rem_tick = 414
Length of the slow fall: 589-414 = 175 ticks (frames)

With fast forward:
slow fall started at: rem_min = 59, rem_tick = 706
slow fall ended at: rem_min = 59, rem_tick = 464
Length of the slow fall: 706-464 = 242 ticks (frames)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: SDLPoP v1.21 release

Post by Norbert »

Unless I'm misunderstanding you, that is way off then... right?
(242-175)/12=about 6 seconds difference.
Probably better to at least also end slow fall at 175 ticks in fast-forward mode...
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: SDLPoP v1.21 release

Post by David »

Norbert wrote: December 20th, 2020, 7:29 pm Unless I'm misunderstanding you, that is way off then... right?
(242-175)/12=about 6 seconds difference.
Probably better to at least also end slow fall at 175 ticks in fast-forward mode...
I tested this again, and it turned out that part of this big difference is an artifact of how I tested.
Namely, in the 175 ticks case, the slow fall music was interrupted be the exit door opening.
(There is a fix for this bug, called FIX_FEATHER_INTERRUPTED_BY_LEVELDOOR.)

When I wrote my previous post, I tested it on the original level 7 in the following way:
For the non-fast-forward case, I grabbed the ledge, pressed Shift+W, released the ledge, fell down, then I opened the gate and ran right, opening the exit door.
For the fast-forward, I just let the prince fall down.


So now I tested it again, this time with the prince standing still.
(The lengths are off by one tick because of the way I made SDLPoP calculate them. See here: https://github.com/NagyD/SDLPoP/commit/ ... 8cfc03e0ce )

normally (without fast-forward):

Code: Select all

slow fall started at: rem_min = 60, rem_tick = 655
slow fall ended at: rem_min = 60, rem_tick = 430
length = 226 ticks

slow fall started at: rem_min = 60, rem_tick = 337
slow fall ended at: rem_min = 60, rem_tick = 113
length = 225 ticks

slow fall started at: rem_min = 53, rem_tick = 579
slow fall ended at: rem_min = 53, rem_tick = 355
length = 225 ticks

slow fall started at: rem_min = 53, rem_tick = 235
slow fall ended at: rem_min = 53, rem_tick = 10
length = 226 ticks
with fast-forward:

Code: Select all

slow fall started at: rem_min = 58, rem_tick = 509
slow fall ended at: rem_min = 58, rem_tick = 267
length = 243 ticks

slow fall started at: rem_min = 58, rem_tick = 66
slow fall ended at: rem_min = 57, rem_tick = 547
length = 239 ticks

slow fall started at: rem_min = 57, rem_tick = 342
slow fall ended at: rem_min = 57, rem_tick = 105
length = 238 ticks

slow fall started at: rem_min = 56, rem_tick = 603
slow fall ended at: rem_min = 56, rem_tick = 337
length = 267 ticks
Now the numbers are much less off, but they are still different.
Note how the length of the feather fall in fast-forward mode is quite variable, much more than in normal mode.


I have added a condition to stop the feather fall if it has been going on for more than 225 ticks: https://github.com/NagyD/SDLPoP/commit/ ... 6079deb39b


I remember there are some mods which make the feather fall longer, probably by replacing its music with something longer.
This change might break this feature of those mods.

However, I can't find any such mod.
I looked at Flying Prince, whose description says "Has special levels with a longer flying time, which is required to finish the levels.".
But the feather fall music doesn't seem longer, in fact all the sound files are the same as in the original v1.0 game!
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: SDLPoP v1.21 release

Post by Norbert »

David wrote: December 27th, 2020, 1:42 pmI have added a condition to stop the feather fall if it has been going on for more than 225 ticks: [...]
Nice.
David wrote: December 27th, 2020, 1:42 pmBut the feather fall music doesn't seem longer, in fact all the sound files are the same as in the original v1.0 game!
By the looks of it, its ZIP file contains files auto-added by Total Pack.
Probably I took the files from a Total Pack that for this 2007 mod didn't contain all the original files.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1786
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: SDLPoP v1.21 release

Post by atrueprincefanfrom18 »

David wrote: December 27th, 2020, 1:42 pm I remember there are some mods which make the feather fall longer, probably by replacing its music with something longer.
This change might break this feature of those mods.

However, I can't find any such mod.
I looked at Flying Prince, whose description says "Has special levels with a longer flying time, which is required to finish the levels.".
But the feather fall music doesn't seem longer, in fact all the sound files are the same as in the original v1.0 game!
There's this Hurry Up Prince mod. Does the changed code work as expected? Try Level 6 where you have to float from Room 6 to Room 16, I guess (check the comments).

P.S: Maybe if the loaded DAT files are not the original (are from mods folder), you could store the tick count (at which the feather fall should end) and then compare with the tick count instead of 225 as you did here? Don't really know if it's possible for SDLPoP to find out the tick count and how much time it might take or anything like that, but I think you could give it a try.
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: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: SDLPoP v1.21 release

Post by David »

Norbert wrote: December 27th, 2020, 2:28 pm
David wrote: December 27th, 2020, 1:42 pmBut the feather fall music doesn't seem longer, in fact all the sound files are the same as in the original v1.0 game!
By the looks of it, its ZIP file contains files auto-added by Total Pack.
Probably I took the files from a Total Pack that for this 2007 mod didn't contain all the original files.
Here is the original archive of Flying Prince from 2007.
All DAT files are equal to those in the PoPOT version of this mod.
Attachments
flyingprince.rar
(300.03 KiB) Downloaded 36 times
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: SDLPoP v1.21 release

Post by Norbert »

David wrote: December 29th, 2020, 2:02 pmHere is the original archive of Flying Prince from 2007.
All DAT files are equal to those in the PoPOT version of this mod.
Then maybe he simply meant that the prince flies longer (distance/time) than in the original game.
I'll point him to this thread via email, maybe he can chime in.
User avatar
mmitch5
Efendi
Efendi
Posts: 8
Joined: March 20th, 2009, 6:41 pm

Re: SDLPoP v1.21 release

Post by mmitch5 »

Hi,

This was 13 years ago from now but I can tell you that in one of my levelset called " flying prince " there is a long flight required to finish the level 7 or 8 from left up to down right and If you touch the duration of the prince being able to fly after drinking the flying potion you will not be able to finish the level .. I did not touch modify the time duration of the jump flight after drinking the potion as this was not really an option a that time.
I do not think this is very good idea as this will affect other levelset as well I guess
User avatar
yourantumayel69
Calif
Calif
Posts: 565
Joined: November 12th, 2019, 9:53 am
Location: Indonesia
Contact:

Re: SDLPoP v1.21 release

Post by yourantumayel69 »

mmitch5 wrote: December 31st, 2020, 1:15 am Hi,

This was 13 years ago from now but I can tell you that in one of my levelset called " flying prince " there is a long flight required to finish the level 7 or 8 from left up to down right and If you touch the duration of the prince being able to fly after drinking the flying potion you will not be able to finish the level .. I did not touch modify the time duration of the jump flight after drinking the potion as this was not really an option a that time.
I do not think this is very good idea as this will affect other levelset as well I guess
Hey, you're comeback😂🤣
Pengkhotbah 3:1 (TB) Untuk segala sesuatu ada masanya, untuk apa pun di bawah langit ada waktunya.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1786
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: SDLPoP v1.21 release

Post by atrueprincefanfrom18 »

yourantumayel69 wrote: December 31st, 2020, 3:34 pm Hey, you're comeback😂🤣
Many people might, if someone shoots them an email. ;)
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: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: SDLPoP v1.21 release

Post by David »

atrueprincefanfrom18 wrote: December 27th, 2020, 6:05 pm There's this Hurry Up Prince mod. Does the changed code work as expected? Try Level 6 where you have to float from Room 6 to Room 16, I guess (check the comments).
In SDLPoP the slow fall ends too soon.

In this mod the slow fall music is unchanged, instead the game itself has been made slightly faster.
SDLPoP cannot detect this change, which means that this mod (probably) didn't work properly in SDLPoP even before I added the 225 ticks limit.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1786
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: SDLPoP v1.21 release

Post by atrueprincefanfrom18 »

David wrote: January 3rd, 2021, 1:43 pm
atrueprincefanfrom18 wrote: December 27th, 2020, 6:05 pm There's this Hurry Up Prince mod. Does the changed code work as expected? Try Level 6 where you have to float from Room 6 to Room 16, I guess (check the comments).
In SDLPoP the slow fall ends too soon.

In this mod the slow fall music is unchanged, instead the game itself has been made slightly faster.
SDLPoP cannot detect this change, which means that this mod (probably) didn't work properly in SDLPoP even before I added the 225 ticks limit.
Oh, does SDLPoP also speed up the game as the numbers suggests in Apoplexy (F2 screen)?
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: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: SDLPoP v1.21 release

Post by David »

atrueprincefanfrom18 wrote: January 3rd, 2021, 2:20 pm Oh, does SDLPoP also speed up the game as the numbers suggests in Apoplexy (F2 screen)?
No it doesn't (yet).
Post Reply