Page 1 of 1

PoP remakes on GitHub

Posted: December 20th, 2015, 9:10 pm
by David
I found this some time ago:
https://github.com/deckard93/Prince-of-Persia
It uses DirectX.
I could compile it, but I had to change a few things for that.

Strange... It does not appear in the search results now.

I found this now:
https://github.com/oitofelix/freepop
I did not try this yet.

Re: PoP remakes on GitHub

Posted: December 20th, 2015, 9:17 pm
by Andrew
How about leaving a comment or sending a PM (if allowed on GitHub) to both? Maybe they'll be interested in contributing to SDLPoP in some way, or at least be introduced to our community here if they don't know about it yet.
David wrote:I could compile it, but I had to change a few things for that.
So it's a full reimplementation of the engine? Since you compiled it, how well does it work so far?

Re: PoP remakes on GitHub

Posted: December 20th, 2015, 9:47 pm
by Norbert
David wrote:I found this now:
https://github.com/oitofelix/freepop
I did not try this yet.
This one uses Allegro.
I installed some packages (liballegro5-dev liballegro-image5-dev liballegro-audio5-dev liballegro-acodec5-dev).
And changed six lines with asprintf (...); to if (asprintf (...) < 0) {} (one in kernel/video.c, five in engine/level.c).
After that I could compile it with a simple "make".
It seems to use resources that have been extracted with PR.
I does not seem to be a conversion using the full disassembly; the prince's movement (is not bad, but) feels too far from the original for this.
Includes some custom tiles, like a big blue potion that causes instant death.
In prince.c, uncomment play_title(); and play_level_1(); to test the intro and level 1.
A bunch of stuff works (gates open, drinking potions, chompers, loose tiles), other stuff doesn't (no guards, no level exit door).
It uses OGG files for music.
Overall it's definitely one of the better remakes out there, but it cannot compete with SDLPoP.
(Not that it's a competition, but to give you an idea of the quality.)

Re: PoP remakes on GitHub

Posted: December 21st, 2015, 9:14 pm
by David
EDIT: This post is about: https://github.com/oitofelix/freepop

I tried it now. (with Dev-C++ 5.11)

I had to add -D"NOMINMAX" to disable the min/max macros from stdlib.h.
Without this, the compiler will stop here: int max (int a, int b); even though there is a space before "(".

Then I defined a dummy error() because it is called but not defined.
Then I deleted "inline" before the declarations of pos() and lpos().

Now it compiled.

Something is still wrong because the window is all black.
But there are sounds and a red flash when the prince falls.

Re: PoP remakes on GitHub

Posted: December 22nd, 2015, 5:12 pm
by David
https://github.com/oitofelix/freepop
David wrote:Something is still wrong because the window is all black.
I figured out that the images are loaded all black (transparent?), but their size is correct.
This line at least made things visible as semi-transparent grey rectangles: (added to load_bitmap)

Code: Select all

memset(bitmap->memory, 0x80, bitmap->h * bitmap->pitch);
https://github.com/deckard93/Prince-of-Persia
Andrew wrote:So it's a full reimplementation of the engine? Since you compiled it, how well does it work so far?
Here is the compiled version with the changed source.
I didn't include the data files, you can get them from the original.

Re: PoP remakes on GitHub

Posted: December 22nd, 2015, 7:39 pm
by David
https://github.com/oitofelix/freepop

I could finally make it work!
I have to lock and then unlock the image after it's loaded: (in load_bitmap)

Code: Select all

  al_lock_bitmap(bitmap, al_get_bitmap_format(bitmap), ALLEGRO_LOCK_READWRITE);
  al_unlock_bitmap(bitmap);
I wonder why is this necessary...

keys:

Code: Select all

arrows, shift: as in the original
ctrl = draw sword
A = toggle between prince and shadow
S = sound on/off
delete, page down = adjust kid's X position + debug info
enter = debug info
I = display flip (none,V,H,V+H)
H,J,U,N = move between rooms
C = display room numbers
V = version?
B = toggle blind mode
home = switch to kid's room
F11 = toggle dungeon/palace
esc = pause
P = un-pause
A,D,W,S = move a blue pixel + debug info (disabled)
The consistency-level is interesting:
It's generated randomly, then it's "fixed", i.e. the code (consistency.c) searches for things it "does not like", and changes them.
(Think of the "search errors" feature in RoomShaker.)

Re: PoP remakes on GitHub

Posted: January 27th, 2016, 5:51 am
by poirot
Consistency.c would be very useful for the sanitation command in the editor of SDLPoP

Re: PoP remakes on GitHub

Posted: June 29th, 2017, 2:32 pm
by David
I searched for Prince of Persia on GitHub again.
Here are some of the results:

https://github.com/michaelDCurran/princ ... tAdventure (Python 2)
This is quite an interesting remake: PoP as a text adventure.
I found the idea kind of funny. :)
It's somewhat like playing in blind mode.
Luckily the levels are the original, so you can play from memory. :)
(It has all the levels from PoP1 DOS in the original format.)

I got stuck on level 2 where you have to jump over a 3 tiles wide chasm.
That jump is not possible in this remake.

https://github.com/InformaticAA/PrinceOfPersia (Java, Eclipse)
This one is quite good.
It even has a "versus" mode, where two people can play against each other.

I can't open the exit at the end of level 1.
It seems it does not even have level 2.

The readme says it was made as a project at the University of Zaragoza (Spain).