As a first step I’ve tried to reproduce, as faithfully as possible, the movements of the prince. Analyzing the source code and the technical documentation available it can be seen that the movement of all characters in the game is defined in two files: FRAMEDEF.S and SEQTABLE.S
The FRAMEDEF file defines, for each animation frame, the following parameters:
Fimage: the id of the graphic image of the character Fsword: the id of the graphic image of the sword Fdx: the horizontal offset in pixels Fdy: the vertical offset in pixels Fcheck: mainly used to detect ground collision
The SEQTABLE file defines the command sequence for each animation. There are two types of commands:
$00-$EF: identifiers of frames that matches the listed frames in FRAMEDEF file $FF-$F1: are special instructions that executes specific actions
For example, $FB moves the character N pixels in horizontal direction.
With this information we have enough data to handle the characters animation. What is missing now are the graphics. For this, I used a tool called PR (Princed Resources) to extract the game’s graphics, then I used ImageMagick to convert the background color for each sprite to transparent and finally I used TexturePacker to generate the spritesheet compatible with Phaser.
The results can be seen here.
For the next post I will try to look into build the game levels.