Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Komag
Roku Guru

Re: New project Prince of Persia (will be open sourced May 3

glad to hear it's still moving along 🙂
0 Kudos
marcelo_cabral
Roku Guru

Re: New project Prince of Persia (will be open sourced May 3

I just published the source code at:
https://github.com/lvcabral/Prince-of-Persia-Roku

And the private channel was already updated with v0.9.3070, here is the changelog:

0.9 - Cut Scenes, Special Events, Mac sprites (tiles, enemies), Skeleton, Mouse and Jaffar
* Add: Game Opening Story
* Add: Game Cut scenes before levels: 2, 4, 6, 8, 9 and 12
* Add: Game Final Scene and Story
* Add: Scene for the end of the game by timeout
* Add: Music played on level exit (level 4 different and no song after level 12 and 13)
* Add: Events: Level 1 - Initial gate close is a button pressed on room 5
* Add: Events: Level 3 - Skeleton in room 1 will raise if the exit door is open
* Add: Events: Level 4 - The exit room song changes after the exit door is raised
* Add: Events: Level 4 - A mirror will be placed at room 4 and music played (once) when the exit room is opened
* Add: Events: Level 8 - If exit door is raised the mouse will show up at room 16 (kid needs to be at least 12.5s at the room)
* Add: Events: Level 12 - Tiles will appear automatically to create a bridge on room 2 to 13
* Add: Events: Level 12 - Entering room 23 go to level 13
* Add: Events: Level 13 - No health regeneration or remaining time shown on restarting the level
* Add: Events: Level 13 - Loose tiles above rooms 16 and 23 will fall when kid enters.
* Add: Events: Level 13 - Leaving room 3 from the right play a music and after that Jaffar goes engarde
* Add: Events: Level 13 - After Jaffar dies the button on room 24 is pressed to open exit door when kid enter room 3
* Add: Events: Level 13 - After Jaffar dies, screen flashes several times white, and show remaining time, the countdown stops
* Add: Events: Level 14 - The final scene shows entering room 5
* Add: On Final level 14 the screen is changed to Classic Mode (1 room) - Can't move back to previous level
* Add: Menu now can me moved both in vertical and horizontal control modes (thanks renojim)
* Add: Mirror tile on Palace sprite set - Not on JS
* Add: Support for Macintosh sprites (scenes, dungeon and palace tiles, TROBs, Enemies splash and life, skeleton and Jaffar)
* Add: Guard check for barrier and only advance if the path is free
* Add: Kid check for barrier and only go engarde if the path is free
* Fix: Sometimes Running-jump crosses closed gates
* Fix: Kid being stabbed to death does not show splash (thanks David!)
* Fix: Shift mode not working on Horizontal Control mode (thanks gmaster28)
* Fix: Pillar (id=25) is masked out when kid is climbing (L5R2) - Same bug in JS
* Fix: Debris tiles are being painted above the tile on the right
* Fix: Grab to the Left is hanging on the wrong tile - same bug on JS (L4R16, L5R10R7, L1R7) - Same bug in JS
* Fix: Falling after hang between Palace pillars the kid land on air (L5) - Same bug in JS
* Fix: Running into a tapestry shows kids face on the other side, same on gates (L10R1)
* Fix: Guard is not killed by slicer
* Fix: MOBs when falling off the screen on horizontal change is not working (L2)
* Fix: When two plates fall side by side only one debris is shown on floor (L1 & L2)
* Fix: When a plate fall over another plate it's not dropping those and the sprite get's stuck (L13)
* Fix: Kid on BlockX = 9 moving right do not change camera focus
* Fix: Kid can't walk through an open gate when it's on the right edge
* Fix: Kid was not sheathing the sword when opponent fall to other Y
* Fix: If kid is really close to the wall and do a turnengarde sometimes there is a crash in opp_left_side and opp_right_side
* Fix Guard hit when back to a wall, enter the wall (L2)
0 Kudos
Komag
Roku Guru

Re: New project Prince of Persia (will be open sourced May 3

Nice, you've done really good work with this!

(If I immediately go right, am I supposed to have a sword already?)
0 Kudos
marcelo_cabral
Roku Guru

Re: New project Prince of Persia (will be open sourced May 3

"Komag" wrote:
Nice, you've done really good work with this!

(If I immediately go right, am I supposed to have a sword already?)


Thanks!

You need to pick up the sword, but if you enter Debug mode (OK button) you get the sword
0 Kudos
Komag
Roku Guru

Re: New project Prince of Persia (will be open sourced May 3

Ah, I had accidentally turned that on and off a couple times
0 Kudos
marcelo_cabral
Roku Guru

Re: New project Prince of Persia (open source available)

Some tips for those who will Debug the game:

To change the guards behavior you have 3 options to be set on gameMain.brs:

44: m.fight = m.const.FIGHT_ATTACK 'parameter to set opponents fight behavior

Options:
m.const.FIGHT_ATTACK - Guards normal behavior
m.const.FIGHT_ALERT - Guards will be alert, follow you, defend but will not attack you
m.const.FIGHT_FROZEN - Guards will be static and you do not go "engarde"


To go directly to a place in the game edit the following lines on gameMain.brs:

77: m.currentLevel = ll
...
104: ResetGame(rr, tt)

Where:
ll = level number
rr = room number
tt = tile id


Use these maps to know where to send the kid: http://www.popuw.com/maps.html

The "Replay" key on Debug mode set the "dark" mode on, where no tiles are painted
The "Slicers" shows a transparend red bar on debug mode, that is the "killer" area for the kid
0 Kudos
joetesta
Roku Guru

Re: New project Prince of Persia (open source available)

very cool - just downloaded and playing around, having a tough time jumping on the run... saw a crash too - was playing and it just exited to home screen -this was the last line in the debug:
 232, 160 runstop kid-54 R:1 T:3,1

update: i figured out how to jump!
btw amazing job you did here!!!
aspiring
0 Kudos
marcelo_cabral
Roku Guru

Re: New project Prince of Persia (open source available)

"joetesta" wrote:
very cool - just downloaded and playing around, having a tough time jumping on the run... saw a crash too - was playing and it just exited to home screen -this was the last line in the debug:
 232, 160 runstop kid-54 R:1 T:3,1


I tested so many times that I can jump easily, but on the Roku 3 WiFi remote, you just quickly release the direction and click jump, it has some inercia on the previous movement.

About the crash, do you remember what Level you were ? the debug line you sent only shows Room and Tile, and also what you was trying to do ?
0 Kudos
joetesta
Roku Guru

Re: New project Prince of Persia (open source available)

About the crash, it was on the very first level after dying and restarting about 25 times on the very first spikes :oops: , I think it happened about a second after the game restarted. haven't seen it again yet.
aspiring
0 Kudos
joetesta
Roku Guru

Re: New project Prince of Persia (open source available)

oops i hit a bug, i wonder if i can upload a video? the kid fell off the ledge where the first spikes are (I suck at this game, but great at finding bugs!)
he's stuck in an endless loop falling over and over...
Update: played for a while longer and that didn't happen again. Didn't get out of level 1 though...
aspiring
0 Kudos