Wednesday, December 03, 2014

Brief book update

Work continues on the How to Make an RPG book.

I'm somewhere near the end of the combat section. Nearly everything is finished, there are spells, counter-attacks, item use, special moves (steal and an omin-slash), fleeing and the basic melee attack.

My major slowdown is revising the code as I go and this means reworking all the previous examples and text. Recently I wasn't happy with determining how long combat events should take - it was difficult to make a Fire spell take 2x the time of a melee attack for instance. I changed that and that's the last change I want to make with combat.

The immediate next actions are to do the example game at the end of the combat section and create an art brief to hire an artist for the new combat related sprites and backgrounds.

I will be travelling a lot in December but I hope to get combat finished regardless.

Tuesday, December 02, 2014

Reductionist Game Design

Reductionist Game Design is a pretty fancy name, here's what I mean:
  1. Look at some games
  2. Break the game down into functional systems 
  3. Use these as building blocks to make other games.
This is my default mode when thinking about games. Raph Koster gave a great talk entitled "Practical Creativity - A way to invent new kinds of video games". I shared it on twitter this morning.
I made some further comments but I think it's easier to explain what I thought in a blogpost.


It's an interesting talk but very reductionist; giving the impression narrative and game mechanics can be cleanly separately. I think this is often true but not always true. A specific example comes to mind to illustrate this from Telltale Game's The Walking Dead. This segment of the game is resistant to being easily separated into mechanic and narrative.

Mechanic and Narrative


Walking Dead, if you haven't played it, is a narrative heavy zombie apocalypse game. At one point you're holed up at a barricaded motel with a group of survivors. Food is running low and people are tense. You've traveled with this group for a while and have your own personal feelings about each member.


Now to the gameplay: you're asked to hand the last of the food and there's not enough for everybody to eat. You're going to chose who gets to eat.

Mechanically this is pretty simple, it's visiting some "nodes" and selecting a subset of them, barely a mechanic at all. But the process of doing it and seeing the character's reactions, is far stronger than if you were merely an observer watching this take place in a film or series. The narrative and the mechanic are strongly linked. You're weighing up all sorts of things; how much you like a person, how much they need the food, how useful they'll be to the group etc these thoughts all depend on the person playing the game.

If you separate the mechanic and narrative and try to fit them together with different systems - you lose something. There's something else going on that hasn't been accounted for, some hidden system that I don't really know how you'd go about reducing or abstracting out.

Killing the Joke

This reminds me of a quote I've often seen repeated on the internet
“Explaining a joke is like dissecting a frog. You understand it better but the frog dies in the process.”
If you dissect a frog you learn a lot about how frogs work but the frog dies and even if you put all the pieces back it doesn't come back to life.

Saturday, October 18, 2014

How to Make an RPG: Advanced Combat Update


Time for an update! As you may or may not know I'm writing a book about creating old school RPGs as found on the SNES. Thanks for the continuing patience, for anyone who is actively following this book-writing sojourn.

Basic combat has been working nicely for a while now. You attack enemies - special effects fire-off, numbers bounce ... all that good stuff is working. The game over state is in (when you're defeated) and combat summary states (when you win).

The combat summary has two screens; a screen showing XP and any level-ups, then a loot screen breaking down the gold and sweet, sweet loot you found.

There's a lot of stuff happening behind the scenes; enemies have loot tables, there's a lot of state handling and hooks into the inventory and levelling system. I've been writing all that up for the book too.

Getting that XP!

Sweet, sweet loot.
After basic combat comes .... advanced combat! 

Basic combat takes the attack stat of the attacker and subtracts it from the enemy HP. It was very simple and did the job but a real game needs a bit more flavour.

The new combat system handles Missing, Dodging, Critical and Counter attacks. Check out the video at the top to see it in action. The new combat system shows text when special events occur such as "Miss", "Dodge" etc


Missing!
Next up I'll be adding fleeing, items, magic and special attacks. Then that's combat done ... apart from the end of section mini-game.

A Look At the Marketing 

I've been reading http://www.kalzumeus.com/blog/ where patio11 blogs the creation and marketing of a software product, sharing the numbers and strategy along the way. I found it addictive reading.

I'm obviously not a rational actor in the economic sense - I'm writing this book and I will sell it but it's not the most profitable side project I could have undertaken. Still it's one I'm enjoying and at the end I'll have a nice codebase.

My basic plan
  1. Validate that there's some kind of market
  2. Write the book   →  where I am now ... still
  3. Sell the book
  4. Do marketing
Currently I have 1,674 people on the mailing list, which I think is great! My goal is to sell at least 1000 copies and I think that could be hard work but it's the goal.

I'm not actively building my mailing list because after I registered 1000 people I'd proved there's some interest. Best practice is to actually have people put money down in step 1 but I didn't feel comfortable doing that. Also I've been in step 2 for over a year now ...  people would definitely have become impatient at this point :D


All my focus is on writing the book currently. Nearly every morning I write a bit more of the book, build a bit more of the code base and keeping pushing things forward. There's a lot of work just surrounding that; formatting the final .pdf (or epub .... maybe not right away), ensuring the underlying engine builds on all platforms, proof-reading it all, adding illustrations etc etc.

Then I'll probably add a blog to the howtomakeanrpg site and actively do a bit of SEO. I'd really like to be on the first page for "how do I make an rpg" but it's not happened :D (despite there being pretty much no competition!) As fun as it might be to tinker with SEO now, my focus is on book writing (apart from when I'm writing multi-page blog posts... obviously)

The website gets about 150 hits a month (100-200) all from organic search and I get 23.25% conversion to the mailing list; which actually seems pretty crazy high. And a 18% abandonment rate which also seems high ... I'm not going to fiddle with these though, not yet! This means my list grows by ~35 people a month, which sounds about right. This growth rate suggests I've been collecting emails for 4 years! It has not been that long - thankfully -  I had a sign-up-burst at the start because when I was in step 1 I was actively building the list. 

I use Google Analytics to track the "funnel" which I vaguely remember being:

  1. Visit my page (you can only sign-up)
  2. Type in your email
  3. Confirm the email 
  4. Get redirected to my thanks page.  
 I track these steps and that's how I get my numbers. Well, hope that was a fun update!

I'm going to be buying art for the combat section soon, so if you're an awesome pixel artist contact me!


Friday, August 08, 2014

JRPG Combat

Visiting the Big Buddha
Family visited me in Hong Kong this week. Great to do some touristy stuff but I didn't do my normal morning writing for the How do I make a RPG book. The plan is to crack on this weekend and get the combat to a state were people are hitting each other!

Saturday, July 26, 2014

JRPG Combat

I'm finally knee-deep in the combat section of my next book "How to make an RPG". The book takes the reader from nothing to an old school Final Fantasy 6 like game. This is a bigger task than I first anticipated but things are going well!


Adding combat, still struggling to find a good gif solution on mac. Note: All art assets are placeholder.




In the last post I had a Combat Table of Contents like this:
  1. Intro
  2. Stats
  3. Levels
  4. Party
  5. Equipment 
It's currently like this:
  1. Intro
  2. Stats
  3. Levels
  4. Party
  5. Equipment 
  6. Combat Flow - creating an event queue
  7. Combat State - basic layout for the combat state
  8.  Combat Action - putting the last two pieces together with animations and more UI
Each section of my book ends with a little game. In the combat section you'll start off in small room like below (this is all horrible placeholder art). Once I have all the examples functional I'll hire and artist to make things prettier.
You can talk to the NPCs and recruit them to your party. The chests are full of equipment you can equip for your party members.

It's all pretty similar to the Final Fantasy or Dragon Quest games.

Once you're tooled up you can enter the big door at the top (my excellent programmer art skills have used many small doors to make one big door.) Then you get into combat.


Note that the enemy sprite has been stolen from FF6, that is also placeholder. As well as the background; I don't even know where I found that. This is where I am at the moment, combat is entered, the first party member is prompted to take an action and I need to finish implementing the Selector state to let you choose which enemy to hit.


There's a lot of detail involved in JRPG combat, the base is the event queue which controls when  events take place (attacks, spells, player command prompts etc) but there's also a lot of state information for each character :

  • Are they casting a spell?, 
  • What animation should they be playing?, 
  • Did they just die? 
  • etc 

Then there are animations and special effects. Also a way is required to select enemies and allies in order to direct an attack or spell. There's also loot and exp tracking. The general UI flow;  presenting players with a party member's combat commands or displaying the inventory. There's a lot to cover!

The next immediate tasks are selecting an enemy to attack, adding the add event to the event queue and having it play out. Then doing a very simple attack calculation and applying it to the enemy. Then fleeing, then items, a more complicated attack calculation and finishing up with some simple enemy AI.

Sunday, May 18, 2014

Another laptop to the laptop-god to adorn his laptop throne.

Hey there, I haven't written in a little while but I'm still pushing forward with my next book howtomakeanrpg.com.

My SSD drive died last week, which means a week of far slower work. It's pretty frustrating but I made do as best I could with traditional pen and paper. I've been working out what chapters I'll tackle next and how to present the a simple combat formula.

Trying to keep progress up even without a laptop.
A while back I stopped writing the book and instead ran ahead just writing the code. I created all the ingame menus and some related systems. This last few months has been integrating those menus and system into the book code and writing it all up. It's not been as fun! RPG's have so much UI, so so much. I really want to get into the meat of the combat but everytime I think I'm there, there's more UI that needs writing first.

The Combat section chapters current looks like this:
  1. Intro
  2. Stats
  3. Levels
  4. Party
  5. Equipment

Recent progress has included a small combat test map, the player can walk around the map and talk to NPCs. The NPCs can be recruited into the player's party and then investigated using the in-game status menu.

Today I'm continuing the Equipment section.I know it's going to feel quite cool when you can find weapons and armour on the map and equip them on your characters.

Yesterday was setting up my laptop again including the build system for the engine. I hate build systems. It's somewhat working but not as well as I'd like. The biggest offender is FTGL, the font library, it's build system doesn't seem to be very mac friendly, package managers seem to fail to install it and even worse I've modified some of the code, so I could have better text alignment. I think ripping it out and replacing it maybe prudent at some point. For the book, it's not going anywhere, it's far too easy to get distracted as it is!

By the end of the day, the equipment menu should be totally in and functional. I'm thinking the next chapters will be Combat Flow, Enemies, Combat State, AI.

All these systems translate into 3d nicely.


Once I've finished the chapter I'll find an artist and commision some art so it doesn't look terrible :)

Monday, April 07, 2014

How To Make An RPG: Party Members

I'm still plugging away at the How To Make an RPG book and I'm currently doing some of the menus related to combat. Before I get into combat the classes for the combatants need designing and the data for all the party members and monster needs writing. A lot of that's done now, I'm just hooking it into the menus like you see above. The portraits are placeholder at the moment once I've completed the demo for this chapter I'll have some art made.

The immediate next step is making the status screen work. Then probably the equipment screen. RPGs have a lot of UI!

Wednesday, March 19, 2014

New Ground

How did I set up maps again?
I'm getting into the equipment part of the combat section of my book How to Make an RPG. I'm going to see if I can carve out a chunk of time this weekend to really press on with it, this week has not been great for progress. At the moment I'm setting up a simple map with some chests so the character can find different weapons. I'm also integrating the stats and levels code back into the current code base. I want the equipment screens finished by the end of the weekend.

Thursday, March 06, 2014

Brief Update

I'm continuing writing the How to Make an RPG book.
This week I finished off the section about Stats and all the related example code. I'm nearing the end of the levels and levelling section. Then I'll be taking a little time to revisit the in game menus adding a status screen and maybe a battle summary screen. After this I'll move on to equipment, equipment menu screens and soon enough I'll be tackling the combat simulation itself.

I'm looking forward to getting the first battle setup and working. That will be fun, I need to get some art from somewhere so I'll probably start looking for outsourcers again soon.

I've been using Unity a lot for work recently and I'm really enjoying it there's definitely a lot of scope for rapidly making games that are high quality, especially 3d games. The only downside is that's a closed, so one day it could all go away but I hope not. I think Bitsquid probably has the better design philosophy but Unity has the traction and interface / tooling.

Thursday, February 27, 2014

Back in RPG Combat

Hello!

I've been plugging away at my next book, How To Write an RPG, and I'm currently writing the first part of the combat section; Stats. It's similar to my article on Stats published on this blog, but slimmed down and every step of the way there's accompanying example code.

Since the last update I've checked all the previous examples in the book work on Mac and everything seems good.

Previously the sound code wasn't working on Mac, this was because I was using some Wave loading code I'd found somewhere and it wasn't 64-bit compatible. It was relying on the bit-size of some types when reading .wav code. Changing the types sorted that out. Also it wasn't using using my packaging system so I fixed that too. I won't be making anymore engine changes for a while, instead I'm now 100% back to writing.



I expect to have the Stats section and code examples finished very soon, then I'll be on to the levelling section and examples, then how to present that information using the existing menu code.

Thursday, February 13, 2014

General Update

I thought a general update might be in order. I'm living in Hong Kong now and settled enough to continue working on the RPG book regularly. It's freezing here at the moment!

There are currently 1.1k signups to the mailing list, which definitely shows some interest. I'm holding off doing any more explicit promotion until nearer the release (still somewhat hazy at the moment!)

You can learn more about the "How to Make a JRPG" book by visiting the site here.


I've not taken a good picture of Hong Kong yet :D

My writing time hasn't been great recently. I've lived in four different places in the year and in that time I've had two laptops die. One an old laptop that was near it's end, the other a brand new high spec Sony Vaio (I'm glad they're selling the division) which died after a few weeks and took about three months of calling to get a refund. All in all a terrible experience, I wouldn't use a Vaio if I wasn't given one for free. In the end I bought a Macbook Pro because of the reputation for being reliable.

The RPG book uses an engine written in C++, OpenGL (and a few other libraries) all made for Windows machines. It also compiles to Android but not the Mac. This last week I've been porting the engine to Mac (where port is more a case of getting the build script working). Yesterday, I built the first Mac version. I'm totally new to the Mac ecosystem, so I don't know how distributable the program I have is, but working is a good enough benchmark for now!

JRPG game on the Mac
The sound currently isn't working but everything else seems ok.

So what's next?
I'm currently on the combat section of the book and I've been sharing some of my ideas via the blog here:
  1. JRPG - Stats
  2. JRPG - Levels
My net immediate tasks for the combat section are roughly as follows:
  1. Check all the examples run on Mac
  2. Fix up the problem with the Mac not playing sound
  3. Write the stats and levels section of the book with code examples
  4. Cover the UI for the levels and stats and write the example code
  5. Write an article on simulating the combat (it will be similar to how I presented it in my article How to Build a JRPG, over on tutsplus.)
  6. Various other steps (defining enemies, weapons etc)
  7. End the chapter with an arena style game
 That's what I'll be doing in the coming weeks and I'll be sharing my progress here.