SDLPoP; David's open-source port of PoP

Open-source port of PoP that runs natively on Windows, Linux, etc.
Sance
Sheikh
Sheikh
Posts: 33
Joined: December 30th, 2013, 4:59 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Sance »

Sorry for the double post but the last one was so long and the subject is different here (it's on topic, yay! :D) so this will be a separate post.

I played through SLDPoP (1.15 version, the one that is downloadable, I have no idea how to compile the newer ones) and I found some very minor issues:

- The game defaults to the joystick: guess this is because I have a controller plugged in but the keyboard controls should always be the priority.

- I highly recommend using the SNES control scheme as the basis of the controller scheme in the "physical" sense meaning that the button placement should be identical to that one:
https://upload.wikimedia.org/wikipedia/ ... roller.jpg
So for example on SNES B is the jump button and A is the step / attack button. That would translate to A as jump and B as step / attack on an Xbox controller. Replicating the keyboard controls accurately on a controller is actually harder than it seems: for example on a keyboard you do the "crouch hopping" move by using two fingers so on a controller you need a dedicated crouch button on top of the D-Pad controls (yes, the D-Pad controls, forget about the analog stick, it's useless and inaccurate for classic games). I use XPadder to configure the controller for older games so I can show my setup, for me these are the ideal button placements for the DOS version on an Xbox 360 / Xbox One pad:
Image

- The audio quality is terrible (I used the ogg format, downloaded the ~30 meg version of the music) compared to the original MIDI. I suggest using higher quality encoding and also implementing MIDI support.
Andrew
Wise Scribe
Wise Scribe
Posts: 313
Joined: July 16th, 2009, 4:39 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Andrew »

Sance wrote:I suggest using higher quality encoding and also implementing MIDI support.
I agree, but doubt anyone plans to tackle this anytime soon due to the possible effort involved.
Sance
Sheikh
Sheikh
Posts: 33
Joined: December 30th, 2013, 4:59 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Sance »

Andrew wrote:
Sance wrote:adding an optional easy mode with non-lethal traps - to let newbies or SoT fans just pick up the game play
Sance wrote:most of those guys and girls [SoT fans] never finished the original games because they found them too hard
Bear with me, this will probably be a bit long... :roll: I have to say I find the above an extremely ridiculous but sadly all too common point of view amongst younger gamers.
Without quoting all of this paragraph I have to say that I fully agree here on a personal level: playing PoP1 on a lower difficulty would be sacrilege to me... but I don't view having those options as sacrilege because I wouldn't use them anyway. To me failing, trying again and seeing that last 1 minutes timer running out on the bottom of the screen was part of the gameplay experience back in the day and it is a fond memory but I don't see the pain in letting a casual player experiencing the whole game thanks to an easy mode. Some gamers today view stuff like Warrior Within and even PoP Classic brutally challenging even though WW was very fair in its difficulty and PoP Classic used very simplified precision platforming.
I see no reason why the SDLPoP devs themselves should focus their efforts towards replicating the game play or quirks of non-DOS ports faithfully.
I share this opinion but somewhere I also feel a bit sorry for for example the guy who did the SDL port of Wolfenstein 3-D: nobody plays the SDL port, everyone plays the awesome stuff that was based on it by other developers (ECWolf, the improved Windows version of Wolf3D and Mac-Enstein, the port of the Macintosh version are both based on SDL Wolf). They guy who made ECWolf sells Supar Noah's Ark, a SNES clone of Wolf3D running on the ECWolf engine on Steam to get some money for his work and sure, ECWolf is a huge accomplishment but it is based on the SDL port and the guy who made that sees nothing of that money.

So you know, let's say SDL PoP someday becomes an advanced version with support for the graphics of the Mac version: with that quality of graphics and today's never ending retro gaming craze you can do anything. For example the community could mod the hell out of SDLPoP, replace all the original assets, making a whole new game, a PoP clone in the process and you can actually sell it. I don't know what is David's aim with SDLPoP but I think that something like this could be an aim that has actual benefits to the community, the developers and the players.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5786
Joined: April 9th, 2009, 10:58 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Norbert »

Note that the gamepad controls have already been modified after 1.15 was released. The newer version uses the D-pad and (left) joystick for moving left and right, X as 'Shift', Y to jump and A to crouch. I've coded and tested this with my Xbox 360 controller. I'm happy with how it plays, where necessary one thumb is enough to combine two buttons. Also, up for up and down for down makes sense.

The OGG music files in the 38MB ZIP package linked here are not the problem. Listen to them in a regular player. When SDLPoP plays them there is some minor background noise. It's not bad, but there's some room for improvement.

The idea of including an easy option is interesting. I usually play games on medium difficulty and then if I enjoy them sometimes I replay the games on hard or even higher difficulty. Assuming Prince of Persia's default is from easy to hard(er) since it had only one (increasing) difficulty, it's not strange to move with the times and provide players with the option to modify the difficulty.
Sance
Sheikh
Sheikh
Posts: 33
Joined: December 30th, 2013, 4:59 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Sance »

Norbert wrote:Note that the gamepad controls have already been modified after 1.15 was released. The newer version uses the D-pad and (left) joystick for moving left and right, X as 'Shift', Y to jump and A to crouch. I've coded and tested this with my Xbox 360 controller. I'm happy with how it plays, where necessary one thumb is enough to combine two buttons. Also, up for up and down for down makes sense.
Just one more reason for rebindable controls. :) I played the SNES version to death so it would be really hard for me to adjust to your control scheme. A to crouch and Y to jump even makes sense because of the button positioning but then again "A to jump" and "X to attack" is a standard for video games. For me a bumber buttons to crouch works because that's how it was on the SNES (though there both shoulder buttons functioned as crouch).
Norbert wrote:The idea of including an easy option is interesting. I usually play games on medium difficulty and then if I enjoy them sometimes I replay the games on hard or even higher difficulty. Assuming Prince of Persia's default is from easy to hard(er) since it had only one (increasing) difficulty, it's not strange to move with the times and provide players with the option to modify the difficulty.
Yes and honestly there is a difficulty level that would be a natural fit for a game like Prince of Persia: an "ironman" (or "iron Prince" :D) mode where you only have one life so if you die the game is over. PoP Classic has it if I remember correctly: there "normal" was the game with no timer, "time attack" or something like that was the 60 minute timer and "survival mode" was the 60 minute timer + one life setting.
Andrew
Wise Scribe
Wise Scribe
Posts: 313
Joined: July 16th, 2009, 4:39 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Andrew »

Sance wrote:To me failing, trying again and seeing that last 1 minutes timer running out on the bottom of the screen was part of the gameplay experience back in the day and it is a fond memory
Mine as well, and I really don't see why what was a fond memory for us couldn't be so for newer gamers as well? Gamers nowadays only lack the patience to tackle older games that were more unforgiving of the player's mistakes, for otherwise it's not as if their skills have regressed to the extent that they're unable to tackle PoP if they really put their mind to it. So what if they die a few times and, provided they saved, have to repeat a level? Is that really so bad? Also let's be honest here, PoP is barely even that hard compared to some really fiendish alternatives from that era.
Sance wrote:but I don't see the pain in letting a casual player experiencing the whole game thanks to an easy mode
I'm sure that's exactly what the marketing guys tell those devs who don't believe in spoon-feeding their players. :roll: Perhaps it's just a difference in how we view this issue philosophically, but I don't see any advantage in (IMO) ruining the quintessential PoP experience by making it easy for players to just waltz through to the end. I mean, what's the aim here? Just for them to be happy that they beat the game, no matter that it was at a 'difficulty' mode never intended by the designer? This actually brings to mind people who skip ahead and read the last pages of a thriller or watch the last scenes of a movie because they can't stand the suspense, thus ruining the entire experience as painstakingly planned by the creator. Do you honestly believe that an easy mode will really expand the audience for the game, or encourage repeated play-throughs at increasingly tougher modes? For a game that was never intended to have multiple difficulty modes, introducing them will only serve to create something that looks like PoP but doesn't play like it and thus just is not PoP.

The only way I can think of for a game like PoP to include variable difficulty modes and to do it reasonably well would be to intelligently vary the frequency, number, placement etc. of potions/power-ups, enemies and so on. Perhaps even have slightly easier level design in a low-difficulty mode. But then, what you're doing is designing a game with difficulty modes in mind from the get-go, not tacking it on as an ugly after-thought where the only difference between modes is that the traps are simply nullified or made non-lethal. Again, that sort of intelligent redesign would look like PoP but be something else entirely. Not necessarily better or worse, just a different product created according to different design principles. Not to mention it would also require a whole lot of work way above and beyond what a dumb version of easy mode would entail.
Sance wrote:I share this opinion but somewhere I also feel a bit sorry for for example the guy who did the SDL port of Wolfenstein 3-D: nobody plays the SDL port, everyone plays the awesome stuff that was based on it by other developers
Well, that's what you get with open source. Depending on the license people are free to build on what the first guy did and get all the plaudits, even if they themselves only polished what was already done. Those who feel strongly that implementing easy mode will somehow be better for PoP and its community are free to do so and test their theory. As they say, the proof of the pudding lies in the eating, but I would honestly be quite surprised if a whole new legion of grateful fans descended from somewhere, all of whom were so far being held back from their appreciation of PoP simply because it was too hard for them.
Sance wrote:For example the community could mod the hell out of SDLPoP, replace all the original assets, making a whole new game, a PoP clone in the process and you can actually sell it. I don't know what is David's aim with SDLPoP but I think that something like this could be an aim that has actual benefits to the community, the developers and the players.
Now that's a whole different ball-game! We're no longer talking about a dumbed down PoP here but an entirely new game, so if that's the aim then while I object to the former I would welcome the latter. (Keep in mind that in such an eventuality any legal issues surrounding basing the platforming engine on illegally reverse-engineered copyrighted code would need to be clarified well in advance of even contemplating sales.)
Norbert wrote:it's not strange to move with the times and provide players with the option to modify the difficulty.
I would argue that doing something like this just because players nowadays can't even handle PoP is really the worst reason ever with no real upside to show for the effort (yes, I know it'll be optional and all, but the point remains). Simply creating a dumb version of easy mode by neutering all the tough bits actually sounds so silly to me as to be laughable. Where do you draw the line then? Who knows whether these hypothetical fans all eager to play PoP will be satisfied or not? Perhaps we should create a version specially for them with 14 levels of just jumping over gaps till the exit door is reached? ;)
Sance wrote:Yes and honestly there is a difficulty level that would be a natural fit for a game like Prince of Persia: an "ironman" (or "iron Prince" :D) mode where you only have one life so if you die the game is over.
That shouldn't be difficult to implement (can be done by hex editing too), but if people consider the default as too hard then this will surely give them a heart attack. :)
Sance
Sheikh
Sheikh
Posts: 33
Joined: December 30th, 2013, 4:59 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Sance »

Andrew wrote:For a game that was never intended to have multiple difficulty modes, introducing them will only serve to create something that looks like PoP but doesn't play like it and thus just is not PoP.

The only way I can think of for a game like PoP to include variable difficulty modes and to do it reasonably well would be to intelligently vary the frequency, number, placement etc. of potions/power-ups, enemies and so on.
I'd be strongly against such a change because it would break the pacing, the level design etc. Enemy and trap placements are perfect as they are and something like let's say extending the health of guards would break the pacing because the combat is not that hard so it would just be a chore to fight enemies with more health: it would make the game harder because the time limit would be less forgiving with such a change but there are easier ways to achieve that (giving the player less time to complete the game, let's say 40 minutes).

I can see a lot of ways on how the game could be made easier but they vary in complexity:

- A rewind feature: you have 3 rewinds per level for example. Guess it would need a tremendous amount of work (for example in SoT it works by the game always storing the last 8 seconds of the player's actions in the memory) but it would be a natural fit for the game with its focus on time. I can only see this happening if there is an aim for SDLPoP to support recording and replays.

- Ability to resurrect: same function as the rewind (correcting a mistake). Upon death the player gets resurrected at a specific platform in every room (a safe, solid platform of course). It would look awesome with the opening "falling to a crouch with a music tune" part. :D

- Non-lethal traps: you don't die from a trap, you only lose two bottles of health. Should be problematic to implement and it may not even be the most ideal as you wouldn't need to solve some of the rooms (the life upgrade potion room in the second level comes to mind: you start with 3 health so a player could just waltz through the spikes, jump up and pick up the potion without suffering any kind of punishment.

- Guide: in every room an arrow shows the way to the exit.

- Multiple lives: the best option in my opinion. You have 3 lives per level (could be adjustable but 3 should be the max) and instead of dying your character starts flashing like in other classic platformers, giving you a few seconds of invulnerability.

As for making the game harder there are hordes of options to make the game more brutal without actually breaking anything (I'll just be throwing out ideas, some of them are more feasible than others):

- Less powerful health upgrades: you receive the health upgrades when drinking them but your health won't be refilled.
- No health upgrades: you start with 3 health, you finish with 3 health.
- "Weakling" mode: all the guards do double damage.
- "He's just standing there" mode: all the guards function as the first guard on level 8.
- "Fatass" mode: all the guards function as the fatass on level 6.
- "Skeleton army" mode: all the guards who can be pushed to a lower platform get replaced by skeletons.
- "Immortal army" mode: all the guards get resurrected after a few seconds. Poor mortal Jaffar.
- Multiple lives: almost the same as before but here it's an increase in difficulty. You have a certain amount of lives, once they run out the game ends.
- "Iron Prince" mode: already discussed.
- "Time flies in good company" mode: you only have 40 minutes instead of 60.

Honestly I'd even totally change one thing in the game: Jaffar. I don't think he's a worthy end boss: he should function as the first guard on level 8 and instead of just dying on level 12 he should behave like he does in PoP Classic: after getting to half health he teleports away and another fatass appears instead of him and then you fight Jaffar again on level 13 before getting to the Princess.

The way I imagine it is there should be an "easy" (with one of the mechanics that makes the game easier) and a "classic" difficulty and the options to make the game harder should be available on both. It would be like "second wave" in XCOM: Enemy Unknown: you could select one or more of them so the difficulty would be highly scalable (let's say you want to play "Iron Prince" with "Immortal army" and no health upgrades). That way you could have a very easy experience and a next to impossible one too.
Andrew wrote:I would honestly be quite surprised if a whole new legion of grateful fans descended from somewhere, all of whom were so far being held back from their appreciation of PoP simply because it was too hard for them.
Let's say you add:
- the higher quality Mac graphics
- background music for the levels
- an extra "awesome" feautre like the option to choose from multiple protagonists with different appearances and in some cases different starting health (PoP1 prince, PoP2 prince, SoT prince, WW prince, 2008 prince, the princes from Mechner's comic book, Jake Gyllenhaal (:D), whatever, you get the idea)
- some of the difficulty features I mentioned.

You kidding me? It would be amazing: old fans and some new fans would play it, especially if no new Prince of Persia title is created by Ubi in the meantime. You give it some flashy title (Prince of Persia Reborn, PoP Redux, PoP Ultimate Edition, PoP Megahit Edition, Ultra PoP, Super Turbo PoP Ultimate Ultra Edition) and just count the downloads till your eyes bleed. :D

Anyway stuff like this exists, mein Leben!
https://www.youtube.com/watch?v=DIwxs32DQ6c
Andrew wrote:Now that's a whole different ball-game! We're no longer talking about a dumbed down PoP here but an entirely new game, so if that's the aim then while I object to the former I would welcome the latter. (Keep in mind that in such an eventuality any legal issues surrounding basing the platforming engine on illegally reverse-engineered copyrighted code would need to be clarified well in advance of even contemplating sales.)
Actually I'm a lawyer and I know a thing or two about copyright law: in my opinion reverse-engineering is not illegal because it comes from intricately studying the program it is based on and on top of that there is no source code to be stolen in this case. Copyright protects all kinds of creative work, software developed through reverse-engineering included. I'm not saying it couldn't be more complicated than this but the EU seems to agree with me:
http://www.bloomberg.com/news/articles/ ... ring-court

Legal problems would only occur if the game contained any kinds of art material from PoP. That would be copyright infringement.

Anyway I think that a PoP clone would be easy to do from a legal standpoint because it's a safe bet that Arabian Nights is public domain so even characters from there could be used. Sindbad maybe? :)

Edit: Yes he is :D :
http://pdsh.wikia.com/wiki/Sinbad_the_Sailor
He would be fitting honestly:
Image
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by David »

So, can I make a v1.16 ZIP release now?
Sance wrote: Actually I'm a lawyer and I know a thing or two about copyright law: in my opinion reverse-engineering is not illegal because it comes from intricately studying the program it is based on and on top of that there is no source code to be stolen in this case. Copyright protects all kinds of creative work, software developed through reverse-engineering included. I'm not saying it couldn't be more complicated than this but the EU seems to agree with me:
http://www.bloomberg.com/news/articles/ ... ring-court
Remember that SDLPoP is based on the disassembly of the DOS version.
So it copies more than just "functionality, programming languages and data formats".
The linked article does not say anything about disassembling.
Does "reverse-engineering is not illegal because it comes from intricately studying the program" include studying the disassembly?
Does the disassembly count as "stolen source code"?
Falcury
Calif
Calif
Posts: 568
Joined: June 25th, 2009, 10:01 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Falcury »

Sance wrote:I share this opinion but somewhere I also feel a bit sorry for for example the guy who did the SDL port of Wolfenstein 3-D: nobody plays the SDL port, everyone plays the awesome stuff that was based on it by other developers (ECWolf, the improved Windows version of Wolf3D and Mac-Enstein, the port of the Macintosh version are both based on SDL Wolf). They guy who made ECWolf sells Supar Noah's Ark, a SNES clone of Wolf3D running on the ECWolf engine on Steam to get some money for his work and sure, ECWolf is a huge accomplishment but it is based on the SDL port and the guy who made that sees nothing of that money.
Well, the license is GPLv3, so if I understand it correctly there should be some protection against monetization of SDLPoP?
Mind you I'm not an expert in this...
David wrote:So, can I make a v1.16 ZIP release now?
I think so! :D
Sance
Sheikh
Sheikh
Posts: 33
Joined: December 30th, 2013, 4:59 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Sance »

Does "reverse-engineering is not illegal because it comes from intricately studying the program" include studying the disassembly?
Does the disassembly count as "stolen source code"?
Well, the license is GPLv3, so if I understand it correctly there should be some protection against monetization of SDLPoP?
Mind you I'm not an expert in this...
Really good questions I have to say. For the first one: note that I know nothing about programming, software development etc. What is a disassembly? Is that part of a usual reverse-engineering process?

For the second one: again it's not something I'm familiar with but if I read that correctly it's the software itself that has to remain free, not the content you create with it. I don't think that a game has to remain free if the two entities (SDLPoP and the content of the game ~ the game) are separate and SDLPoP itself is free.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5786
Joined: April 9th, 2009, 10:58 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Norbert »

So much text to read, you guys!
I decided to skim through it instead of reading all of it fully.

> Do you honestly believe that an easy mode will really
> expand the audience for the game, or encourage repeated
> play-throughs at increasingly tougher modes?

Perhaps a rhetorical question and/or not addressed to me, but: yes, an optional easy mode could expand the audience and might encourage repeated play-throughs. As a kid I don't think I could get past level 3 without using cheats. I don't think spoilers are a problem either. I also don't think gamers nowadays lack patience. I've been on Steam for roughly three years now and I've got 226 games on there. Players test games, see if they like them, move on to other games if they don't. Being able to reach the skeleton, seeing palace graphics, the shadow, it shows that PoP offers more than just a maze with guards. Some people (kids, noobs) may need an easy difficulty, where, for example, chompers only take away one hitpoint. As long as medium (or default or classic) is the regular, original Prince of Persia, players will understand that that's how it was meant to be played. By the way, King of Persia is a mod that provides a series of five, increasingly difficult, challenges. First no save, then also no extra lives, then also no health regeneration, then you also start with 1 life, and eventually you also cannot restart levels. At some point it might be useful if SDLPoP would display a short notice - maybe a rectangular overlay with text in the first room - that gives the key bindings to load/save and record/replay. Finally, as SDLPoP already allows for recording/replaying, a rewind feature certainly seems like a possiblity. A guide option sounds useful too; not too difficult to implement. (But still work, of course.)

> Well, the license is GPLv3, so if I understand it
> correctly there should be some protection against
> monetization of SDLPoP?

People can sell (GPL-licensed) Free Software for whatever price they want. You can read, for example, this for more information. In fact, I know at least one GPLv3 licensed game is being sold on Steam, Tales of Maj'Eyal. Free Software really is about liberty, not about it being gratis. "You can charge nothing, a penny, a dollar, or a billion dollars." At the same time, the source is free and out there, so charging much won't work. SDLPoP is more complicated still, since it requires DAT file data to function, among other things. If Mechner would be on-board, then the situation might be different. I did suggest something similar in a letter to Mechner, but didn't hear back from him.
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by David »

Here is the v1.16 ZIP.
Attachments
SDLPoP_v1.16_release.zip
(1.58 MiB) Downloaded 264 times
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5786
Joined: April 9th, 2009, 10:58 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Norbert »

David, the last couple of release dates have been further apart than they were for a while, so storage-space-wise I think it should no longer be a problem to distribute the OGG music files with (inside) the SDLPoP packages. For previous releases I already added a (64-bit) Linux executable. Do you want me to also add the OGG files? They will increase the size of the package by approximately 13MB, but it would give those who try out SDLPoP a more authentic experience without having to read up on how to add music.
Falcury
Calif
Calif
Posts: 568
Joined: June 25th, 2009, 10:01 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Falcury »

Just use the OGG files from the GitHub repository, then the ZIP file will be approximately 4.5 MB (see the "experimental" releases)

Edit:
Music added in the attached ZIP:
Attachments
SDLPoP_v1.16.zip
(4.69 MiB) Downloaded 375 times
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5786
Joined: April 9th, 2009, 10:58 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Norbert »

Okay.
Post Reply