[FreePrince] Why FreePrince don't get updated.

Threads about other remakes and ports.

Moderator: English Moderator Team

User avatar
mickey96
Beylerbey
Beylerbey
Posts: 70
Joined: November 29th, 2008, 2:19 pm
Location: Nairobi, Kenya
Contact:

[FreePrince] Why FreePrince don't get updated.

Post by mickey96 » April 25th, 2009, 1:26 pm

How come FreePrince don't get released for a long time?
Refueled my car! Now I can keep going!

BlackChar
Sheikh
Sheikh
Posts: 24
Joined: November 18th, 2008, 3:26 am
Location: Prague, Czech Republic
Contact:

Re: Why FreePrince don't get updated.

Post by BlackChar » April 28th, 2009, 12:35 pm

My guess would be there's not much time to work on it. Just like everything these days. But if you have some skill (or know someone who has), I'd be glad to see it alive as well :)

User avatar
poirot
Princed Developer
Princed Developer
Posts: 382
Joined: March 24th, 2003, 8:52 pm
Location: Ushuaia, Argentina
Contact:

Re: Why FreePrince don't get updated.

Post by poirot » May 15th, 2009, 1:39 am

Me too

OrSpeeder
Sheikh
Sheikh
Posts: 49
Joined: July 24th, 2005, 8:05 pm
Location: Valinhos

Re: Why FreePrince don't get updated.

Post by OrSpeeder » July 25th, 2009, 6:37 am

I think that the last people to work on FP was me and poirot (I made some stupid fixes to make it compile on MingW...)

But after that we both got some stuff on university :P

I am still doing university...

Btw: The problems that I fixed on FP still haunts me on my own projects... It is a stupid issue that in each platform (Windows, Mac, Linux...) someone made a idiotic #define that screws something somewhere...

User avatar
poirot
Princed Developer
Princed Developer
Posts: 382
Joined: March 24th, 2003, 8:52 pm
Location: Ushuaia, Argentina
Contact:

Re: Why FreePrince don't get updated.

Post by poirot » July 29th, 2009, 8:42 am

God... I miss that times spent in front of my vim coding FP... ( :roll: for nostalgy)

rata
Scholar Scribe
Scholar Scribe
Posts: 1
Joined: December 4th, 2004, 8:00 pm

Re: Why FreePrince don't get updated.

Post by rata » December 10th, 2009, 4:38 am

I was talking to poirot this week on IRC. We will probably make some meeting in January/February 2010 (holidays here in Argentina) to start working on it again (I have some finals exams pending, but I really hope I can make some time to this =)

But also, contributors are always welcome! =)

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

Re: Why FreePrince don't get updated.

Post by Norbert » April 27th, 2011, 6:18 pm

(Gravedigging this thread instead of starting a new one, because this post is 100% on-topic and this thread is still relevant.)

FreePrince hasn't been updated for over 3 years. That's a real shame, because it would be very cool to have a fully functional executable. It would allow us to change the game in many new ways, and add all kinds of things to it. (For example: replace the sword with a gun, press down to dodge enemy bullets, and so on.) The problem is that 99% of the coding was probably done by poirot and it doesn't look like he'll ever continue developing FreePrince. There are so many other things he's already doing in his life (being a consultant, teacher, researcher, and so on). I also doubt anyone else will ever really continue developing FreePrince, because it's a lot of work to figure out and fully understand someone else's code.

So, I'm wondering... how to continue from where we are now? Could it be useful to look into Google Summer of Code? Google is into HTML5 (because it's new technology and because of their Chrome browser), maybe they would support the creation of an HTML5 version of PoP1 that uses the DOS DAT files? Surely they must have some folks there that remember ye goode olde PoP1. And they already support at least one gaming project: the Battle for Wesnoth has recently been accepted into Summer of Code 2011. We could contact Jordan Mechner, maybe he's willing to personally support our application to Google next year (in 2012). If poirot would be willing to mentor the partaking students; I would be willing to help out, maybe other coders in our community as well. The students might be able to save time by looking at the FreePrince code.

User avatar
poirot
Princed Developer
Princed Developer
Posts: 382
Joined: March 24th, 2003, 8:52 pm
Location: Ushuaia, Argentina
Contact:

Re: Why FreePrince don't get updated.

Post by poirot » April 28th, 2011, 1:58 am

That would be awesome! Count me in!

lignux
Efendi
Efendi
Posts: 15
Joined: February 8th, 2011, 2:31 pm

Re: Why FreePrince don't get updated.

Post by lignux » May 1st, 2011, 5:17 pm

Hi,

This sounds fantastic! But why should the game written in HTML 5? I think it's easier to improve the Freeprince-Code than make a entire new project.

Best Regards, Lignux.
Former i was known as floppy – a bug in this forum made that I can't login.

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

Re: Why FreePrince don't get updated.

Post by Norbert » July 9th, 2014, 6:49 pm

Norbert wrote:maybe [Google] would support the creation of an HTML5 version of PoP1 that uses the DOS DAT files
So, I never contacted Google about this.
The reason is that I used to be excited about (the <canvas> element of) HTML5, but the excitement subsided.
Of course, everyone is free to contact Google or Mechner about this.
Anyways...

I'm looking for feedback on the following.

I've been thinking about bringing PoP1 for DOS natively to modern platforms. Several people have started working on such ports, but nobody has gotten very far. David's room-drawing code is impressive, but I think a modern port would move away from using the old DAT files. I think several ports that have been in the works were too Windows-centric. A modern port would be cross-platform. It would probably use a gaming engine or multimedia library. We would like it to be open source and free software, although the question is how Ubisoft would react. I don't think the situation would be very different if only custom tile graphics would be used. Could it be zlib licensed or GPL'ed (2 or 3). It would be more of an "enhanced port" than a regular "port", given the extra features that could and probably would be added. Should it be named FreePrince. Would it be wise to put it up on GitHub, from the start or at some point. How about the old tricks (glitches), should they still be present; would be lots of work to implement. Will Mechner release a remake or port in three months, when it's PoP's 25-year anniversary.

I could use the SDL library. I could use C. C++ isn't necessary and would only make things unreadable for me. Would it be a collaborative project and, if so, who would be interested to partake. How would people work together, who could do what. In theory I could do the whole thing myself. I may not be able to get the fighting with guards exactly right; might be tricky. Why work on this; it could be a fun process and it would be possible to add multiplayer support (vaguely see the other player's tiles if they are different, like a fallen loose tile). Why not work on this; it would be lots of work and DOSBox works fine on many platforms.

On the Princed Forum, the "FreePrince" sub-board could be renamed to "PoP1 for DOS Remakes" or something. The threads about other remakes could then be moved there (PoP Unity, Arabian Nights 2D, PoP Dot Net, Prince of Persia 2D). The word "FreePrince" could be added to some of the threads about FreePrince, so it's clear what they are about.

What about the tile sizes. The original game was 320x200, with a 320x8 black bar (hitpoints, level number) at the bottom and 320x3 of the upper room at the top. This leaves 320x189 for 10x3 tiles, which is 32x63 per tile. However, both horizontally and vertically tiles are (partially) placed on top of each other. The maximum tile size appears to be 64x83, for the palace balcony. We'd want to double size everything, to give modders more to work with. This means that all tiles would be equally sized at 128x166, regardless their content. Their backgrounds transparent. Each with one foreground and one background layer, to allow objects (like the prince) to pass through them. This means (72 x 4 =) 288 images, with full-color palettes. No reason to separately implement CGA (Color Graphics Adapter) and EGA (Enhanced Graphics Adapter) graphics. I would later change apoplexy to use two-layered tiles, plus when using the default images it would add a third, toggle-able, layer with the green outlines and markings (loose tile, stuck chompers, and so on). Then the enhanced port and apoplexy could share (custom) graphics.

Audio: basically change everything to an easier format. OGG (or MP3, FLAC) instead of MID, maybe also instead of WAV. Or stick with WAV for sound effects, but standardize all those to 44100Hz, 16bit, stereo.

What would be difficult, what easy. Properly displaying the tiles would be easy. Getting the thing to run at 12fps with working (flame, potion, whatever) animations, also easy. It could work with the XML level files in the same format that apoplexy exports, which would be easy to open, read, change, save. Playing music and sound effects is easy. Getting the prince to move around isn't all that difficult either. Per movement set (like climbing a ledge, crouching, dying, drinking, hanging, falling, running, jumping (up, side, while running), climbing up level door steps, turning (slow, quick), stepping forward) it would use the same size rectangles. Maybe even the same size for all those. The x-axis and y-axis movement of that content can be figured out by playing the original game using DOSBox, making screenshots while using ESC to advance frame-by-frame. Keeping track of the prince's coordinates would not be difficult.

Getting the same wall randomization as the original game, I don't know how I would do that. Maybe extract the algorithm from the original game. The spikes that go in and out, that's just a matter of checking the prince and guard coordinates. Opening gates and level doors, also easy. Checking whether the prince reaches gates in time is also easy, since gates are always at the same tile locations and we can keep track of which animation frame those and the prince are at. Keeping track of the frames is also used for determining whether the prince can/should quickly turn and whatnot. Opening and closing stuff when using buttons - working with events - isn't difficult. Loose tiles wouldn't be difficult to implement. Chompers; their movement and how they kill, not difficult. Picking up the sword, also easy. Death animations, not a problem.

Keeping track of hitpoints is very easy. Fighting would be difficult; probably the most difficult thing to implement. Showing the (regular, fat, shadow, skeleton, Jaffar) guard graphics wouldn't be hard but it would be lots of work, just like getting the parring and such exactly right. Jumping through the mirror, not difficult. The potions level, would it be necessary. How about the demo level. The intro sequence would be easy to add. Saving and loading progress is not difficult. Highscores, allowing the user to enter text would not be difficult but takes time to implement. Keeping track of the playing time shouldn't be too difficult. The cutscenes are not difficult to add. Pausing the game (ESC): easy. Also easy are displaying the remaining time, allowing the player to quit, to restart the level or game, to toggle music/sound effects on and off.

Special events are doable (level 1: falling entry (= level design), tile activation; level 3: checkpoint, skeleton raises; level 4: mirror placed, jump through mirror; level 5: shadow drinks potion; level 6: shadow closes gate; level 7: falling entry (= level design); level 8: mouse opens gate; level 12: tile change, shadow appears, tiles appear, falling tiles, Jaffar takes a fighting pose, flashes when Jaffar dies).

Allowing the player to enable cheats, which includes being able to start in any level. Kill enemy (k): easy; resurrect (r): easy; increase or decrease time left (+/-): easy. Showing coordinates wouldn't be difficult. Allowing the player to look to nearby rooms with the n/u/h/j-keys isn't difficult. There's no real need to implement Shift+b (blocking non-animated objects). Floating is just a matter of showing the animation and keeping track of (and updating) coordinates. Healing a life, getting an extra hitpoint, warping to the next level; all easy. Inverting the screen, that could be tricky. Doable though, since SDL has functions for that. (Just like I'm scaling in apoplexy for zooming, it's possible to rotate/flip images.)

Again, feedback is most welcome.

ikazrima
Efendi
Efendi
Posts: 12
Joined: February 21st, 2014, 6:01 am

Re: Why FreePrince don't get updated.

Post by ikazrima » July 10th, 2014, 3:44 am

Hi Norbert,

Good to hear that you are thinking of starting a new project on porting PoP1 to a newer engine.
I'm on the middle of MS training this week, so I can only reply briefly.

First let me tell you a bit on my own PoP Unity project. Progress has been slow, as I was recently busied with work. However, there are progress made although not that much. I will be able to continue to work on it next month hopefully. I am open to share to my own project here and let others work on it. The engine used (Unity) is not hard to learn, it is cross-platform, you don't have to worry too much on the technical aspect like graphics/audio; so we mostly have to worry about is the game's logic.

I agree on most of your points. Regarding the tile size, currently I'm using the original size (320x200) but I think I can easily scale it to support custom sprites with bigger dimension for an 'HD' remake.
However, I'm undecided on whether to use the original bitmap image or use the converted PNGs for transparency. Unity requires a Pro license to do blitting of images, so this will be a problem if I were to share my project with these Pro features, it wouldn't even compile for those with free licensing.

For audio, I wouldn't worry to much about it too much since the engine support some of the standard types.

I'm using C#, and most of my code was done following the guides found here. I've tried to make it as clean as possible, but comments are lacking so you might have to take some time to understand.

I'll get back to you with a longer response later.

David
The Prince of Persia
The Prince of Persia
Posts: 1505
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Why FreePrince don't get updated.

Post by David » July 11th, 2014, 1:04 pm

In the past half-year I gradually converted the PoP1 disassembly to C code.

It builds on the already posted room-drawing code.
This also means that it uses SDL.
It uses separate PNG images instead of DAT files; for the levels it uses the raw resource data.

And this also means that it does not fulfill all criteria posted by Norbert.
For example, tile graphics are stored in multiple parts like the in original, not as two images per tile.
And levels are not in XML.
-- Of course these can be changed. But I would like to keep this close-to-original version, too.

Of course it was not perfect from the start.
I gradually fixed bugs as I found them.
The current version is almost complete, only the sounds are missing.

I tested it on both Windows and GNU/Linux.
(Though I may need to test it again with the newest changes.)

----
The problem is that I currently can't access it.
Our "main" computer is currently being repaired.
Although we took out the HDD with our personal data, it is a SATA drive.
But the computer I'm currently using does not support that.
I hope this will be solved in a few days...

I knew I should have posted it earlier... perhaps continuously as I progressed.

----
So how my work relates to Norbert's points:
* Cross-platform: tested on both Windows and GNU/Linux.
* Tricks and glitches: As a consequence of using the disassembly, they are like in the original.
(Though some bugs could be fixed, like hanging on certain irregular links.)
* SDL, C: I'm using those.
* How many people: I did it alone, though Mechner's docs helped; the various info and pseudocodes by HTamas also helped.
* Graphics: I'm using RGB. This made some palette tricks a bit harder to implement. (flashing, guard colors, fading)
* Tiles: I'm using the original sizes and the original images.
* Sound: not supported yet.
The cutscenes and the slow-fall use sounds for timing, so this has effects on gameplay.
Perhaps fake the length of the sounds until they are supported.
* Levels and random walls: Like the original. They were already in the room-drawing code.
* Movements: Like the original. Using the frame and sequence tables from the original.
* Guards and fighting: like the original.
* Demo, intro, cutscenes, highscores: also done.
* Potions level: done for the sake of completeness, but disabled (with #ifdef).
* Special events: done.
* Cheats: all of them work.

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

Re: Why FreePrince don't get updated.

Post by Norbert » July 11th, 2014, 1:45 pm

David, that's amazing; you are awesome! :mrgreen:
I can't wait to see the source, hopefully I'll understand most of it.
David wrote:I knew I should have posted it earlier... perhaps continuously as I progressed.
Don't worry about it; the surprise makes it early Christmas. :lol:
David wrote:The cutscenes and the slow-fall use sounds for timing, so this has effects on gameplay.
Interesting, I didn't even think about that.
David wrote:* Levels and random walls: Like the original. They were already in the room-drawing code.
Oh, I completely missed that.
David wrote:[...]
* Demo, intro, cutscenes, highscores: also done.
* Potions level: done for the sake of completeness, but disabled (with #ifdef).
* Special events: done.
* Cheats: all of them work.
So much done already; very cool!
I hope you'll make some backups (on a USB stick, DVD, whatever) as soon as you can touch the sources again.
The idea that the code would be on only one storage medium is a bit scary to me.

realXCV
Sheikh
Sheikh
Posts: 26
Joined: November 4th, 2011, 12:04 am
Location: Right here
Contact:

Re: Why FreePrince don't get updated.

Post by realXCV » July 11th, 2014, 6:22 pm

I'm planning to do something similar with POP2. It will however have to wait until I finish my other project before I can start (or continue) working on it.

- In C? No.
- SDL? No.
- Cross-platform? Possibly.
- Tricks, glitches and cheats? Not sure.
- Original graphics? Yes.
- Original files? Kind of...
- Sounds and Music? Not the first things available but yes.
- Copy protection screen? Probably not.
- Everything else in the game? Mostly.
- Based on the DOS version? No.
- Based on the Mac version? Yes.
- A few extra surprises? YES!

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

Re: [FreePrince] Why FreePrince don't get updated.

Post by Norbert » July 21st, 2014, 6:48 pm

Norbert wrote:On the Princed Forum, the "FreePrince" sub-board could be renamed to "PoP1 for DOS Remakes" or something. The threads about other remakes could then be moved there (PoP Unity, Arabian Nights 2D, PoP Dot Net, Prince of Persia 2D). The word "FreePrince" could be added to some of the threads about FreePrince, so it's clear what they are about.
I've made this change to the forum.

Post Reply