The RPG Book

This site is built around the book “How to Make an RPG”. But it’s not just a book, 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 an 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 example_1_explore.zip). 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.

Does the engine used in HowToMakeAnRPG support Linux?

No, it does not.

There are no plans to extend Dinodeck to Linux at this time. Some game developers who have purchased the book have used it in different engines - Love2d, Monogame, Unity etc, however does that type of porting isn’t touched on it the book.

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 you can use 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 VSCode is quite good or maybe search Zerobrane which is specialised for Lua - I have not tried it.

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?

The art is supplied as part of example code when you get access to the book. 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.

    examples_explore/dungeon-15-solution/art
    examples_combat/arena-2-solution/art
    examples_quest/quest-17-solution/art

How did you make the art?

I searched out some talented pixel artists and commissioned them to make it. I wrote an article exploring the options for buying art here: Where to get art for your game?.

What art is included?

There are six tile sets all 16x16. Four combat backgrounds. Attack and Spell special effects. Three character Portraits. Around seven enemy sprites and other small bits and pieces.

There are six NPCS with walk animations and three party members with walking animations and full combat animations.

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.

Every time 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 arena 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 to do this.

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 no support for streaming music.

If I make a game. Do I need to include you or the engine in the credits or can I leave all that out or what?

No there’s attribution required at all!

(Though if you run a website and want to give me a link, I’d appreciate it :))