Dungeons of Persia – lowrezjam24

Dungeons of Persia is a retro speed-puzzle dungeon-crawler, inspired by the original Prince of Persia by Jordan Mechner. Find the door to the next level by jumping over chasms, avoiding traps and defeating guards. Gameplay is turn-based but there is a real time 30 minutes counter so make sure your moves are swift and true. You can play online on https://slash.itch.io/dungeons-of-persia (works in mobile and desktop (preferedly)).

Lowrezjam is a challenge to create games in tiny 64×64 pixels viewports; I had been wanting to participate for a long time, but sadly have never managed to.

Following my revival of interest on Prince of Persia, and recalling an idea I have some months ago about a traditional roguelike based on it, I thought it would be a good idea to use the jam as a platform to test it out.

Concept for a Prince of Persia traditional Roguelike – March 29th

This is the story of how the game came to be. I used TypeScript, Pixi.js, Tiled, and GraphicsGale.

Part 0 – Building a team

July 21st, Prior to the jam

I started putting together the idea and then went into trying to form a team around it.

Initially, I envisioned gameplay to be similar to Paladin’s Quest, but with deeper dungeon crawling as allowed by better “hardware” (instead of the very limited simulation of a LCD display, which funnily would have fit more with the Tiger Handheld theme); it was to be much tighter packed, with the prince having to save the princess in 3 minutes, rushing through the dungeon fighting guards, getting potions and weapons, and avoiding traps. Each level would require finding the plate that opened the door to the next level. A lot of it stuck to the very end.

Paladin’s Quest, running in a fantasy LCD screen

Since the idea was to create a retro fantasy machine, I called the banners of Alzarac, to create the rendering of it, similar to the work he did for the Hatsune Miku Magical Drawing tablet project.

Also, I thought of using 8×8 sprites to represent 8×8 tile rooms. I contacted aguahervida about it (same artist of Monte del Diablo), but got no response initially. I also contacted old pal Quietgecko to create mono sounds, with the idea of them being similar to Prince of Persia DOS PC Speaker music and sound effects. He initially was interested although didn’t confirm.

I put together my ideas together in a mockup and a rough design document so I could convince them about it.

Note that in this initial ideation, rooms would be fixed (similar to Legend of Zelda 1 or Ananias Roguelike), and the dungeon was meant to be procedurally generated.

Part 1 – Foundations of the game

August the 1st, the Jam Starts

In the end, I managed to get the entire team onboard… let’s goooo!

I checked the optional themes list as they were revealed; nothing seemed to fit the project’s vision, so decided to ignore them at least initially (maybe something would fit down the road because you never know how it’s going to go).

Quietgecko wanted us to use the “Unusual Weapon” theme, having the prince’s weapon be a… fish. I quickly persuaded him to rethink his life choices.

Alzarac started working in the case. As for me, I was unable to work at all due to busy day, however I decided to use Knights of the Pun as the starting codebase (instead of Paladin’s Quest), which would affect some gameplay choices down the road. This day I just managed to duplicate the repo and clean up a tiny bit.

August 2nd

I iterated a bit with Alzarac as he continued putting work in the “case”, just to get the right feeling. Today he finished the geometry (yes, the case is fully 3D rendered!)

I started tweaking the KotP codebase to work with a new tiled map and tileset, lots of cleanup work to prepare and only leave what we would need. I also worked on the dynamic scaling, trying to reuse what was there for Knights of the Pun and Monte del Diablo, which in theory was super similar. In the end I found out that every project has its little nuances so had to redo a lot of it.

August 3rd

Alzarac continued working in the case, now with the texturing with a logo; we again iterated some ideas to get the right feeling. He thought it was a 48h jam and that time was super limited, but I let him know it’s 2 weeks long so we might have some time to improve a bit down the road.

I finally managed to finish the dynamic scaling thing too, and made it so that it would be easier to respond to changes in the overlay (I refactor all that weird logic into a component that could be parameterized with just the rectangle dimensions of the viewport and its position). The game now responds to the changes in the viewport for both portrait and landscape, unlike Monte del Diablo, where the display turns into the “Slashie Boi Color” on portrait, this one remains horizontal, hiding portions of the console as the vieeport stretched.

I also finished the adaptations to make “walk in the map” work in the trimmed down codebase. The Tiled map is now displayed correctly, and I wondered if it would be a good idea to have the game be fixed maps instead of procedural, to follow the design of the original Prince of Persia, with the player having the master the layouts of the levels to get good times.

August 4th

Further work and improvements in Tiled integration: the position of the player and enemies are now loaded directly from the Tiled file, overall improved the editor-to-game flow so it’s now super quick, any changes in the map are reflected in the game immediately.

Since I inherited the Monte del Diablo codebase indirectly thru Knights of the Pun, there’s a combat system in place already. I started thinking if I was to tweak it somehow or change it to make it unique. I also added a 5 minutes timer to complete the game and a game over sequence if now.

Alcaraz further worker in the case, adding a palace to the sticker and cool worn-out effects.

I placed a teaser online, people seemed to like my programmer graphics and palette choice; alas, it was to be short-lived.

August 5th

I didn’t manage to code anything… however, we found out Aguahervida was alive! He sent some sprites. Initially I was not fully convinced, I still liked mine more….

…but he’s the pixel artist, so we gotta trust him!

Part 2 – Making a game

August 6th

Moving on with making a game; I added the ability to pick up items and jump; as well as some visuals to flip the sprite based on the direction. I also did an initial design for level 1 which was meant to be introductory and of course pay homage to the original.

August 7th

The following days were constant work to build the interactivity, I mostly worked alone while the rest of the team was living their lives I think.

On August 7th I added navigation between levels, as well and gates that are opened by steeping on plates, because what kind of Prince of Persia game would this be without that; everything was supported by Tiled, with an Object layer and objects that had attributes to determine what gate was opened by what plate (including the stage door).

August 8th

I added acrobatic “long” jumps requiring running, that is walking in the same direction twice. This was going to be a very important part of the puzzle aspect of the game, since it’s easy to make a mistake and end up in a pit, having to restart the level and wasting a lot of time.

There was however another aspect that would be equally important and had to be addressed as early as possible: Combat.

As mentioned before, I inherited combat from Monte del Diablo, which is a full traditional roguelike with lots of roll-playing. At first the idea was to have this game be similar, with the player having to hunt for different types of weapons and equipment and have that setup be the most important part of the game, with full turn-based battles where that preparation would show.

However…

August 9th

However, as I tested combat, (and as I saw the time running out with things going out of control in real life) I couldn’t help but think it was not going to work; I would have to add a lot of content in the shape of items, and design a good roll-playing combat system around it, and ultimately it would probably not be compatible with the fixed maps nature. I needed to think of something else.

Then, it clicked: Combat had to be more active. I added the option for the player to actively block attacks from the enemy by timing “parry” style moves. It was something super simple but it worked fine and introduced the right amount of challenge without randomness, giving the player more control over the outcome of the battles and again worked well in the original reference.

We step away from the strategy roguelikey equipment / roll based idea. But it felt good.

Part 3 – Art

August 10th

Aguahervida sent the first version of the tileset. It’s growing on me, I’ll soon have to let go my beloved programmer art. It will be for good.

slashie’s original programmer art vs Aguahervida’s redesign.

Not much work was done this day. I added health indicators in battle, much need for combat.

August 11th

Quietgecko sent the first batch of cool music following the restrictions of the single-speaker fantasy console. He completely nailed it, of course. We wanted to introduce a lot of “noise” so that it felt like a cheap speaker, somewhat damaged even.

I continued testing the combat system, and improved blocking to use the arrow keys in the direction of the enemy (same as when attacking) instead of using the jump button. I had initially thought of having a separate “attack” or “parry” button, but it would have added more complexity that needed, and ultimately this worked better for potential situations where the player was surrounded by multiple enemies.

August 12th

I did the first integration of the new tileset, so mine was gone (I still thought maybe I could have it as an option in the final version, in case there was time (there is never enough time)). The biggest change is the perspective of the walls and the “borders”, so making the levels will have an additional cost of manually selecting the correct wall and wall-top tiles.

Part 4 – Content

August 13th

With the new tileset I had to almost remake Level 1. I warned Aguahervida not to change the position of tiles on any further edits else his life might be on danger.

QuietGecko also send some sound effects, which I integrated into the game. The tileset is still missing some pieces, worked together with Agua to fill them.

I went full into map making mode, made levels 2, 3, 4… and decided to do an initial playtesting of the game and found out that… we had a playable, challenging game, with good speedrunning moments, it felt good!

End of day I uploaded a test build for the rest of the team to check out.

August 14th

We still didn’t have an ending sequence! I didn’t even know what the final goal of the game was going to be. In the end, we decided to reference another iconic moment of Prince of Persia classic history: the escape in the flying carpet. I’m not going to spoil it but we had some fun with this segment.

I addressed some comments from the team about usability. However, there was something bigger that was putting the game at risk: I felt I was running out of ideas to make new maps for the game. We only had 3 maps so far!

I asked the team for help, I needed ideas or even full layouts. Alzarac stepped on it, and sent some designs for levels.

This one didn’t make it, sadly.

Converting these designs to Tiled maps was super fun; being able to add visual details and make small tweaks while having an overall pre-made design really lifted a lot of weight from my shoulders. teamwork yay.

In the end, I decided to close the scope with just 5 polished levels out of the 8 that I was initially aiming for.

Ah, the artists. Just end of day Gecko sent a big batch of new sound effects to integrate. We had the plans to make the “case” feel more alive including changing the state of the buttons as you pressed them, and providing audio feedback. That last part, at least, managed to ship with the jam version. Aguahervida also sent a new version of the tileset.

August 15th – The mad dash to the finish line

While dealing with IRL things, I had about 3 hours to wrap up things. Playtesting the midnight before had shown a couple of showstoppers, time to fix them!

In the middle of the craze, I managed to included yet another fun nod to the original PoP that I won’t spoil either but I think, if Jordan ever plays this game (and manages to reach Level 4), he would enjoy!

Just 10 minutes after the deadline, I risked adding an indicator so that it was more clear when you were running and could perform long jumps. It was risky but probably needed for clarity. The last commit I sent was August 15, 2024 at 11:58:16 AM GMT-5, less than 2 minutes before the deadline.

We managed to publish in time.

Part 5 – Post Jam

August 15th, the parts that didn’t make it

The jam rules are clear, so I had to cut the jam version clean at noon. However, after some playtesting, I found a couple of small things that improved the experience a bit, I took the liberty to edit some of the player and enemy sprites to make them more clear, and replaced the run indicator with a “running” sprite for the player.

August 16th, I know the jam is over already

We started getting some feedback about the game, people love the retro case visuals and the sounds. Gameplay… is ok, not bad, but nothing super exciting. Friends complain it’s too hard, because of course I cannot make a game that is not frustrating.

Yeah, I know the jam is over already, but there are some things still pending being integrated, and some ideas floating in the air that need to be put at rest; I added visual feedback for the key pressed on the case, touch controls so it’s playable on mobile, and a new stage: a final battle vs the Vizier.

I also did some important fixes on the sound effect on battle, and added some missing animations and sound effects.

The game, I think, was complete with all I wanted to be there for a first version; we were short one day for the jam.

August 22nd, the results of voting

It’s been one week, we got some good feedback on our entry, and the rankings were not bad either! in any case, I’m happy I was able to get this idea out of my head, and I hope people likes it and maaaybe someone dares speedrun it? 🙂

1 Comment

Leave a comment