7drl Experience

This past week I built my first roguelike for the 7drl.org competition.

Let's start with the outcome: Play Rogue Caravan.


Rogue Caravan was written in JavaScript and was built using rot.js.

I decided to enter this project as it seemed like perfect timing. I am currently looking for a job as a web developer and it gave me an interesting and time-limited project to work on in order to better my JavaScript skills.


  • The most challenging aspect of developing this was my lack of knowledge of JavaScript. I am pretty comfortable with Ruby and Ruby on Rails, but JavaScript, while intriguing, was a relatively unknown beast for me.
  • Target selection: The bandits in the game choose either the player or an AI controlled trader as their targets. This process took many iterations to finally get working as intended, at first the bandits were simply randomly selecting either the trader or the player, then I got some slowdown because I was computing the paths too many times, finally I landed on comparing each enemies previous path to a new path and selecting the shortest one.
  • Forest generation: This wasn't too bad, but it took some thinking to figure out how to generate enough forest, but without making it too blocky and artificial looking.

Rot.js was a wonderful library to use and it made the challenges I would have faced much easier for my first roguelike, it is well documented and there are a number of solid tutorials available to work through. It does most of the heavy lifting when it comes to pathfinding and map generation, as well as some great features like lighting. I would highly recommend Rot.js to anyone looking to make a JavaScript roguelike.


  • I ended up with a complete and playable game.
  • I finally have a firm grasp on how "this" works in JavaScript.
  • I feel much more comfortable with JavaScript.

Before this project I was able to stumble through JavaScript, and while my code currently is still of relatively poor quality in my opinion, I gained an immensely better grasp on JavaScript. I would recommend that anyone interested in better learning a language or a particular framework enter any of the game jam competitions, I had a great time and the learning opportunity was wonderful.

7drl Experience
Share this