SDLPoP; David's open-source port of PoP

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; David's open-source port of PoP

Post by Norbert »

Maybe it's time for a new release, so non-devs can get access to the fixes and such?
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: SDLPoP; David's open-source port of PoP

Post by atrueprincefanfrom18 »

Norbert wrote: May 11th, 2021, 2:42 pm Maybe it's time for a new release, so non-devs can get access to the fixes and such?
I agree on this... I think there should be some minimum timeframe after which new version should be released. And this is will be fixed too, right?
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; David's open-source port of PoP

Post by David »

There are some new fixes which can be set only in config.h.
I was thinking if I should make some of them configurable without recompiling, before I make the release.

Specifically, the FIX_CAPED_PRINCE_SLIDING_THROUGH_GATE fix must be off for the glitch in Demo by Suave Prince to work.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: SDLPoP; David's open-source port of PoP

Post by atrueprincefanfrom18 »

There's also another difference in SDLPoP which differs from normal DOSBox execution.

Check this:

another_bug.p1r
(3.17 KiB) Downloaded 100 times

If you create the same room and run it in DOSBox the guard doesn't come forward. What's the catch?
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; David's open-source port of PoP

Post by David »

atrueprincefanfrom18 wrote: May 15th, 2021, 5:05 pm If you create the same room and run it in DOSBox the guard doesn't come forward. What's the catch?
This is the effect of FIX_DOORTOP_DISABLING_GUARD in config.h .
If I disable that then the guard doesn't come forward.

So it seems this fix is not perfect yet, because now guards can see through door tops...

Should I disable it entirely, or just make it configurable in the menu (disabled by default)?
Or fix it?

The problem is that when the prince is hanging, his coordinates (curr_col) point to the doortop, as if he was on its left side.
https://github.com/NagyD/SDLPoP/blob/2d ... 003.c#L661

I tried this fix:

Code: Select all

		left_pos = x_bump[Kid.curr_col + 5] + 7;
#ifdef FIX_DOORTOP_DISABLING_GUARD
		// When the kid is hanging on the right side of a doortop, Kid.curr_col points at the doortop tile and a guard on the left side will see the prince.
		// This fixes that.
		if (Kid.action == actions_2_hang_climb || Kid.action == actions_6_hang_straight) left_pos += 14;
#endif
		printf("Kid.curr_col = %d, Kid.action = %d\n", Kid.curr_col, Kid.action);
		right_pos = x_bump[Guard.curr_col + 5] + 7;
But then the guard still sees the prince when he falls through the doortop.
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: SDLPoP; David's open-source port of PoP

Post by David »

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

Re: SDLPoP; David's open-source port of PoP

Post by Norbert »

I'm not sure how interesting this is, but...
https://github.com/Xbox-Homebrew/SDLPoP
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: SDLPoP; David's open-source port of PoP

Post by Norbert »

Spanish article about SDLPoP:
https://www.neoteo.com/prince-of-persia-open-source/
(Generated 300+ incoming visits to PoPOT.)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: SDLPoP; David's open-source port of PoP

Post by Norbert »

I'm not sure, but I think fast-forwarding replays (with ~) is broken?
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: SDLPoP; David's open-source port of PoP

Post by atrueprincefanfrom18 »

Norbert wrote: August 4th, 2021, 3:43 pm I'm not sure, but I think fast-forwarding replays (with ~) is broken?
Umm, yes actually it is. I've faced the issue a lot of times and I guess it's something to do with music. Before the release, the music was not fast-forwarded and all was good. And I think maybe the music is the issue. I wanted to report the issue, but didn't find out exact issue.
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: SDLPoP; David's open-source port of PoP

Post by Norbert »

atrueprincefanfrom18 wrote: August 4th, 2021, 4:14 pm
Norbert wrote: August 4th, 2021, 3:43 pm I'm not sure, but I think fast-forwarding replays (with ~) is broken?
Umm, yes actually it is. I've faced the issue a lot of times and I guess it's something to do with music. Before the release, the music was not fast-forwarded and all was good. And I think maybe the music is the issue. I wanted to report the issue, but didn't find out exact issue.
For me, it's broken for Say HiJump, specifically.
Maybe you made a change to the code that impacts fast-forwarding?
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: SDLPoP; David's open-source port of PoP

Post by atrueprincefanfrom18 »

Norbert wrote: August 5th, 2021, 12:00 pm For me, it's broken for Say HiJump, specifically.
Maybe you made a change to the code that impacts fast-forwarding?
I didn't; maybe dmitrys did it.
But actually I had disabled the fast forwarding I don't know how you enabled it? Maybe you replaced the SDLPoP.ini file?
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: SDLPoP; David's open-source port of PoP

Post by Norbert »

atrueprincefanfrom18 wrote: August 5th, 2021, 1:58 pmBut actually I had disabled the fast forwarding [...]
Okay, that explains it then.
I indeed see you commented out
// #define USE_FAST_FORWARD
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: SDLPoP; David's open-source port of PoP

Post by David »

atrueprincefanfrom18 wrote: August 4th, 2021, 4:14 pm
Norbert wrote: August 4th, 2021, 3:43 pm I'm not sure, but I think fast-forwarding replays (with ~) is broken?
Umm, yes actually it is. I've faced the issue a lot of times and I guess it's something to do with music. Before the release, the music was not fast-forwarded and all was good. And I think maybe the music is the issue. I wanted to report the issue, but didn't find out exact issue.
It still works for me both with the latest release (1.22) and with the latest source in git.
Zukelik
Efendi
Efendi
Posts: 7
Joined: October 9th, 2021, 7:19 am

Re: SDLPoP; David's open-source port of PoP

Post by Zukelik »

I was wondering, why does SDLpop store everything in game directory? Most games store their saves, screenshots and so on in paths such as

Code: Select all

~/.config/sdlpop/screenshots/
or something. Also it seems to create QUICKSAVE.SAV and PRINCE.HOF in current directory, which is strange.

Does SDLpop have option to build it like a regular linux package, with executable in /usr/games/prince and all other static files in /usr/share/sdlpop and with all dynamic files in ~/.config/sdlpop or ~/.local/sdlpop or at least ~/.sdlpop, though modern programs mostly switched to use .config

Though, being able to download the source, then do just tar xf sdlpop*; cd src; make; cd ..; ./prince and being able to play is pretty neat.
Post Reply