Finally completable

Hello everyone!

Great news! The Prince and the Coward is now completable! This means that we are able to play from beginning to the end of the game without skipping any important part of it. Here we have a screenshot from ending sequence to give you a proof:

Prince completable
Game ending

First thing that I had to change was hero drawing and movement to implement second hero displaying. I made some changes in Hero class (hero shadow drawing, zooming) and also update pathfinding functions for second hero and now it’s working fine:

Second hero implementation
Displaying and movement

I also implement drawing “power meter” and bind it with mouse and keyboard buttons, so now last mini-game – “Escape from jail” is working correctly:

“Escape from jail”
Last mini-game

Next things that I had to code were credits loading and scrolling function for them. They are displayed after game ending animations and they look like this:

End credits
Scrolling after ending animations

I also work on graphics functions to add anti-aliasing code that exist in original version of game for sprite drawing functions. Prince is using 256 colors palette and its edge smoothing is based on 256 x 256 table of colors transition. Algorithm is checking if currently drawing pixel is located next to the edge of sprite and if it makes jagged line. If it does then this pixel is set with color from transition table calculated of original background pixel color and sprite’s edge pixel color. Personally I don’t see a big difference, but I think that it is visible mostly on not moving sprites, like shovel. You can compare it on screenshots below:

Anti-aliasing comparison – first location
(from left to right) Original game, ScummVM – AA on, ScummVM – AA off
Anti-aliasing comparison – shovel sprite
(from left to right) Original game, ScummVM – AA on, ScummVM – AA off

Most of work is done now, but there are still glitches that I have to fix (e.g. correct shadow drawing, fix drawing of last frames of FLC animations) and some ScummVM’s Advanced Engine Features that I’d like to implement before merging of the engine.