Thursday, April 04, 2013

How To Make An RPG: Decoration and Layers

I'm back in the UK and my jetlag is slowly fading so I'm able to press on with my new "How To Make An RPG" book.
A jRPG is made up of lots of different systems and the first systems covered in the book are to do with tilemaps. Just before my laptop died I had covered collision detection and was about to move on to layered tilemaps. 

Today I got on to layers and that's pretty much done now. The character can smoothly walk around this room, if he goes right to the bottom, he'll be hidden behind the wall, if walks up to the banners at the top he'll be rendered on top of them. Layers and decorative features are all in! This really allows for far more interesting maps, improves reuse of art assets (like the carpet and banners) and makes the game feel and look better.

Next I will be covering triggers on the map and actions that can occur in the world. The demonstration for this will be the character walking into one door and appearing out the other. 

Every single section of the book has associated example code. Just for getting the map rendered there are 21 separate example projects, each a small easily digestible stepping stone that leads you to a fully realized jRPG game. The character movement and layer code is currently at 10 examples and by the time the book is finished I'm sure there will a few hundred example programs.

If the book sounds interesting and want to learn more then please visit the mini-site over here and sign-up to the mailing list:


Unknown said...

I subscribed to your book project because I want to see the answer to this: I have an RPG project which implements a clunky way of doing this and I've love to see how you do it. Do you have an estimate for when your book will be available for purchase?

balaam said...

Cool stuff :D

For the maps, I'm using the Tiled program to make them. Every layer has 3 parts, the background - (floor, walls tiles), detail items (like tables, wall hangings etc) and a collision layer.

All my estimates have been terribly off the mark, so far :( The book will have 3 example games and I'm writing the first now. I'll send a mail out once I have the first draft done (still a few months away!) and then again once it's available to buy.