Fluffy's Prince of Persia

Threads about other remakes and ports.
Post Reply
Posts: 30
Joined: June 6th, 2004, 7:05 pm

Fluffy's Prince of Persia

Post by FluffyQuack »

For the heck of it, I started a project a little over a week ago to write my own engine that runs Prince of Persia.

This is what progress looks like right now:

I've got level rendering mostly done (it took a while to get the "decal textures" rendering correctly on the walls), and I've started working on player movement.

I don't know how far I'll get with the project. If I get to the point where I've got the gameplay 100% replicated, I might try to tackle stuff like adding multiplayer or try to add support for Prince of Persia 2 (which will probably have some big challenges as there's no source code I can reference to figure out how exactly how stuff is handled in that game).

I'm trying to make the gameplay as close as possible to the original POP, but when given the choice I prefer to design more straightforward structures rather than replicating what POP does. For instance, internally, my coordinate system is pretty straightforward: a position of 1 represents 1 pixel in the graphical output, instead of what POP1 does on DOS where it still uses the coordinate system designed for the Apple II original and then converts it to the DOS 320x200 resolution at render time. Those changes will probably result in very small changes to the gameplay.

I've decided to try to move some stuff into scripts to reduce the amount of hardcoded arrays in the code with gameplay information. For instance, I've got all animations defined as external scripts. Here's what the turn animation looks like:

Code: Select all

Action Turn
MoveX 6; ShowFrame 45; Wait
MoveX 1; ShowFrame 46; Wait
MoveX 2; ShowFrame 47; Wait
MoveX -1; ShowFrame 48; Wait
MoveX 1; ShowFrame 49; Wait
MoveX -2; ShowFrame 50; Wait
ShowFrame 51; Wait
ShowFrame 52; Wait
Anim POP1_Kid_Stand
It's still a work-in-progress. For instance, I'd rather not refer to animation frames with magic numbers, so I want to implement a system where you can refer to animation frames using names.
Posts: 30
Joined: June 6th, 2004, 7:05 pm

Re: Fluffy's Prince of Persia

Post by FluffyQuack »

I kind of put this project on the backburner the last few months, but I went back to it a few weeks ago.

First of all, for the heck of it, here are some early screenshots I made in September.

This was at the very start of the project where I've got level data loaded and I'm rendering the general layout of level 2 in POP1, but without any actual graphical assets.
Screenshot0009.png (3.61 KiB) Viewed 16 times

First room in POP1 with many graphical assets implemented:

First room again, this time with more graphical assets implemented, including correct rendering of walls:

Zoomed-out view of level 1:

And now for stuff I've done recently, during the last 1-2 weeks. I added a toggle which uses render-to-texture so I can apply aspect correction to final render:

I added loading of POP2 level data. I haven't implemented graphics from POP2 yet, but here's the general layout of level 3 in POP2 rendered using POP1's dungeon tileset:

I started implementing the POP1 palace tileset. The wall rendering was a little bit of a doozy to implement (I kept looking for the main wall texture, but then I looked into SDL-PoP code and realized it's simply rendering solid colours). Here's an early version with wrong palette applied:

And here it is now after loading the correct palette and figuring out how SDL-PoP handles colours for the walls (I also added code for rendering the bottom 3 pixels of walls):
Post Reply