The Book

This site is built around the book "How to Make an RPG". But it's not just a book, oh no, you get the full source code to a multi-platform C++ engine, over $2500 worth of beautiful, bespoke pixel art, to use in any commercial project you please and over 100 examples showing you step by step how to build your own awesome RPG.

Buy Today

To get the book now, click the buy button below.

Buy Now.

What's it all about?

The book teaches you how to create, a feature complete, Final Fantasy 6 style game. But, more importantly, it teaches the deep fundamentals that mean you'll never make a game in the same way again. The games industry is bad at sharing knowledge, in fact sometimes, it's down right secretive. Resources on the web are generally terrible. Here's a book, written by a professional games programmer, that shows you how to actually go about making a game. That's one of the key take aways - how to structure and develop a full game, and how to think about that process. Want to level up your development practices? Want to get a insight into how things get made behind the scenes? Then this is for you.

Imagine having the power to create your own simulated world, knowing how it ticks from the inside and using it to run your own stories and adventures.

Want to sell the games you make using the engine? - No problem! In fact I whole-heartedly encourage it and if there's anyway I can help; please get in touch!

The book is split into three sections:

  1. Exploration
  2. Combat
  3. Questing

These are the three pillars of any RPG. You'll finish each of these sections by creating a small RPG. By the end of the book you'll be equipped to make any kind of RPG you please.

Who shouldn't buy this book

  • You've never coded before
  • You're a professional games programmer

If you've never coded before, this book is going to be tough, if you like to learn to swim by jumping into deep water, then ok, otherwise; learn some coding basics first. Professional game programmer? There might be some bits of interest for you here but a lot of the content you'll be familiar with. If you're coding your first RPG and want to a roadmap, then this it's worth getting, otherwise you don't need it!

Frequently Asked Questions

Here are some of the questions that have come up a couple of times. I'll extend this as necessary.

How Do I Run the Code Examples?

Download one of the example folders (start with Open tilemap-1, this is the first example. If you're on Windows run dinodeck_win.exe, if you're on mac run dinodeck_mac. On Mac you may have to right click and chose "Open" from the context menu.

If everything works, you'll see a little window like this:

A little window showing everything is alright with the world.

What Platforms Are Supported?

Windows and Mac currently.

How About Linux?

Not right now but in theory it's possible as all the libraries are cross-platform.

How much does the book deal with C++ code?

0%. There might a reference to C++ in passing but all code in the book is in Lua. This allows the book to concentrate on the logic of writing an RPG, rather than worrying about low level memory management, build processes, pointers and so on.

The Dinodeck engine, used in the book, is written in C++ but it's innards are not covered. The idea is the high level logic can carried across pretty easily to any engine or programming environment.

Do I Have to Download Lua, SDL or Some Other Library?

No! You shouldn't have to download anything that isn't already included.

To verify everything is working as expected visit the dinodeck site, download the Hello World program and try it out.

Dinodeck Tries to Connect to the Internet!

Dinodeck runs a local webserver that it uses for debugging. It can be turned off. Open settings.lua and change the following flag:

webserver = false

With that set to false, Dinodeck will not try to open a local socket.

How Do I Edit Lua Files?

All files ending .lua are just plain text files (like html). You can open them up in any text editor.

What Should I Use to Edit the Lua Files?

I use SublimeText, the free version is free forever and just has some nag screens (I support it and have a license :D).

Alternatively I hear Atom is quite good.

You could use notepad but there are far better options! Of course Vim and Emacs for the wizards are also fine but if you use these you probably won't be asking this question :)

Where Are the Art Files?

In a future version I'll make the art more accessible. Currently if you go to the following directories you'll find most of the art.


How did you make the art?

I searched out some talented pixel artists and commissioned them to make it. I can write an article about exactly how I did this, if there's interest. Let me know @howtomakeanrpg.

Is the Engine Source Available Yet?

Yes. You can check it out on github here.

Can I pay with paypal?

Yes. Initially this option wasn't available but has since been restored.

Everytime I Run an Example the Random Numbers Appear the Same

This is addressed in the book but quite late on. If the random number generator isn't seeded, it produces the same sequence of the numbers each time it runs.

Add this line somewhere near the top of your main.lua file and the random numbers will be different each time you run the program.

math.randomseed( os.time() )

On a 4K monitor some of the examples windows are tiny!

JRPG games of the type covered in the book have low resolutions and this can be a challenge on 4K monitors.

Dinodeck has a setting to scale up the entire window to make things easier to see. You need to add two lines to your settings lua file.

name = "Small Empty Room"
width = 256*2
height = 224*2
manifest = "manifest.lua"
main_script = "main.lua"
on_update = "update()"
webserver = false

-- New lines
-- Must be added *after* the `width` and `height` definitions.
display_width = width*2
display_height = height*2

There's more information about these settings online on the Dinodeck documentation page here.

Are any example RPGs included?

Yes! Each of three sections of the book ends with a mini-RPG game.

  1. The exploration section ends with a game called "Dungeon". It's mostly narrative, you're kidnapped and must escape a dungeon. There's a small puzzle too

  2. The combat section ends with a game called arena. You're in a castle courtyard and there's an arean where you can advance through the ranks to fight more and more enemies. This time you have a party, equipment system loot etc. Not much narrative here, as it's focused on combat.

  3. The final section is all about a fully-featured mini-rpg called "Cave Quest". This is still small but it has a plot, quest lines to solve, overworld map, puzzles, shops, inns, NPCs and cutscenes.

Is the How to Make an RPG book ever going to go on sale?

Never say never but there are no plans. But I'm am planning a price increase the first half of 2017.

Does the book cover sound effects and music?

Sound effects more than music and it's very brief. The first mini-rpg "Dungeon" has some sound effects but the later games don't. (I wanted to avoid retreading the same ground more than I had to!).

Dinodeck can play .wav files but there's currenlty no support for streaming music. This is something I'd like to change in the future.