8th July Progress

Oh man it’s me again..

So, what’s the scoop.. Well, like Tiy said I’ve moved to Orlando!  Holy cow is moving 420 miles with two people and two cats in a pickup truck not as fun as I imagined it to be!  But Orlando is nice and as of today I now have a desk and a bed finally so I should be good to go :P

Bartwe has spent the day squashing all sorts of bugs all over the place, some with beds, some with status effects, and some others.

Omni is still working out the final touches on the ninja rope.  I know it’s taking a few days, but after hearing the explanation of what he’s doing with it.. it’s gonna pretty cool and well worth the wait.

Legris is currently working on the glitch intro, which is coming along nicely and we’re all very excited about!

Like Tiy said I’ve been working on leveling.. everything.  This is the part of the development cycle where the game really starts to take shape as a real game, and it’s important that it’s done properly and in a flexible way that allows us to adjust and balance everything properly. Sit down while I get technical for a second:

Because so many things in the game are dynamically generated or at the very least flexible, an awful lot of things really can’t just be *set* as a value, because a single value is just too limiting and boring.  For example, take a random monster with a certain leg type that we decide should give the monster a ground speed boost.  Should that ground speed boost be the same for each level that we can generate monsters with that part, or should the speed boost become greater as the level of the monster rises?  Maybe take the same scenario, but with a jumping boost, or an armor boost etc.  Some numeric parameters like this *will* be hardcoded, or perhaps specified as some kind of multiplicative factor, but there are an awful lot of inputs for us to deal with and an awful lot of balancing to do, and not everything will work like that.

Any randomly generated monster has a ton of what *could* be level dependent parameters.  An incomplete list would be health, energy, physical damage amounts, knockback amounts, status resistances, mass, walking speed, running speed, swimming speed, etc etc etc.  Then, after that, it has a list of status effects it gives off, and those have intensity and duration, and then also any projectiles they give off have projectile speed, projectile time to live, projectile physical damage, projectile status effects, etc etc etc.

So how do you take ALL THESE PARAMETERS that are more or less randomly selected and turn it into something that can be balanced?  The trick is, is that really none of these parameters can just be a value, they have to be a function of the level.  We don’t want to hard-code anything in source code because there’s a lot of tweaking / balancing to do with a TON of inputs, besides being really really difficult to manage in code.  The best most flexible solution we found was to allow these fields to be specified, in JSON, as a *function* of the level.

Now, I don’t really want to write a math parser to handle real mathematical functions, which is good because exactly nobody wants to write real mathematical functions either.  Instead, tons and tons and tons and tons of parameters in our configuration files will look like this:

“baseMaxHealth” : [“cubic”, “clamp”, [1, 20.0], [50, 500], [80, 1000], [100, 3000]]

Which is a pretty simple to understand thing, it’s just a table of <level> and <value>.  But through the miracle of *cubic spline interpolation* it turns into a nice smooth curve which I’m too lazy to draw right now.  In this way, we’re able to specify *how parameters change with level* rather than just specify the parameter directly.  This will also allow us to do the huge amount of balancing and tweaking that we will have to do with as little pain as possible, which is probably still quite a bit of pain :D

So, I’ve pretty much gotten this applied at least in some form to most things that use damage and stats, but there’s still a *lot* left to do, and not everything that is leveled is this simple!  There are biome and ore distributions to adjust, the existing gun and sword and shield generator math needs to be looked at again, there will probably be a large number of parameters to monster and npc generators that are not curves but tables of what parameters are acceptable at what level, and on and on.

So, sorry for talking your ear off,

Kyren Out.

Edit: It has been pointed out by Havoc that the curve listed looks weird with cubic interpolation, which is true!  In fact, these are a) values I pulled out of the air, and b) it comes from a code example which is linear interpolation rather than cubic, and I changed it because I thought cubic was more interesting for a post.  Nice catch, though, should have plotted it before posting it as an example!

And he’s right it is weird, and shows that you have to be careful when using different types of interpolation or you might end up with a not monotonic increasing function!