Top Banner
Catching BIGFOOT Yan Cui @theburningmonk
87

Modelling Game Economy with Neo4j

Jun 24, 2015

Download

Technology

Yan Cui

In this talk I discussed our use of Neo4j to automate the balancing of the in-game economy for our MMORPG title "Here Be Monsters".
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Modelling Game Economy with Neo4j

Catching BIGFOOTYan Cui @theburningmonk

Page 2: Modelling Game Economy with Neo4j

WHO AM I?

Page 3: Modelling Game Economy with Neo4j
Page 4: Modelling Game Economy with Neo4j

1MILLION USERS

ACTIVE

DAILY

Page 5: Modelling Game Economy with Neo4j

250MILLION DAY

PER

REQUEST

Page 6: Modelling Game Economy with Neo4j
Page 7: Modelling Game Economy with Neo4j

location

Page 8: Modelling Game Economy with Neo4j
Page 9: Modelling Game Economy with Neo4j
Page 10: Modelling Game Economy with Neo4j

Starium

Page 11: Modelling Game Economy with Neo4j

500 Spots

Page 12: Modelling Game Economy with Neo4j

locationepisodic

Page 13: Modelling Game Economy with Neo4j

LONDON

2012

Page 14: Modelling Game Economy with Neo4j

NANJING

2013

Page 15: Modelling Game Economy with Neo4j

?2014

Page 16: Modelling Game Economy with Neo4j

locationepisodicmulti-player

Page 17: Modelling Game Economy with Neo4j

herebemonstersgame.com

iPad

buddies

Page 18: Modelling Game Economy with Neo4j

herebemonstersgame.com

iPad

buddies

Page 19: Modelling Game Economy with Neo4j

locationepisodicmulti-playerRPG

Page 20: Modelling Game Economy with Neo4j

3500

items

Page 21: Modelling Game Economy with Neo4j

700

recipes

Page 22: Modelling Game Economy with Neo4j
Page 23: Modelling Game Economy with Neo4j

1500

quests

Page 24: Modelling Game Economy with Neo4j
Page 25: Modelling Game Economy with Neo4j
Page 26: Modelling Game Economy with Neo4j
Page 27: Modelling Game Economy with Neo4j
Page 28: Modelling Game Economy with Neo4j

gamebalancing

Page 29: Modelling Game Economy with Neo4j

itemPricing

Page 30: Modelling Game Economy with Neo4j

itemPricing

Page 31: Modelling Game Economy with Neo4j

itemPricing

Page 32: Modelling Game Economy with Neo4j

itemPricing

Page 33: Modelling Game Economy with Neo4j
Page 34: Modelling Game Economy with Neo4j

Manual game balancing is SLOW

Page 35: Modelling Game Economy with Neo4j

It is REPETITIVE

Page 36: Modelling Game Economy with Neo4j

and worst of all...

Page 37: Modelling Game Economy with Neo4j

It is ERROR-PRONEand SUBJECTIVE

Page 38: Modelling Game Economy with Neo4j

there must be a better way...

Page 39: Modelling Game Economy with Neo4j

Hello, Neo4jThe rabbit hole sounds pretty good right about now!

Page 40: Modelling Game Economy with Neo4j

BIG

FO

OT

catc

hin

g

Page 41: Modelling Game Economy with Neo4j

locationbait

attraction rate

catch rate

Page 42: Modelling Game Economy with Neo4j

as a graph in Neo4j

Page 43: Modelling Game Economy with Neo4j

Bigfoot

Alice Lake

exists_inAlluring Goat

can_attract

Bigfoot Toenail Clippings

Musket-teer Traploots

can_catch

Omar Lake

exists_in

Page 44: Modelling Game Economy with Neo4j

BigfootAlice Lake

exists_in

Alluring Goatcan_attract

Bigfoot Toenail Clippings

Musket-teer Trap

loots

can_catch

Omar Lakeexists_in

Yowie

Yetican_catch

can_catch

Apprentice’s Workshop

can_

mak

e

GoatHoney

Yeti Fur

requires

loots

mak

es

Alluring Goat Recipe

requires requires

Beeswax

loots

Bee Hiveharvests

McDonald’s Farm

sells

loots

Goat’s Milk

harvests

London

exists_in

Peryton Fawn Decoy Recipe

requires

Peryton Fawn Decoy

makes

Page 45: Modelling Game Economy with Neo4j

BigfootAlice Lake

exists_in

Alluring Goatcan_attract

Bigfoot Toenail Clippings

Musket-teer Trap

loots

can_catch

Omar Lakeexists_in

Yowie

Yetican_catch

can_catch

Apprentice’s Workshop

can_

mak

e

GoatHoney

Yeti Fur

requires

loots

mak

es

Alluring Goat Recipe

requires requires

Beeswax

loots

Bee Hiveharvests

McDonald’s Farm

sells

loots

Goat’s Milk

harvests

London

exists_in

Peryton Fawn Decoy Recipe

requires

Peryton Fawn Decoy

makes

Page 46: Modelling Game Economy with Neo4j

BigfootAlice Lake

exists_in

Alluring Goatcan_attract

Bigfoot Toenail Clippings

Musket-teer Trap

loots

can_catch

Omar Lakeexists_in

Yowie

Yetican_catch

can_catch

Apprentice’s Workshop

can_

mak

e

GoatHoney

Yeti Fur

requires

loots

mak

es

Alluring Goat Recipe

requires requires

Beeswax

loots

Bee Hiveharvests

McDonald’s Farm

sells

loots

Goat’s Milk

harvests

London

exists_in

Peryton Fawn Decoy Recipe

requires

Peryton Fawn Decoy

makes

Page 47: Modelling Game Economy with Neo4j

BigfootAlice Lake

exists_in

Alluring Goatcan_attract

Bigfoot Toenail Clippings

Musket-teer Trap

loots

can_catch

Omar Lakeexists_in

Yowie

Yetican_catch

can_catch

Apprentice’s Workshop

can_

mak

e

GoatHoney

Yeti Fur

requires

loots

mak

es

Alluring Goat Recipe

requires requires

Beeswax

loots

Bee Hiveharvests

McDonald’s Farm

sells

loots

Goat’s Milk

harvests

London

exists_in

Peryton Fawn Decoy Recipe

requires

Peryton Fawn Decoy

makes

Page 48: Modelling Game Economy with Neo4j

~ 7000 nodes

~ 35000 edges

avg 5 degrees of connectedness

Page 49: Modelling Game Economy with Neo4j
Page 50: Modelling Game Economy with Neo4j
Page 51: Modelling Game Economy with Neo4j

gamebalancing(revisited)

Page 52: Modelling Game Economy with Neo4j

IMPACT ANALYSIS

Page 53: Modelling Game Economy with Neo4j

What’s the impact of upping

the price of “White Bread”?

Page 54: Modelling Game Economy with Neo4j

CRAFTS

RECIPE ITEMITEMIS_USED_IN

Page 55: Modelling Game Economy with Neo4j

MATCH (wb:BaseMarketplaceItem { Name:"White Bread"})

-[rel:CRAFTS|IS_USED_IN*1..]

->(i:BaseMarketplaceItem)

RETURN i, rel, wb

Page 56: Modelling Game Economy with Neo4j
Page 57: Modelling Game Economy with Neo4j

SCARCITY ANALYSIS

Page 58: Modelling Game Economy with Neo4j

How scarce is “Durian”

compared to “Dragonfruit”?

Page 59: Modelling Game Economy with Neo4j

EXISTS_IN

FRUIT TREE SPOTFRUITFORAGES

Page 60: Modelling Game Economy with Neo4j

MATCH (fruit)<-[:FORAGES]-(tree)-[:EXISTS_IN]->(spot)

WHERE fruit.Name=‘Durian’ OR fruit.Name=‘Dragonfruit’

RETURN fruit, tree, spot

Page 61: Modelling Game Economy with Neo4j
Page 62: Modelling Game Economy with Neo4j
Page 63: Modelling Game Economy with Neo4j
Page 64: Modelling Game Economy with Neo4j

QUEST LINES

Page 65: Modelling Game Economy with Neo4j

AWARDS

QUEST ITEMITEMREQUIRES

QUEST

UN

LO

CK

S

Page 66: Modelling Game Economy with Neo4j

What quests come after “Year of the Horse”?

Page 67: Modelling Game Economy with Neo4j

MATCH (q1:Quest { Name: “Year of the Horse” })

-[:UNLOCKS]->(q2:Quest)

RETURN q1, q2

Page 68: Modelling Game Economy with Neo4j
Page 69: Modelling Game Economy with Neo4j
Page 70: Modelling Game Economy with Neo4j

How would you model quest progression?

Page 71: Modelling Game Economy with Neo4j

1. Price Items

2. Enrich Model

3. “Price” Quests

Page 72: Modelling Game Economy with Neo4j

MONSTER HIERARCHY

Page 73: Modelling Game Economy with Neo4j

Catch me first.

No, catch ME first.

Page 74: Modelling Game Economy with Neo4j

IS_USED_IN

ITEMMONSTERCAN_ATTRACT

ITEMMONSTERLOOTS

RECIPE

CRAFTS

Page 75: Modelling Game Economy with Neo4j

MATCH (monster1:MonsterMarketplaceItem)

-[:LOOTS]->(loot)

-[r:IS_USED_IN|CRAFTS*0..]->(bait)

-[:CAN_ATTRACT]->(monster2)

RETURN monster1, monster2

Page 76: Modelling Game Economy with Neo4j
Page 77: Modelling Game Economy with Neo4j
Page 78: Modelling Game Economy with Neo4j

LONDON 2.0WE REWROTE THE ENTIRE SEASON 1

QUESTS TO MAKE THEM BETTER.

Page 79: Modelling Game Economy with Neo4j

TWICETHE FUN

Page 80: Modelling Game Economy with Neo4j

SEASON 1

SEASON 1(POST-REWRITE)

SEASON 2

Page 81: Modelling Game Economy with Neo4j

STREAMLINEDMORE

Page 82: Modelling Game Economy with Neo4j

QUALITY > QUANTITY

Page 83: Modelling Game Economy with Neo4j

TWICETHE AMOUNT

SUPPORTTO

Page 84: Modelling Game Economy with Neo4j

Neo4j to the rescue!

Page 85: Modelling Game Economy with Neo4j

Thank you!

Page 86: Modelling Game Economy with Neo4j

Here Be Monstershttp://www.herebemonstersgame.comhttp://apps.facebook.com/herebemonsters

Building a MMORPGhttp://bit.ly/1hjqoL8http://slidesha.re/18MD4XY

Google I/O 2013 – Here Be BigQueryhttp://bit.ly/1fHjbce

Page 87: Modelling Game Economy with Neo4j

WE’RE HIRINGwww.gamesyscorporate.com/careers