Creating a Classic 2D RPG Using HTML5


Our 2 day series on Developing 2D Games with HTML5 is a wrap! We had a lot of fun and covered some really awesome topics, so I thought I would add a day 2 recap ( looking for the day 1 recap? ) Oh and don’t worry if you missed the series, it will be available on demand very soon. Day 2 picks 2133_html5game_thumb_79E74295up right where day 1 left off in our journey to create a classic 2D RPG, so make sure to check it out as well.

Ok, so here are the topics we covered in Day 2:

  • NPC interaction
  • In-game store
  • Turn based battle system
  • Taking it farther

NPC interaction

This first module of day 2 looks at how we can add NPC (non player character) interaction to the game. In our implementation we extend our already existing functions that display our player stats and inventory to help us show NPC dialog. We start out showing how to add one NPC that just displays a message. Then we move on to adding extra “roles” for our NPC’s which leads us into our next modules nicely. This is a great starting point for implementing more advanced interactions.

In-game store

storeOk, so our player has an inventory, which is empty. We need a way for the player to purchase some items to fill it up. Enter our in-game store. In this module we add the store for our player to spend his in game credits. We use our freshly built NPC interaction system to help us get everything implemented. We look at topics like how to add multiple items, controls for selection,  and even simply checking if the player has the cash to pay for the item. This is a very cool module and should be of interest to anyone thinking about adding a store feature to their games.

 

Turn based battle system

What is an RPG with out an epic battle system? In this module we add our turn based battle system. We cover how to battleimplement a new NPC and role for our enemy. We walk through extending our NPC interaction system to support our battle mode. This includes player in battle controls, attacking to give damage, receiving damage, and of course win/lose conditions and gaining experience from the battles. If I had to pick a favorite module of the course, this would be it. It’s a really fun topic and is definitely worth the watch for any developer who is building an RPG game.

Taking it to the next level

This is the final part of the course where we add some thoughts around taking the game farther. We offer up some suggestions of things we would like to implement and talk about a few other directions. As always Bryan shares some great insights and strategies when thinking about taking a project to that next level. Who knows maybe we will come back and do a follow up series showing how to implement some of these ideas. This is a great watch if you are at that point where you are ready to extend the game.

What will you build?

Making a really cool game? Let me know about it! I absolutely love hearing about all of the awesome stuff you are building. So reach out and let me know. You can find me on twitter @ScruffyFurn

DOWNLOADS
Complete Project >>

Comments (0)

Skip to main content