New project Prince of Persia (open source available)


EDIT: June 1st 2016

Here is the source code:
https://github.com/lvcabral/Prince-of-Persia-Roku


Hi roku dev friends,

This is a project that’s taking my nights for the last weeks and I will open source soon:
https://www.instagram.com/p/BCS_AgSkM-q/

Anybody interested in collaborate?

This is a quick video from the 0.2 alpha, I’m already starting 0.5 and will create a git project and a blog post of the process when this release is done.

regards,

Marcelo Lv Cabral
http://lvcabral.com

Short video from Prince of Persia game? I am confused.

“EnTerr” wrote:
Short video from Prince of Persia game? I am confused.

Few years ago Jordan Mechner the original author of Prince of Persia released the source code of the original game for Apple II, and a lot of new ports were done afterwards.

in order to learn more about the Roku Draw2D I’m porting it for Roku from the original code and an Html5 port.

That’s very ambitious, I’ll be interested to see the final result!

“Komag” wrote:
That’s very ambitious, I’ll be interested to see the final result!

I already have the maps (all levels) and the kid (prince) engine working, and yesterday I finished all animated tiles (chopper, spikes, exit door, loose plate etc.)

What is missing: picking objects (potion, sword), the enemies (animation and AI) , the fight engine, and the cut scenes.

As I said I’m porting so, most of my work is focused on adapting to Brigscript solutions from the HTML5 (Phaser Framework) and 6502 Assembly, but the sprites, algorithms and decision trees are there so the port is going fast.

I created a quick video with the current state:

https://youtu.be/r6B0xgb8GSE

It would be a really neat thing indeed! But there would be an issue distributing the result, wouldn’t there? I read that

http://arstechnica.com/gaming/2012/04/original-apple-ii-prince-of-persia-source-code-published-by-creator/” wrote:
… Although the source code of the game is now available to study, modify, and run, it’s technically not open source software. Ubisoft still holds exclusive distribution rights for the franchise.

recolor and rebrand!

“EnTerr” wrote:
It would be a really neat thing indeed! But there would be an issue distributing the result, wouldn’t there? I read that

http://arstechnica.com/gaming/2012/04/original-apple-ii-prince-of-persia-source-code-published-by-creator/” wrote:
… Although the source code of the game is now available to study, modify, and run, it’s technically not open source software. Ubisoft still holds exclusive distribution rights for the franchise.

Well, I’m not planing to release it at the channel store or as a product, you can find several projects that re-implement PoP:

http://www.princed.org/downloads/

Including the one I’m porting from:

https://ultrabolido.wordpress.com/

My plan is to release it to github for the community, I hope Ubisoft will not complain, as did not in the other cases.

that sounds very reasonable to me

New version is ready (Alpha v0.6), see the changes:
https://www.youtube.com/watch?v=gYzuH9f3ADU

If you have a Roku 3 or 4 and want to try it, send me a PM so I can send you the link for the private channel.

The changeset is below:

  • Add: Intro screens and song
  • Add: Start Menu with Screen Mode options
  • Add: Allow use the remote control straight or sideways
  • Add: Event to Open Gate and Exit Door
  • Add: Event to move to next level when enter Exit Door
  • Add: Change level with remote keys (REW and FF)
  • Add: Bitmap font support for Status Bar
  • Add: Event to pick Potion and drink
  • Add: Event to Pick Sword
  • Add: Flash background depending on the CMD_EFFECT
  • Add: Status bar shows kid lives according to health and maxHealth properties
  • Add: Status bar blinks when is the last kid’s life
  • Add: Healing Potion (red): increases 1 energy point
  • Add: Life Extension Potion (big red): Extended energy in 1 point and restore all
  • Add: Poison Potion (blue): decreases 1 energy point
  • Add: Injury from medium fall: : decreases 1 energy point
  • Add: Die from high fall
  • Add: Sound Effects (Run, Bump, Gate, Suspense, Exit Door, Drink, Land, Loose, Spikes, Sword, Button)
  • Add: Loose plate that fall over a button should press it (L4R16->R17) - Not on JS
  • Add: Restart game with death

Plus several bug fixes.

Very impressive, almost hard to believe it can be done on Roku!

I’m guessing you can’t move and jump at the same time? Seems like that’s always a difficult hurdle with not being able to receive multiple buttons simultaneously.

Very cool though. Never realized the original was open source.

“Romans_I_XVI” wrote:
I’m guessing you can’t move and jump at the same time? Seems like that’s always a difficult hurdle with not being able to receive multiple buttons simultaneously.

Very cool though. Never realized the original was open source.

As you can see in the video, we can jump when running, because of the “inercia” the original algorithm had implemented, the only limitation is the “shift” key that allow you to walk or hang, so I had to implement it as a on/off toggle button, that works ok, if you train you can run, jump and hang as you do in a PC keyboard.

BTW if you guys want to try it let me know in a PM I can send you link for the private channel.

The source I will open when I have it with most of the features done, I’m having a lot of fun doing it so far :slightly_smiling_face:

“Romans_I_XVI” wrote:
I’m guessing you can’t move and jump at the same time? Seems like that’s always a difficult hurdle with not being able to receive multiple buttons simultaneously.
This is a port from a 1989 (“before you were born” :mrgreen:) game for Apple ][, whose keyboard was even more limited (as explained here - basically buffer of length 1, with only key-down codes). But even so, developers found a way having key combos

This is truly amazing. I’m old enough to remember it as one of the first “good” games for the PC. Never tried it on an Apple (and never will :mrgreen: ).

-JT

What I’m doing is nothing compared to what this guy did:

Before the author release the code, this guy disassembled the Apple II code, and ported it to Commodore 64, the blog describes the process.

Holly FAQ! :face_with_tongue:
This is amazing - to see it working, it is.

After a quick check, seems to me to work reasonably well on Roku LT and RokuTV too, so 3xxx and 5xxx models should be able to run it too, not only 4xxx! I used infrared remotes - worked fine. But one of them does not have “Replay”, so i have suggestion to accommodate for that, i.e. don’t rely on A/B/Replay buttons being present, use OK/*/Back instead.

The idea of showing 2x2 and 3x3 rooms on screen is interesting… not sure a quite buy into it, since part of the game challenge was keeping (mental or not) map of the dungeon, this makes it easier - suppose i am “originalist”. Also the non-4xxx players seem rather “syrupy” in such modes.

Can the 1x1 (original) mode be zoomed 2x? Thus it will thereabout fit the screen, currently image seems small centered.

“EnTerr” wrote:
Holly FAQ! :face_with_tongue:
This is amazing - to see it working, it is.
After a quick check, seems to me to work reasonably well on Roku LT and RokuTV too, so 3xxx and 5xxx models should be able to run it too, not only 4xxx!

Great to know!

I used infrared remotes - worked fine. But one of them does not have “Replay”, so i have suggestion to accommodate for that, i.e. don’t rely on A/B/Replay buttons being present, use OK/*/Back instead.

I will do it

The idea of showing 2x2 and 3x3 rooms on screen is interesting… not sure a quite buy into it, since part of the game challenge was keeping (mental or not) map of the dungeon, this makes it easier - suppose i am “originalist”. Also the non-4xxx players seem rather “syrupy” in such modes.

Can the 1x1 (original) mode be zoomed 2x? Thus it will thereabout fit the screen, currently image seems small centered.

This is on my backlog since the beginning, the issue is that Roku 2D API does not have a simple way to do this, I will have to scale every sprite and save on temp, other game engines has this as generic setting.