Here Be Monsters – updates and hello, Neo4j

Here Be Monsters is one year old!

Big things are hap­pen­ing behind the scenes in the world of our episod­ic MMORPG Here Be Mon­sters, since the beta start­ed back in Sep­tem­ber 2012 we have attract­ed a small but ded­i­cat­ed group of play­ers who have watched the game grew with us and who has lived through the major­i­ty of the first two episodes of the evolv­ing sto­ry­line in Here Be Mon­sters and we thank every­one for their con­tin­ued sup­port and faith in our abil­i­ty to deliv­er.

 

Major refac­tor­ing on the way

We have learnt an awful lot this past year and over time we have added many fea­tures and capa­bil­i­ties to our sys­tem so that our game design­ers can con­tin­ue to cre­ate new and fun con­tents for our play­ers. After much delib­er­a­tion we have decid­ed to rework large parts of the first two episodes of the game (Europe and Nan­jing) because:

  1. our game design­ers can cre­ate much more inter­est­ing con­tents these days as they are no longer lim­it­ed by the sys­tem capa­bil­i­ties we had a year ago
  2. we have a bet­ter under­stand­ing of what types of con­tents our play­ers find most inter­est­ing and fun to play through feed­backs and analy­sis

 

We hope the refac­tored quest lines will be much more engag­ing and allow play­ers to see the best the world of Here Be Mon­sters has to offer. The new quest lines are under the last stages of test­ing and once ready will be avail­able for new play­ers join­ing the game from there after.

 

Bal­anc­ing the Econ­o­my

Bal­anc­ing a RPG, or any game for that mat­ter, is nev­er easy, and often:

  • labo­ri­ous – involv­ing many iter­a­tions of tri­al and error, and like­ly repeat­ed each time new con­tents are added
  • sub­jec­tive – what ‘feels’ right can vary great­ly from per­son to per­son

with hun­dreds of quests and recipes and thou­sands of items already avail­able in Here Be Mon­ster and many more added on a week­ly/bi-week­ly basis, man­u­al bal­anc­ing is sim­ply not a solu­tion that will scale, espe­cial­ly for a rel­a­tive­ly small team as ours.

 

Instead, we have opt­ed for a more auto­mat­ed process where by every item’s intrin­sic val­ue in the game can be eval­u­at­ed based on the val­ues of its inputs (e.g. bait for mon­sters, and ingre­di­ents for craft­ed items, etc.), the amount of time involved and your chance of suc­cess. Once we are able to def­i­nite­ly say what the intrin­sic val­ue of an item is, it can then be used to derive or quan­ti­fy oth­er less tan­gi­ble aspects of the game’s mod­el.

Eco­nom­ic val­ue of items

How much an item can be pur­chased with and sold for should be direct­ly pro­por­tion­al to the item’s intrin­sic val­ue.

Dif­fi­cul­ty and Reward for quests and achieve­ments

Many quests and achieve­ments involves acquir­ing items (via for­ag­ing, farm­ing, chip­ping rocks, etc.) or catch­ing mon­sters, and their dif­fi­cul­ty can there­fore be quan­ti­fied by the intrin­sic val­ues of the items/monster involved.

Once you can quan­ti­fy the dif­fi­cul­ty of quests and achieve­ments, you can then bal­ance their rewards against their lev­el of dif­fi­cul­ty so that play­ers are always appro­pri­ate­ly reward­ed for their efforts.

Pro­gres­sion through the game

Since the sto­ry­line of the game is large­ly dri­ven by a sequence of core sto­ry quests, and if you are able to quan­ti­fy the dif­fi­cul­ty of the quests you can then use that knowl­edge to ensure a smooth pro­gres­sion through the quests so that play­ers are giv­en tasks that are appro­pri­ate to their lev­el at that point in the game and not bored by dull, unchal­leng­ing tasks or; frus­trat­ed by tasks that are clear­ly beyond their abil­i­ty to com­plete with­in a rea­son­able amount of time and effort.

 

Of course, not every­thing is straight for­ward and there are many types of quests and items which we can’t eas­i­ly quan­ti­fy using our mod­el and at the same time we also don’t want the game to feel cold and for­mu­lat­ed so a guid­ed form of human sub­jec­tiv­i­ty is still very much a neces­si­ty in the process (although impor­tant­ly, as a sup­ple­ment rather than the dri­ving force).

Once again, this major change in the under­ly­ing eco­nom­ic mod­el is well under­way and very close to being released into the game, we cer­tain­ly have some excit­ing times ahead!

 

The Com­plex­i­ty Chal­lenge

One of the main chal­lenges that came up in our effort to auto­mate the eco­nom­ic bal­anc­ing was that we real­ly need­ed to under­stand the com­plex rela­tion­ships between the items, quests, achieve­ments as well as loca­tions and activ­i­ties that can be per­formed against/with spe­cif­ic items at spe­cif­ic loca­tions.

To look at a spe­cif­ic exam­ple, let’s con­sid­er everyone’s favourite myth­i­cal crea­ture, the Big­foot:

image

to catch the Big­foot (in order to cure him of the cor­rup­tion caused by Star­i­ums, no harms are done to crea­tures that you catch I must add), you need to con­sid­er:

  • loca­tion – Big­foot is only avail­able in par­tic­u­lar parts of the world
  • bait – to lure him out you need the Allur­ing Goat which gives you a rough­ly 4 out of 7 chance of see­ing the mon­ster
  • trap – you need a trap strong enough to hold him after you’ve man­aged to lure him out, and only the Mus­ket-teer Trap is strong enough for the task when it comes to the Big­foot, even then you only have 5 out of 7 chance of suc­ceed­ing (which is pret­ty good, con­sid­er­ing!)
  • loot – upon suc­cess­ful of a Big­foot you occa­sion­al­ly get a loot drop which you might need in future quests or to make oth­er items which requires the loot as an ingre­di­ent

Look­ing beyond the imme­di­ate con­nec­tions to the Big­foot, you have the Allur­ing Goat and Mus­ket-teer Trap which each have numer­ous con­nec­tions of their own.

To make the Allur­ing Goat, you need to gath­er

  • Hon­ey (which you need to har­vest from Bee Hives you have to build in your home­stead)
  • Goat (which you can buy baby goat from ani­mal traders in cities around the world such as Lon­don and Nan­jing)
  • Gold­en Hair (which is a loot drop when you catch Blonde Mer­maid, Dan­de­lion Pix­ie and Blonde Selkie mon­sters)
  • Fiery Hair (which is a loot drop when you catch Red­head­ed Mer­maid, Banksia Pix­ie and Red­head Selkie mon­sters)
  • Yeit Fur (which is a loot drop when you catch the Yeti mon­ster)

And sim­i­lar­ly the Mus­ket-teer Trap requires a num­ber of ingre­di­ents to make, each requir­ing their own ingre­di­ents and so on and so forth, you get the idea.

image image

There can be an arbi­trary lev­el of con­nec­tions between two items, some even recur­sive, and it’s nigh-on impos­si­ble for any one per­son to under­stand and ratio­nal­ize all of these con­nec­tions in order to make informed deci­sions around the design and val­i­da­tion of the pro­posed eco­nom­ic mod­el. We need­ed a way to store and query against these con­nec­tions to help us answer ques­tions about our data mod­el in order to build an eco­nom­ic mod­el that runs along it.

 

Hello, Neo

image

If you have been fol­low­ing the NoSQL move­ment the last cou­ple of years then you might have heard about graph data­bas­es. In case you have missed all the fun (and pub­lic con­fu­sion, debates and mis­guid­ed PR about what it is and why we should care), check out my slid­edeck below to get a quick intro­duc­tion to the vast land­scape of NoSQL.

 

One of the more mature and most wide­ly used graph data­base today is Neo4j, and whilst graph data­bas­es are most fre­quent­ly asso­ci­at­ed with social data (friends, fol­low­ers, etc.) thanks to the promi­nence of com­pa­nies that are oper­at­ing in that space, but they’re actu­al­ly very pow­er­ful and scal­able ways to store and query any form of high­ly con­nect­ed and/or com­plex data in gen­er­al and have use cas­es beyond mod­el­ling social data, includ­ing fraud detec­tion and net­work man­age­ment.

 

Dis­clo­sure : my employ­er, Gamesys, already uses Neo4j for a num­ber of social fea­tures in our real mon­ey gam­ing busi­ness so the choice of using Neo4j was an obvi­ous one since we already have both oper­a­tional knowl­edge as well as site license with­in the com­pa­ny. I didn’t go through a care­ful vent­ing process to decide which graph db to go with.

 

If you rep­re­sent every item in the game, ever loca­tion, recipe, mon­ster, fish, etc. as nodes on a graph and link­ing them with rela­tion­ships such as:

  • item A drops item B as loot
  • item A is avail­able at loca­tion X
  • mon­ster A can be lured by item B
  • mon­ster A can be caught by item B

you end up with some­thing along the lines of:

HBM-Nodes

This dia­gram illus­trates the high­ly con­nect­ed and com­plex nature of the data we’re deal­ing with, the result of us mak­ing a game where every­thing you can do and every item you find has a pur­pose and can be used for some­thing else.

Each node and rela­tion­ship also has a set of meta­da­ta asso­ci­at­ed with it, for instance the can_catch rela­tion­ship con­tains the prob­a­bil­i­ty (or catch rate) whilst the Mus­ket-teer Trap node con­tains the buy/sell price as well as stats of the trap and many more.

 

This dia­gram is also by no means an uncon­nect­ed sub­set of the over­all graph, for sim­plic­i­ty sake I have omit­ted many types of rela­tion­ship and con­nect­ed nodes. Visu­al­iz­ing the 5000+ nodes and around 25000 rela­tion­ships in Gephi (using a Neo4j plu­g­in), with the colour and size of the nodes rep­re­sen­ta­tive of the num­ber of con­nec­tions it has, this is what the inter­nal data mod­el for Here Be Mon­ster looks like from afar:

High-level

 

As you can see, the degree of con­nect­ed­ness varies great­ly, and for com­mon low-lev­el mon­sters such as Sylph, Sprig­gan, Sprite and Sala­man­der, they are each con­nect­ed to no less than 300 loca­tion, trap and item nodes.

Sylph

 

Sim­i­lar­ly, for com­mon ingre­di­ents such as Salt, which can be found through many items (e.g. most fish drops sea­weed and salt as loot when you catch them) and are used in the recipes of many items (Pas­try, Piz­za Base, Ketchup just to name a few)

Salt

 

With the inter­nal data mod­el cap­tured as a huge graph in Neo4j, we were then able to ask ques­tions that would have been dif­fi­cult or impos­si­ble to answer oth­er­wise.

To give you a few exam­ples.

 

Impact Analy­sis

An item can be con­nect­ed to oth­er items, quests, achieve­ments, mon­sters, and even lev­el up rewards through n-lev­els of con­nec­tions, so chang­ing the val­ue of an item can cause unfore­seen and unin­ten­tion­al knock-on effects fur­ther down the chain (think the but­ter­fly effect but in a minia­ture scale).

Neo4j allows us to start with the said item, eas­i­ly and quick­ly tra­verse through the graph to iden­ti­fy all the nodes that are con­nect­ed to it through arbi­trary lev­els of con­nec­tions.

 

Mon­ster Hier­ar­chy

By design, in order to catch those high-lev­el, rare mon­sters, you will first catch low­er-lev­el more com­mon mon­sters in the same fam­i­ly of relat­ed mon­ster as you need their loot to make the baits for high­er lev­el mon­sters.

Going back to the Big­foot exam­ple. You need to first catch the Yowie, use its loot to make the baits for the Yeti, and use the Yeti’s loot to make the bait for the Big­foot which rep­re­sents the top of this par­tic­u­lar chain and whose loot drop will then be used in future quests and/or mon­sters.

To under­stand the total amount of effort required to catch the mon­ster at the top of its chain, and to acquire its loot (which could be the goal if you need it to progress on a quest), you need to:

  • iden­ti­fy the mon­sters on the chain
  • take into account the attrac­tion rate and catch rate of the baits and traps capa­ble of lur­ing and catch­ing each of the mon­sters along the chain
  • drop rate of each monster’s loot and the amount of effort required to make the bait for the next mon­ster (time, suc­cess rate, num­ber of loots required, etc.)

Again, this is a dif­fi­cult ques­tion to answer con­sid­er­ing there are more than 100 live mon­sters and more are added reg­u­lar­ly, with many such chains lead­ing to one anoth­er.

image

 

Scarci­ty Analy­sis

As you explore the world of Here Be Mon­sters, you will find dif­fer­ent types of trees, plants, rocks, but­ter­flies, and many more, depend­ing on where you are. For instance, you can for­age duri­ans from duri­an trees, but duri­an trees are avail­able in cer­tain parts of the world as you can see from the screen­shots below.

image

image image

The scarci­ty of duri­an (and duri­an trees) is there­fore linked to the num­ber of trav­e­lable spots in the parts of the world where they duri­an trees are avail­able.

With Neo4j’s help, to under­stand the scarci­ty of items in the world it became a sim­ple query to aggre­gate the is_available_at rela­tion­ships between items and loca­tions. As you’ve prob­a­bly guessed already, this also applies to mon­sters and fish which are also avail­able at spe­cif­ic parts of the world.

 

So there, I hope you find these insights into the world of Here Be Mon­sters inter­est­ing and thanks to the guys at Neo Tech­nol­o­gy for build­ing such a won­der­ful prod­uct!

 

Links

Slides for my Intro­duc­tion to NoSQL talk

A good intro­duc­tion to graph data­bas­es and their use cas­es

Neo4j use cas­es

Gephi – a visu­al­iza­tion tool for graph data

Gephi plu­g­in for Neo4j

Graph Data­bas­es by O’Reilly (free down­load)