Modelling game economy with Neo4j OSCON
Transcript of Modelling game economy with Neo4j OSCON
![Page 1: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/1.jpg)
Modelling Game Economy with Neo4j
Yan Cui (@theburningmonk)
![Page 2: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/2.jpg)
![Page 3: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/3.jpg)
1MILLION USERS
ACTIVEDAILY
![Page 4: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/4.jpg)
250MILLION DAY
PERREQUEST
![Page 5: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/5.jpg)
noSQL = MongoDB
![Page 6: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/6.jpg)
stolefromloves loves
enemy
enemyA Good
Man Goes to War
appeared in
appeared in
appeared in
appeared in
Victory of the Daleks
appeared inappeared in
companion
companion
enemyappeared in
appeared in
planet prop
species
species
species
character
character
character
episode
episode
![Page 8: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/8.jpg)
Graph DBs are great for modelling complex domains
![Page 9: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/9.jpg)
Leonhard Eulerinvented Graph Theory in 1736
![Page 10: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/10.jpg)
Leonhard Eulerinvented Graph Theory in 1736
(that’s 275 years before Edgar Codd formulated the relational model)
![Page 11: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/11.jpg)
Find a walk through the city that would cross each bridge once and only once.
![Page 12: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/12.jpg)
Eliminate features to leave just the land masses and the bridges.
![Page 13: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/13.jpg)
Land masses became vertices, and bridges became edges.
![Page 14: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/14.jpg)
![Page 15: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/15.jpg)
location
![Page 16: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/16.jpg)
![Page 17: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/17.jpg)
![Page 18: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/18.jpg)
![Page 19: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/19.jpg)
500+ Spots
![Page 20: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/20.jpg)
locationepisodic
![Page 21: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/21.jpg)
Season 1 London
![Page 22: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/22.jpg)
Season 2 Nan Jing
![Page 23: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/23.jpg)
locationepisodicmulti-player
![Page 24: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/24.jpg)
herebemonstersgame.com
iPad
buddies
![Page 25: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/25.jpg)
locationepisodicmulti-playerRPG
![Page 26: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/26.jpg)
4000 Items
![Page 27: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/27.jpg)
800 Recipes
![Page 28: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/28.jpg)
![Page 29: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/29.jpg)
1500+ Quests
![Page 30: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/30.jpg)
![Page 31: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/31.jpg)
100+ Monsters
![Page 32: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/32.jpg)
![Page 33: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/33.jpg)
![Page 34: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/34.jpg)
gamebalancing
![Page 35: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/35.jpg)
itemPricing
![Page 36: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/36.jpg)
itemPricing
![Page 37: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/37.jpg)
itemPricing
![Page 38: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/38.jpg)
itemPricing
![Page 39: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/39.jpg)
I’ll just change this one thing…
![Page 40: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/40.jpg)
![Page 41: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/41.jpg)
manual game balancing is SLOW
![Page 42: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/42.jpg)
it is REPETITIVE
![Page 43: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/43.jpg)
ERROR-PRONE!SUBJECTIVE
![Page 44: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/44.jpg)
there must be a better way...
![Page 45: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/45.jpg)
Hello, Neo4j
![Page 46: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/46.jpg)
BIG
FOO
Tca
tchi
ng
![Page 47: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/47.jpg)
location baitattraction rate
catch rate
![Page 48: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/48.jpg)
as a graph in Neo4j
![Page 49: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/49.jpg)
Bigfoot
Alice Lake
exists_in
Alluring Goat
can_attract
Bigfoot Toenail Clippings
Musket-teer Trap
lootscan_catch
Omar Lake
exists_in
![Page 50: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/50.jpg)
nodes & edges can have!arbitrary properties
![Page 51: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/51.jpg)
Bigfoot
Alice Lake
exists_in
Alluring Goat
can_attract
Bigfoot Toenail Clippings
Musket-teer Trap
lootscan_catch
Omar Lake
exists_in
Strength = 502!Speed = 201!Intelligence = 184
Strength = 420!Speed = 210!Technology = 240
![Page 52: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/52.jpg)
Bigfoot
Alice Lake
exists_in
Alluring Goat
can_attract
Bigfoot Toenail Clippings
Musket-teer Trap
lootscan_catch
Omar Lake
exists_in CatchRate = 0.774
![Page 53: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/53.jpg)
Bigfoot
Alice Lake
exists_in
Alluring Goat
can_attract
Bigfoot Toenail Clippings
Musket-teer Trap
lootscan_catch
Omar Lake
exists_in
Buy Price = 20BN!Sell Price = 482 Gold!Sellable = true!…
![Page 54: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/54.jpg)
Bigfoot
Alice Lake
exists_in
Alluring Goat
can_attract
Bigfoot Toenail Clippings
Musket-teer Trap
lootscan_catch
Omar Lake
exists_inDropRate = 0.1
![Page 55: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/55.jpg)
BigfootAlice Lake
exists_in
Alluring Goat
can_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
requires
Peryton Fawn Decoy
makes
![Page 56: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/56.jpg)
BigfootAlice Lake
exists_in
Alluring Goat
can_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
requires
Peryton Fawn Decoy
makes
![Page 57: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/57.jpg)
BigfootAlice Lake
exists_in
Alluring Goat
can_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
requires
Peryton Fawn Decoy
makes
![Page 58: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/58.jpg)
BigfootAlice Lake
exists_in
Alluring Goat
can_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
requires
Peryton Fawn Decoy
makes
![Page 59: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/59.jpg)
![Page 60: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/60.jpg)
![Page 61: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/61.jpg)
![Page 62: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/62.jpg)
gamebalancing(revisited)
![Page 63: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/63.jpg)
impact analysis
![Page 64: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/64.jpg)
What if I increase the price of
“White Bread”?
![Page 65: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/65.jpg)
CRAFTS
RECIPE ITEMITEM
IS_USED_IN
![Page 66: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/66.jpg)
MATCH!
(wb:BaseItem { Name:"White Bread"})!
-[rel:CRAFTS | IS_USED_IN*1..]!
->(i:BaseItem)!
RETURN i, rel, wb
![Page 67: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/67.jpg)
MATCH!
(wb:BaseItem { Name:"White Bread"})!
-[rel:CRAFTS | IS_USED_IN*1..]!
->(i:BaseItem)!
RETURN i, rel, wb
Node-[rel]->Node
![Page 68: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/68.jpg)
CRAFTS
RECIPE ITEMITEM
IS_USED_IN
Node-[rel]->Node
![Page 69: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/69.jpg)
MATCH!
(wb:BaseItem { Name:"White Bread"})!
-[rel:CRAFTS | IS_USED_IN*1..]!
->(i:BaseItem)!
RETURN i, rel, wb
![Page 70: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/70.jpg)
MATCH!
(wb:BaseItem { Name:"White Bread"})!
-[rel:CRAFTS | IS_USED_IN*1..]!
->(i:BaseItem)!
RETURN i, rel, wb
![Page 71: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/71.jpg)
MATCH!
(wb:BaseItem { Name:"White Bread"})!
-[rel:CRAFTS | IS_USED_IN*1..]!
->(i:BaseItem)!
RETURN i, rel, wb
![Page 72: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/72.jpg)
MATCH!
(wb:BaseItem { Name:"White Bread"})!
-[rel:CRAFTS | IS_USED_IN*1..]!
->(i:BaseItem)!
RETURN i, rel, wb
![Page 73: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/73.jpg)
MATCH!
(wb:BaseItem { Name:"White Bread"})!
-[rel:CRAFTS | IS_USED_IN*1..]!
->(i:BaseItem)!
RETURN i, rel, wb
![Page 74: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/74.jpg)
![Page 75: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/75.jpg)
![Page 76: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/76.jpg)
![Page 77: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/77.jpg)
![Page 78: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/78.jpg)
![Page 79: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/79.jpg)
RECIPE
White Bread
IS_USED_IN
ITEM
CRAFTS
MONSTERATTRACTS
RECIPE
IS_USED_IN
ITEM
CRAFTS
ITEMLOOTS
RECIPEIS_USED_IN
ITEMCRAFTS
IS_USED_IN
RECIPEIS_USED_IN
CRAFTS
![Page 80: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/80.jpg)
RECIPE
White Bread
IS_USED_IN
ITEM
CRAFTS
MONSTERATTRACTS
RECIPE
IS_USED_IN
ITEM
CRAFTS
ITEMLOOTS
RECIPEIS_USED_IN
ITEMCRAFTS
IS_USED_IN
RECIPEIS_USED_IN
CRAFTS
![Page 81: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/81.jpg)
MATCH!
(wb:BaseItem { Name:"White Bread"})!
-[rel:CRAFTS | IS_USED_IN*1..]!
->(i:BaseItem)!
RETURN i, rel, wb
![Page 82: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/82.jpg)
RECIPE
White Bread
IS_USED_IN
ITEM
CRAFTS
MONSTERATTRACTS
RECIPE
IS_USED_IN
ITEM
CRAFTS
ITEMLOOTS
RECIPEIS_USED_IN
ITEMCRAFTS
IS_USED_IN
RECIPEIS_USED_IN
CRAFTS
![Page 83: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/83.jpg)
RECIPE
White Bread
IS_USED_IN
ITEM
CRAFTS
MONSTERATTRACTS
RECIPE
IS_USED_IN
ITEM
CRAFTS
ITEMLOOTS
RECIPEIS_USED_IN
ITEMCRAFTS
IS_USED_IN
RECIPEIS_USED_IN
CRAFTS
![Page 84: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/84.jpg)
RECIPE
White Bread
IS_USED_IN
ITEM
CRAFTS
MONSTERATTRACTS
RECIPE
IS_USED_IN
ITEM
CRAFTS
ITEMLOOTS
RECIPEIS_USED_IN
ITEMCRAFTS
IS_USED_IN
RECIPEIS_USED_IN
CRAFTS
![Page 85: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/85.jpg)
scarcity analysis
![Page 86: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/86.jpg)
How scarce is “Durian”
compared to “Dragonfruit”?
![Page 87: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/87.jpg)
EXISTS_IN
FRUIT TREE SPOTFRUIT
FORAGES
![Page 88: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/88.jpg)
MATCH! !
(fruit)<-[:FORAGES]-(tree)-[:EXISTS_IN]->(spot)!
WHERE! !
fruit.Name=‘Durian’ OR!
fruit.Name=‘Dragonfruit’!
RETURN fruit, tree, spot
![Page 89: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/89.jpg)
MATCH! !
(fruit)<-[:FORAGES]-(tree)-[:EXISTS_IN]->(spot)!
WHERE! !
fruit.Name=‘Durian’ OR!
fruit.Name=‘Dragonfruit’!
RETURN fruit, tree, spot
Node<-[r1]-Node-[r2]->Node
![Page 90: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/90.jpg)
EXISTS_IN
FRUIT TREE SPOTFRUIT
FORAGES
Node<-[r1]-Node-[r2]->Node
![Page 91: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/91.jpg)
MATCH! !
(fruit)<-[:FORAGES]-(tree)-[:EXISTS_IN]->(spot)!
WHERE! !
fruit.Name=‘Durian’ OR!
fruit.Name=‘Dragonfruit’!
RETURN fruit, tree, spot
![Page 92: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/92.jpg)
![Page 93: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/93.jpg)
Durian
Dragonfruit
![Page 94: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/94.jpg)
![Page 95: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/95.jpg)
![Page 96: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/96.jpg)
quest lines
![Page 97: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/97.jpg)
AWARDS
QUEST ITEMITEM
REQUIRES
UNLOCKS
![Page 98: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/98.jpg)
What quests come after “Year of the
Horse”?
![Page 99: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/99.jpg)
MATCH!
(q1:Quest { Name: “Year of the Horse” })!
-[:UNLOCKS]!
->(q2:Quest) !
RETURN q1, q2
![Page 100: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/100.jpg)
![Page 101: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/101.jpg)
![Page 102: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/102.jpg)
How do you model quest progression?
![Page 103: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/103.jpg)
1. Price Items
2. Enrich Model
3. “Price” Quests
![Page 104: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/104.jpg)
monster hierarchy
![Page 105: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/105.jpg)
Catch me
No, catch ME
![Page 106: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/106.jpg)
IS_USED_IN
CAN_ATTRACT
ITEMMONSTER
LOOTS
RECIPE
CRAFTSITEMMONSTER
![Page 107: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/107.jpg)
MATCH! (monster1:Monster)-[:LOOTS]->(loot)! -[r:IS_USED_IN | CRAFTS*0..]->(bait)! -[:CAN_ATTRACT]->(monster2)!RETURN monster1, monster2
![Page 108: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/108.jpg)
MATCH! (monster1:Monster)-[:LOOTS]->(loot)! -[r:IS_USED_IN | CRAFTS*0..]->(bait)! -[:CAN_ATTRACT]->(monster2)!RETURN monster1, monster2
![Page 109: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/109.jpg)
![Page 110: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/110.jpg)
![Page 111: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/111.jpg)
![Page 112: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/112.jpg)
![Page 113: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/113.jpg)
![Page 114: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/114.jpg)
Monster 1Monster 2
Quest 1 Quest 2
Unlocks
Unlocks
![Page 115: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/115.jpg)
Requires
Monster 1Monster 2
Quest 1 Quest 2
Unlocks
Unlocks
Requires
![Page 116: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/116.jpg)
successful catch = loot + gold
![Page 117: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/117.jpg)
∑(Bait Price * Attraction Rate)
Input = Output( ∑(Loot Price * Drop Rate) + Gold ) * Success Rate
![Page 118: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/118.jpg)
IS_USED_IN
CAN_ATTRACT
ITEMMONSTER
LOOTS
RECIPE
CRAFTSITEMMONSTER
![Page 119: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/119.jpg)
NEW monster !
= More competitor for bait!
= Lower attraction rate for all monsters
![Page 120: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/120.jpg)
Graph DBs are great for modelling complex domains
![Page 121: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/121.jpg)
impact analysis
![Page 122: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/122.jpg)
fraud detection
![Page 123: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/123.jpg)
social networks
![Page 124: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/124.jpg)
recommendation engine
![Page 126: Modelling game economy with Neo4j OSCON](https://reader031.fdocuments.in/reader031/viewer/2022030216/588859801a28ab951c8b735f/html5/thumbnails/126.jpg)
Thank you!
@theburningmonktheburningmonk.comgithub.com/theburningmonk