Thursday, December 6, 2012

Khan Academy Experiment–Intro to Algebra

So awhile ago on Facebook, I mentioned wanting to do a thing where I came up with a practical game development example for Khan Academy playlists.  This post is the first one!

I started with the Intro to Algebra playlist, and actually had kind of a tricky time coming up with an example.  I just wanted to do something simple with comparing two linear equations, but lots of things in games don’t end up being linear (the first idea that popped into my head was comparing acceleration and top speed between Bowser and Yoshi and seeing when Yoshi would overtake Bowser, but those aren’t linear rates).

After cycling through some more too-complex ideas, I settled on Gold Drip in MOBA games.  It’s a start, but even still it’s oversimplified for a few reasons

  • It doesn’t take into account other means of gold income or spending, only passive gold drip. 
  • It doesn’t address that you can’t actually buy the Philosopher’s Stone at the beginning of the game – that you can’t have negative gold
  • The per-10-seconds language would have tripped me up as a beginning algebra student, I think.

Anyway, it’s a start.  Please let me know if I blew the math anywhere.

The Scenario

In League of Legends, players earn money at a rate of 16 gold every 10 seconds and every player starts out with 475 gold.  A player can buy an item (Philosopher’s stone) for 700 gold that increases her income by 5 gold per 10 seconds.

So, normal rate (where s is seconds)

Total Gold = (16/10)s + 475

Philosopher’s Stone rate

((16+5)/10)s + 475 – 700

If a player buys the Philosopher’s Stone, at what time does she break even, after which her gold will overtake an opponent who did not buy the Philosopher’s Stone?  This is assuming neither player buys anything else or gains gold in another way.

(16/10)s +475 = ((16+5)/10)s + 475 – 700

(16/10)s +700= ((16+5)/10)s

(16/10)s+700 = (21/10)s

700 = (5/10)s


1400 = s (so 23 minutes and 20 seconds)


However, this would assume that you could buy the item from the very start and have negative gold.  How long would it take before a player could afford to buy a Philosopher’s stone?

s = (700 - 475) * 10 / 16

Let’s assume that you the designer want the Philosopher’s Stone to be OP  and pay itself off 5 minutes earlier than it does right now (s=1100 instead of s=1400).  How could you change the item’s cost to achieve this?  How could you change its gold gain rate to achieve this?

Changing initial item cost

(16/10)(1100) +475 = ((16+5)/10)(1100) + 475 – c

(16/10)(1100) =  ((21)/10)(1100) – c

1760 = 2310 – c

c = 550

Changing item’s gold gain rate

(16/10)(1100) +475 = ((16/10)+r)(1100) + 475 – 700

1760= 1760+1100r – 700

700 = 1100r

7/11 = r (this is 7 gold per 11 seconds)

No comments: