Fluffy's Prince of Persia

Threads about other remakes and ports.
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Fluffy's Prince of Persia

Post by David »

FluffyQuack wrote: May 16th, 2025, 2:01 pm In related news, more debug output!!
The first screenshot has the prince and a guard back-to-back, just like the screenshot of a recent mod. :)
They are even roughly in the same place within the room.
FluffyQuack
Vizier
Vizier
Posts: 122
Joined: June 6th, 2004, 7:05 pm

Re: Fluffy's Prince of Persia

Post by FluffyQuack »

David wrote: May 17th, 2025, 12:25 pm The first screenshot has the prince and a guard back-to-back, just like the screenshot of a recent mod. :)
They are even roughly in the same place within the room.
It's a sign!!! Well, hopefully not a sign that my code should try to support original bugs to this extent...

I've gotten some more progress on the dynamic spawn system. My current plan is to finish almost everything that's needed for level 1 to play the exact same way as in the original POP2. The only exceptions being the music and the boat at the end, I'll do those later in the project.

Oh, another exception will be the colour cycling on the water. I'm still not completely sure how to handle palette stuff in my code. Either I load alternate versions of textures with different colours, or I load all textures as monochrome where the image data is palette indices and then I do the colours in shaders. Latter would be the "correct" way to do it, but it would require a huge rewrite of my graphics code.
FluffyQuack
Vizier
Vizier
Posts: 122
Joined: June 6th, 2004, 7:05 pm

Re: Fluffy's Prince of Persia

Post by FluffyQuack »

I'm still working on this here and there.

I spent hours on a bizarre problem I'm kind of annoyed I didn't figure out properly. My sword rendering was working completely fine for everything, except for the sword for guards running or jumping. I eventually figured out that the render offset from the sword frame array were correct, but the sword image index was off by one. It's so weird because everything else added up, and I could confirm the values are the same in memory when running the game on Xbox.

I ended writing this not-so-pretty hacky fix:

Code: Select all

	//"Guard run" sword frames:
	sword_tbl_pop2[88].id--; sword_tbl_pop2_shortSword[88].id--;
	sword_tbl_pop2[100].id--; sword_tbl_pop2_shortSword[100].id--;
	sword_tbl_pop2[86].id--; sword_tbl_pop2_shortSword[86].id--;
	sword_tbl_pop2[83].id--; sword_tbl_pop2_shortSword[83].id--;
	sword_tbl_pop2[80].id--; sword_tbl_pop2_shortSword[80].id--;
	sword_tbl_pop2[97].id--; sword_tbl_pop2_shortSword[97].id--;
	//"Guard start run" sword frames
	sword_tbl_pop2[77].id--; sword_tbl_pop2_shortSword[77].id--;
	sword_tbl_pop2[78].id--; sword_tbl_pop2_shortSword[78].id--;
	sword_tbl_pop2[79].id--; sword_tbl_pop2_shortSword[79].id--;
	sword_tbl_pop2[82].id--; sword_tbl_pop2_shortSword[82].id--;
	sword_tbl_pop2[85].id--; sword_tbl_pop2_shortSword[85].id--;
	sword_tbl_pop2[89].id--; sword_tbl_pop2_shortSword[89].id--;
	//"Guard running jump" sword frames
	sword_tbl_pop2[87].id--; sword_tbl_pop2_shortSword[87].id--;
	sword_tbl_pop2[92].id--; sword_tbl_pop2_shortSword[92].id--;
	sword_tbl_pop2[95].id--; sword_tbl_pop2_shortSword[95].id--;
	sword_tbl_pop2[91].id--; sword_tbl_pop2_shortSword[91].id--;
	sword_tbl_pop2[101].id--; sword_tbl_pop2_shortSword[101].id--;
	sword_tbl_pop2[98].id--; sword_tbl_pop2_shortSword[98].id--;
	sword_tbl_pop2[99].id--; sword_tbl_pop2_shortSword[99].id--;
	sword_tbl_pop2[81].id--; sword_tbl_pop2_shortSword[81].id--;
	sword_tbl_pop2[93].id--; sword_tbl_pop2_shortSword[93].id--;
	sword_tbl_pop2[96].id--; sword_tbl_pop2_shortSword[96].id--;
	sword_tbl_pop2[94].id--; sword_tbl_pop2_shortSword[94].id--;
	//"Guard end run" sword frames
	sword_tbl_pop2[90].id--; sword_tbl_pop2_shortSword[90].id--;
	sword_tbl_pop2[84].id--; sword_tbl_pop2_shortSword[84].id--;
Edit: Thinking about this, maybe this is related to a mismatch between the image IDs used by POP2 and the order I've got textures loaded in my project.

I'm still generally trying to finish what I need for everything in level 1 to be identical. I think this is a complete list of differences right now:
  • Enemies failing the jump on the screen that's 3 screens to the left (they also fail it in DOS v1.1 and the Xbox version, but my code fails in a different way).
  • Minor render glitch in the screen where a guard jumps down.
  • Render order glitches on many ledges.
  • Falling off the level is not handled correctly.
  • Don't have the "fall into foreground" death animation yet.
  • Boat does not behave as it should.
  • No water animation/colour cycling.
  • No music.
  • A few missing sound effects.
  • The hit effect when hitting enemies looks a bit off.
  • Enemies are using the wrong palette.
  • Combat is still at 12fps.
  • Lacking brief pause when switching screens.
Once I've implemented most of the above, then I'll release a new version.
Post Reply