TRPG in Javascript

Articles in the series:

  1. Getting Comfortable with CreateJS
  2. OOP and the Gameboard & Cursor

I love Turn-based Tactical Role Playing Games — that is TRPG’s — especially those in the vein of Fire Emblem. I enjoy how simple it is to play. The mechanics are easy to grasp: You have units, they have a movement rate, they have a fixed or ranged attack. Simple.

You can think of them like a game of chess with more personalized pieces. Each piece has a story and different capabilities. Like chess, the individual pieces are simple, but taken together create a game with multiple, layered strategies.

The medium lends itself to telling stories between and around the battles, even hiding slivers of the story in the battle itself, handing them out in small nuggets when the player accomplishes certain goals.

I’ve always wanted to build one of these games. Honestly, it was my wife who gave me the idea — a way for us to bond over a shared project. What could go wrong?

This post, and the ones to follow, represent my experimentation with building a simple TRPG. I don’t expect an actual AAA game to be produced from my random mutterings. Rather, I expect to develop a few new skills and a bit of knowledge in using HTML Canvas and the toys that go along with it.

I plan to use is CreateJS  which includes:

  • EaselJS  for flash-like canvas manipulation
  • SoundJS for managing and playing sounds in HTML
  • TweenJS for animations ( if needed )
  • PreloadJS for loading and managing assets ( if needed )

I’m also considering using Backbone and Underscore / Lo-Dash — though I understand that any of these tools may be rejected simply because of performance. What you may notice missing is jQuery. My early experiments found that it was far too large of a performance hit to use it in any intense canvas rendering. YMMV.

The experiments themselves will be built using a custom plugin I’m calling “Sandbox” — basically a codepen-like piece of software that runs within WordPress and stores all files locally. I may or may not share the plugin, depending on if there’s any interest.

Which brings me to the final thought of this little introduction.

Calling these articles “Tutorials” is overstating it. By miles. These are my blind wanderings and clumsy fumbling around the art and technology of game development.   All the examples are open source and covered under the MIT license ( which will accompany the JS files ). That means you can use them however you want. However, if you’re able, I would appreciate a link or a shout-out — if only so I can justify to my wife the time spent on these little experiments.

Thanks for reading and I hope you find these experiments useful.

Leave a Reply

Your email address will not be published. Required fields are marked *