Page 55 of 58

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

Posted: April 3rd, 2022, 3:45 pm
by David
Norbert wrote: April 1st, 2022, 3:29 pm Not a big bug, but I think maybe quicksave doesn't remember dead guards? I've not tested this at all. Either way, at 00:46:18 here, there's a dead guard, then after a partial level finish, quickload is used, and shortly thereafter the guard is alive again.
Let's see.
The guard dies at 45:56.
The player presses quicksave at 46:06.
We see the guard is still dead at 46:16.
Then he presses quickload at 46:22.
And we see the guard is alive again at 46:32.

Indeed, the guard should be dead.
I don't know why is this.

I did a quick test, although not with the level in the video.
For me, dead guard stays dead.

Maybe I try it with the level in the video as well...
(Micro Palace, level 11)

UPDATE: I tried it on that level. I even pressed quicksave where we see it in the video.
The guard stays dead for me after quickload.

EDIT: Attached the quicksave file.

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

Posted: April 3rd, 2022, 5:09 pm
by Norbert
I'm confused... is this post from Dmitry not on-topic here?

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

Posted: April 10th, 2022, 1:40 pm
by David
Norbert wrote: April 3rd, 2022, 5:09 pm I'm confused... is this post from Dmitry not on-topic here?
I think it belongs to that thread.
The link points to a commit on the "keep_fallen_guard" branch.

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

Posted: April 10th, 2022, 4:02 pm
by Norbert
David wrote: April 10th, 2022, 1:40 pm
Norbert wrote: April 3rd, 2022, 5:09 pm I'm confused... is this post from Dmitry not on-topic here?
I think it belongs to that thread.
The link points to a commit on the "keep_fallen_guard" branch.
But on the other hand, not only does Dmitry's text appear to be a reaction to my post, both its (non-standalone) phrasing and going into quick saving and loading, but the linked commit also includes summary text "Fixed a bug where dead fallen guards get saved as live guards". I'm still confused. I'm also guessing you have not fully read Dmitry's post, or you probably would have pointed to more than just the linked branch. Maybe Dmitry misunderstood my post because I coincidentally mentioned something very similar to what he was working on?

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

Posted: April 10th, 2022, 7:13 pm
by dmitry_s
That video showed a bug that I had in the original commit. Sorry for the confusion.

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

Posted: April 11th, 2022, 11:24 am
by Norbert
dmitry_s wrote: April 10th, 2022, 7:13 pm That video showed a bug that I had in the original commit. Sorry for the confusion.
The video by VelCheran, you mean?
So, he played with your SDLPoP fork?
Or your own video?
[Edit: Never mind, it's not important.]

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

Posted: April 30th, 2022, 3:56 pm
by VelCheran
Is this bug already known? Sometimes, when going to the next level, the kid loses his extra hit points.
As you can see in this video, I drink the extra life potion on level 7 but I only have three hit points in level 8.
https://www.twitch.tv/videos/1471154635?t=00h44m34s

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

Posted: May 1st, 2022, 2:54 am
by dmitry_s
Are you using Ctrl-A to speed up the exit sequence? If so, it tries to reload level 7 with previous hit points but the level number is already incremented so you end up on level 8.

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

Posted: May 1st, 2022, 10:59 pm
by VelCheran
Oh indeed! The original game has the same behaviour. Thanks, I'll keep that in mind next time.

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

Posted: July 6th, 2022, 8:39 am
by atrueprincefanfrom18
Can the teleports branch be merged into the main/master branch with an added enhancement flag perhaps?

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

Posted: July 31st, 2022, 10:32 am
by atrueprincefanfrom18
I wonder if there'll be a new release as it's been pretty long since last release.

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

Posted: September 25th, 2022, 11:56 pm
by FluffyQuack
Made a PR focusing on refactoring code to make it more readable: https://github.com/NagyD/SDLPoP/pull/290

You can let me know if I want too far with the changes, or if anything should be edited.

I might do even more refactoring like this. Since I'm writing my own engine for running Prince of Persia, I'm using SDL-PoP as a reference quite often, and while I'm doing that I can try to rename variables, replace magic numbers, or add comments where it's applicable. Maybe one day we'll have no variables called "var_2" anymore.

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

Posted: October 1st, 2022, 9:49 pm
by David
FluffyQuack wrote: September 25th, 2022, 11:56 pm Made a PR focusing on refactoring code to make it more readable: https://github.com/NagyD/SDLPoP/pull/290
I have merged it.
FluffyQuack wrote: September 25th, 2022, 11:56 pm I might do even more refactoring like this.
Feel free to!

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

Posted: October 4th, 2022, 3:26 pm
by FluffyQuack
David wrote: October 1st, 2022, 9:49 pm
FluffyQuack wrote: September 25th, 2022, 11:56 pm I might do even more refactoring like this.
Feel free to!
I made another PR but I may have gone a bit overboard: https://github.com/NagyD/SDLPoP/pull/291

It's basically a ton of small changes:
  • Renamed a bunch of var_# variables.
  • Removed vsync argument from a bunch of functions related to palette code as it wasn't used.
  • Removed all references to __pascal, near, and far as I assume the project isn't meant for a 16-bit compiler, and I think this improves readability quite a lot. While removing those, I tried to edit any pointers to have the * symbol after datatype rather than before variable name as I get the impression that's what's prefered in the codebase.
  • Moved a ton of variable declarations within functions to where they're first used. I think this improves readability, and also it might slightly improve optimization during compilation due to variables having a more limited scope.
If anything should be changed or removed, let me know.

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

Posted: October 9th, 2022, 1:00 pm
by David
FluffyQuack wrote: October 4th, 2022, 3:26 pm I made another PR but I may have gone a bit overboard: https://github.com/NagyD/SDLPoP/pull/291
I have merged it.

I made some further cleanups, I linked to the commits from my comment on the PR.