Sunday 17 November 2013

A little stop....

A little stop?

In past month i'm working on a realtime ECG software, i have done some experiments with xamarin i have ported a project on Android, i think in Two week i will porting on ipad.
And ? I have open the project but the new recruitment have maded zero line and zero question about, i will fire in net week.... I dont understand because they have ask to join into the project and....  Nothing ....mah....

Tuesday 1 October 2013

Element / Modifier for Apoplexy

Element / Modifier for Apoplexy

For parse the XML file from Apoplexy (PrinceOfPersia Level Editor) i must create a new Enum,
i havent found the possibility to make a nested enum, my solution is make a pattern mask,
Like this:

// enum standard
 public enum TileType
            space = 0,
            floor = 1,
            spikes = 2,
            posts = 3,
            gate = 4,
            dpressplate = 5, //;down
            pressplate = 6, 

//first 4 byte are element type the rest is the modifier, _x tells the result 

   public enum Tile
            space_1   = 0x00000000,
            space_2   = 0x00000001,
            space_3   = 0x00000002,
            space_4   = 0x00000003,
            space_5   = 0x000000FF, 

            floor_6   = 0x00010000,
            floor_7   = 0x00010001,
            floor_8   = 0x00010002,
            floor_9   = 0x00010003,
            floor_10  = 0x000100FF,

            spike_11  = 0x00020000,
            spike_12  = 0x00020001,
            spike_13  = 0x00020002,
            spike_14  = 0x00020003,
            spike_15  = 0x00020004,
            spike_16  = 0x00020005,
            spike_17  = 0x00020006,
            spike_18  = 0x00020007,
            spike_19  = 0x00020008,
            spike_20  = 0x00020009,

            posts_21  = 0x00030000,

Monday 23 September 2013

Open Project

Open Project

Now, the project is open for join, everyone can send me an email trough Codepelex' site "Source Repository".
I'm looking for someone help me to continue the developing or make graphics, idea etc.

Tuesday 17 September 2013

Room wall algorithm

Room wall algorithm

The original PoP have an algorithmn for determine the wall variance, for draw a realistic stone wall, it adds gray block, creak in the blocks etc.

I found some documentation in "Prince of Persia Specifications of File Formats" (thanks to Norbert) but there's not the all logic but only the first part.

I have started to study and implement the gray stone and the first start wall block,
this is the results from vs PoP classic

Wednesday 11 September 2013

Splash News

Splash News

I spent some time for do change the Monogame assembly from OpenGL to Direct X 9, i have linked the new Monogame prerelease 3.2 and changed from OPENTK library to SHARPDX library.

In this passage lost the Windows XP compatibility but the OPENTK are some buggy like framerate and some content importer lacks, now is compatible only with
  • Windows Vista  Sp1 or greater
  • Windows 7
  • Windows 8
Resfresh source repository and codeplex downloads

New features:
  • the SPLASH sequence, whem kid or enemy hit the splash image show and play the sound effect

Thursday 5 September 2013

Summer is finish


The summer is near to end, the autumn will coming, i'm ready to continue develop the

Last News...
I'm stopping the editor because Norbert (prince of persia forum admin and developer) will introduce new features on his Apoplexy (a Prince of Persia Level Editor), he will develop an XML save format and i want USE his good editor for use with

Friday 21 June 2013

Prince Of Persia Editor

Prince of Persia Editor

I tried to find a good level/maze editor for but i dont found anything that would be fine.

For this reason I started to build a level editor, the development is quite slow since the summer has now arrived....

I have refreshed the source repository now there are

-> some bugs fixed
-> customization features
-> sound files compressed
-> changeed to monogamer library 3.0.1

and the initial PoP editor bones...

Tuesday 4 June 2013

Next Step customization ?!?

Next Step customization ?!?

Next week i will start to customize my goal is to change graphics and make a Flash Special version of Prince Of Persia....
And the future ? to make a generic engine for make platform game like PoP....

For customize your simply modify the file in the root of the appllication called

like this for "Lion" customization

     <!-- KID_SPRITE -->
    <add key="CONFIG_sprite_kid" value="Sprites/Player/Kid_lion/"/>
    <!-- GUARD_SPRITE -->
    <add key="CONFIG_sprite_guard" value="Sprites/Guard/Guard_dos/"/>
    <!-- SONGS_DIRECTORY -->
    <add key="CONFIG_sound" value="Sounds/dos/"/>
    <!-- SONGS_DIRECTORY -->
    <add key="CONFIG_songs" value="Songs/dos/"/>
    <!-- ITEMS_DIRECTORY -->
    <add key="CONFIG_items" value="Items/"/>
    <!-- TILES_DIRECTORY -->
    <add key="CONFIG_tiles" value="Tiles/lion/"/>
    <!-- <add key="CONFIG_path_content" value="Content"/>-->
    <add key="CONFIG_path_Levels" value="Levels"/>
    <add key="CONFIG_path_Rooms" value="Rooms"/>
    <add key="CONFIG_path_Sequences" value="Sequences/lion/"/>

Some examples..

Thursday 23 May 2013

Sound and Music

Sound And Music and other

I'm developing the sound engine a little effort to load the song into the monogame engine, it will aspect the original mp3 file in the Content\bin for load it.

For enable put the name of the sound file, 

  <sound>running 2</sound>

Now i have refresh the setup i have included some music and sound you can preview in download post.

Other features:

-  now in the app.config you can specify the path of the sound, song and sprite for customize purposes

Tuesday 21 May 2013

Standard Setup...

Standard Setup

i have completed a standard setup, it uses the classic msi Windows Setup stand alone, see on right section of this blog under 

Monday 6 May 2013

Prince of Persia Manual

Prince Of Persia Manual

    Prince  of  Persia  is  a  quite nice action/adventure game which first
    appeared on the Apple II some years ago, and  got  rave  reveiws  from
    everyone  who  saw it.  It's got incredibly lifelike animation, and the
    IBM version also supports 256-color MCGA graphics, which look stunning.
    The music isn't half bad either, and it  supports  a  number  of  sound
    cards  as  well.   To  get it running on a hard drive, you just need to
    copy both disks into one directory, that'll work fine.   None  of  this
    install from floppy crap.

    Anyway,  your  object in Prince of Persia is to rescue the princess who
    is being held by your enemy, Jaffar.  To do this, all you've got to  do
    is  get  out of the dungeons in which you are being held.  The dungeons
    have a number of traps, and a few Persians  (ie:  Jaffar's  guards)  to
    prevent your escape, and you will fall prey to many of them.

    In  Prince  of  Persia,  you  do have hit points, and can die.  You are
    always resurrected, however, at the beginning of the level you died on,
    and you have unlimited lives.  It  can  be  frustrating  when  you  get
    pretty  far  and  manage  to  kill  yourself  by running off a ledge or
    something.  The only thing you CAN run out of is time - you've got only
    one hour to escape from the dungeon and rescue Ms. Princess.  Every  so
    often  a  message will appear saying how much time you've got left, and
    the space bar will also tell you.

    For kill the guard, Prince can have the sword, hidden in the first level!

    Although  you can play with a joystick, I find that keyboard control is
    a bit more responsive.  It may just be my joystick, however.  Play with
    it and  decide  which  you  prefer.   Control-K  switches  to  keyboard
    control.   I think Control-J will switch to your joystick and calibrate

    Movement  in  the  game  is  simple.  With a joystick, you just push in
    whichever direction you wish to move.  With the keyboard, you  use  the
    arrows for movement.  The key layout is as follows:

                        LEFT        RIGHT
         SHIFT               DOWN

    Here are some of the moves you can do in Prince of Persia:

                  Push the stick/key  left  or  right  and  hold  it  down.
                  Release the stick/key to skid to a halt.

                  Slowly  Hold  the  button  and  press  left/right to move
                  slowly in either direction.  Do this  to  move  up  on  a
                  ledge  cautiosly  to jump or drop down, or to make a leap
                  over a chasm.  Also useful when treading on spikes.

    Climb Up
                  Pushing straight up will cause  your  character  to  jump
                  up.   If  there is an overhanging ledge, he will catch on
                  and pull himself up if you continue to push up.

    Break Ceiling
                  If you jump and  the  ceiling  moves,  that  indicates  a
                  loose  stone.  Position  your  character  underneath  the
                  loose stone and jump up to try to dislodge  it.   If  you
                  do, be sure to get out of the way to avoid getting conked
                  on  the  head  and  loosing  a  hit  point. Once you have
                  dislodged a stone, you can pull yourself  up  to  another

    Jump Sideways
                  Pushing  the stick/keypad in an upward diagonal direction
                  will cause you to attempt a jump to the  side.   This  is
                  essential  in  jumping over small chasms and holes in the
                  floor, and jumping over floor traps.

    Running Jump
                  If you are running and move to a diagonal position,  your
                  character  will  do  a running jump, which can cover more
                  area.  A running jump will take longer to stop,  however,
                  but it is neccessary often.

                  Pushing  down moves into a crouch position if you are not
                  near  any  ledges.   Crouching  also  moves  you  forward

    Climb Down
                  To  climb  down  to  a  lower  section,  or to drop down,
                  simply position yourself at  the  edge  of  the  opening,
                  turn around (so your back is to the hole), and push down.
                  If  there  is  not a floor below you, you will hang for a
                  moment and drop.

    Grab Ledge
                  If you fall, and in this game you certainly  will  -  and
                  often,  you  can  attempt to grab onto a passing ledge as
                  you fall by.  To do this, simply hold down the button  as
                  you fall past, and you'll try to grab on.  You can either
                  hold the button for a moment and drop, thus breaking your
                  fall  (and  limiting  damage),  or  you  can  push up and
                  attempt to climb out.

    Get Item
                  When you are near an item, such as  a  potion  or  sword,
                  push the button to pick it up.

                  Sometimes  you'll  manage to get yourself into a position
                  where you can't escape.  Control-A will put  you  out  of
                  your misery.

    To win the game, you will need to fight.  Once you get a sword, you can
    start  killing some Persian guards.  As a fencer, I am dissappointed in
    the swordplay's lack of realism, but it DOES beat what most games do. I
    have  not  found  a  game  yet  which  meets  true  swordplay  in   any
    satisfactory  manner.   Anyway,  enough  of  my  diatribe.   Return the
    joystick to the center, or press the shift key on the  keyboard  (while
    not moving) to draw your sword...

                  Use the direction keys to  advance  slowly  towards  your

                  Use the direction keys to move away from the guard.

                  To  make  a  lunge (ie: attack), don't push any direction
                  keys, and hit the shift key/space bar.

                  To parry a blow, hit the up direction key  or  push  your
                  joystick  up.   It's  a  good strategy to wait for him to
                  attack, parry the blow, and hit him with a riposte.

    Run Away
                  Push  down,  and  you'll   sheathe   your   blade.    You
                  automatically  put  it  away after killing someone, so be
                  careful not to do this in battle unless you want  to  run
                  for it.

    A few things which you may find which afford further discussion include
    the following:

                  Potions  come in two flavors, red and blue.  A red potion
                  will heal one hit point, and a blue one will hurt you.

                  When you find the sword, grab  it.   You'll  need  it  to

    Floor Switch
                  A  raised floor stone is a switch which is activated when
                  you step on it.  These  usually  raise  a  portcullis  or
                  reset a trap.

    Floor Switch
                  A  floor  stone which is level with the other stones, but
                  has a dark depression  beneath  it  is  another  kind  of
                  switch.  These  usually  lower  a  portcullis or spring a
                  trap.  Often these should be jumped over.

    Loose Stones
                  When you jump, you may see some  of  the  stones  on  the
                  ceiling  or  floor rattle a little.  These are loose, and
                  can be broken to open new areas, or trap you.  Jumping up
                  underneath loose stones will cause them to crumble (avoid
                  being beneath them when they do) and running  over  loose
                  stones  will  cause them to collapse (don't stand on them
                  as they  crumble  -  they  don't  make  good  elevators).
                  Sometimes  you  may  need  to return over areas that have
                  loose  floor  stones,  so  use  your   judgement   before
                  collapsing them.

                  A  portcullis  simply  keeps  you  from passing through a
                  doorway.  Hit a floor  switch  to  raise  one  of  these.
                  They  are  often  on  a  timer,  and you will need to hit
                  another  floor  switch  to  return  through  them.    The
                  switches  can  be up to a few rooms away.  There are also
                  sometimes other floor switches which will slam them shut.

                  Some type of drill or  spear  or  something  which  falls
                  from  the  ceiling,  like  a  portcullis.  They, too, are
                  operated by floor switches.

                  There are often nice beds of spikes for you to  fall  on.
                  Don't  run  over  these  or fall on them, as they'll kill

    There are also other traps and the like to find  and  kill.   Be  wary,
    and  remember  that time is counting down.  To jump across wide chasms,
    try to make a running jump, and keep your hand near the  action  button
    to try to catch a ledge if you miss.



Tuesday 30 April 2013

Combat Trailer

Combat Trailer

A little combat trailer preview, there are some things to complete :

  • Hit effect when kid or guard loose energy
  • Block attack when strike 
  • Retreat
  • Some little bug to be fixed

For now take a look ( kid already has the sword)

Friday 12 April 2013

Engarde ... Strike!

Engarde ... Strike! sword fighting is near to be complete!

Now Kid alert when Guard is less than 3 tile on same row.
He can advance, retreat and finally strike the Guard

A little problem.... i have fixed the max sprite dimension about 114 x pixel for 114 y pixel and some Kid's strike animation is largest than this, for now i have cutted some sword pixel, but in next version i will change the sprite permit all sprite size.

Kid's combat strike sequence
I will release a compiled version about April's end when i finish the combat fence!

Monday 8 April 2013

Guard is moving!

Guard is moving!

Finally i found time to write the guard movement and ready/engarde routine, when kid is on the same guard's row, the guard change from STAND to READY sequence and call STEPFORWARD for move the guard in Kid's direction.

On the original MACII source i didn't found the guard walking sequences i have grab frame by frame from pc dos version and another little strange is the gardengarde mac sequence, it call the "ready" and jump the engarde, why? i think because the "engarde" sequence can be called from kid and guard sprite...or not?

* g u a r d e n g a r d e
 db goto
 dw ready
* e n  g a r d e
 db act,1
 db chx,2
 db 207
 db 208,chx,2
 db 209,chx,2
 db 210,chx,3
 db act,1
 db tap,0
 db 158
 db 170
:loop db 171
 db goto
 dw :loop

Tuesday 2 April 2013

Guard and Fighting

Guard and Fighting

The original sprites of Prince Of Persia have sword and sprite into two different anim  image, i will union the sword animation into the guard animation.

A little image about guard and fighting..

Thursday 21 March 2013

Little trailer

Little Trailer

Some little news about potions, now Kid can drink and restore energy and some little fix

Wednesday 13 March 2013

Sword and ..

Sword and ..

I have finish today the sword animation, kid now have a weapon for attack the sultan's guards
Next step sultan's swing...

Some little fix :

-> mask routine fixed

Thursday 7 March 2013

Mask sprite under background

Mask sprite under background

I'm study how to mask (hide) Kid when pass behind a pillar or climb from under the floor, i have see some documentation about "Alpha Mapping and pixel shader" bur its a little complicated for me now.

I have adopt another "simple" solution, draw the mask in front of the background after draw sprites, is simple but not elegant.

-> background animation
-> sprites
-> foreground mask

Kid behind a pillar

Example of mask "pillar"


Monday 4 March 2013

Life and Energy

Life and Energy

I spent a few days to implement on Android, but I think there are some problems related to some bug and my little knowledge of the system.
Now I have stopped the Android porting. 
(the Xamarin is very slow debug! i will wait the next release ...)

I went back to develop the Windows version, i have Implemented the death and LifePoints energy, now Kid can die and resort in the "Starting" point with full (default) life energy.

I must develop the "falling life point decrease routine" , for now i have refreshed the compiled downloadable version from codeplex.

Friday 22 February 2013

Monogame and Android

Monogame and Android

Now i start to develop the porting of in android emulator...

Tuesday 19 February 2013



I finish to port into the Monogame framework, this permit an easy (mhh) conversion to IOS (mac of course), ANDROID and LINUX, WINDOWPHONE, XBOX stay tuned i will test this conversion...

Another implementation is to move the "Resources" into the Content, now everyone can modify :
  • Animation (sprite, background and effect like jump etc)
  • Sprite
  • Background
  • Levels and Rooms
Simply open the XML files and modify with notepad, follow the little documentation around past blogs.

Repository refreshed and compiled the binary also, FINALLY !  

Wednesday 13 February 2013



I'm really disappointed, since I discovered that Microsoft XNA will not update for hidden version of Windows 8 at this point I'm considering switching to another framework will be switch to monogame that inherits and continues the development of XNA.

Next days i will spend to port the into Monogame

Wednesday 30 January 2013

Spikes and Death

Spikes and Death

The next step is to make the animation of the spikes and kid's death
The animation of the spike's are 5 frames, the kid spikes death are 1 frame

Friday 25 January 2013

Some little and main screen

Some little and main screen

Now have the main screen, I have to modify it to make it look like the original


Thursday 17 January 2013

Fixing Bugs and ... and all first level completed!

Fixing Bugs and ... and all first level completed!

Oh yes! some days spent for fixing some bug and new implementations like :

->  Fix player falling routine 
-> Loose (tile) routine and sequence animation (break floor, shake when pass on it...ecc)
-> Implement the start position of kid in the maze using two xml token

In the LEVEL_dungeon_prison.xml :

<Level xmlns:xsi="" xmlns:xsd="">


In the MAP_dungeon_prison_1.xml :

<Map xmlns:xsi="" xmlns:xsd="">

-> And finally ALL first level completed, but miss some tile like spike ecc

                                               Where is the door for next level?


Friday 11 January 2013

Loose completed!

Loose Floor completed!

Yes i have an idea and then loose floor is complete, miss its break animation and initial fall animation, but it can fall....

Wednesday 9 January 2013

Rewrite for XNA Content..FAIL

Rewrite for XNA Content..FAIL

I have spent some hours to rewrite some code for putting the XML resource in XML Content, i have also introduced a library for manage the XML Content serialization, BUT at least i have decided to return to old project.
Because the XML Content in XNA its orrible, i will prefer a standard xml it's too simple and powerfull.

LOOSE tile

Now i'm writing the routine for loosing floor, i don't understand how to manage the falling floor drawing in outside room.
I can manage a falling floor in a room but when it exist from room for fall in the under room i cant manage how to draw...

Think think...  I hope that in the next few days I'll be an idea

Monday 7 January 2013

Open the door! complete !

Open the door! complete !

Start 2013 with a new tile animation, "Open the door!" 

There are 13 frame for close/open the door, every frame shift 8 pixel up/down the grid.

I have add a new command, now in tile sequence XML you can specify the "delay" for each frame animation, this is usefull for close "step by step" slowly the grid of the door.
Like this:


Another new features can be found in room XML definiton :

switchButton = is present in door and pressplate tile for open the assigned doors
timeOpen = how long the door stay open (in seconds)


Setup and source code refreshed.