Wednesday, 11 June 2014

868-HACK prog costs

Hello I felt like writing something about tuning the costs of the 868-HACK abilities. This is maybe quite boring and nerdy and also it's like lots of words but you don't have to read it ok.

You can see some of the process by comparing the 7-day version 86856527 to the released version (yes it's only on iOS right now I'll do something about that soon) but there's lots of missing bits in between.

Okay the central activity in a roguelike is choosing between different resources to lose - a typical choice is whether to engage in melee (spending hp, risking death) or use an item/magic to avoid it. Classical roguelikes lack many choices about which resources to acquire, you just take what you find and figure out how to use it, but 868-HACK also has the "data siphon" tool giving frequent acquisition choices. I put two currencies (credits and energy) so there'd be a choice of which of those to acquire, but you're also trading those off against abilities and points. (In the original concept energy was for using abilities and credits were for spending between rounds to gain abilities, but it was cleaner to collapse that into siphoning and so the choice just became which abilities to spend them on.)

So okay there were a whole bunch of abilities (the game calls them progs, I'll call them progs now too since it's shorter though a little pompous) and they needed prices, and this is kind of too big a problem. The possibility space is just too large to think about: each prog has a 2d currency cost and also you can change what they do and what they are, how many there are, how they interact. Also working with small numbers rules out cheap statistical effects like "+5% damage"; every small change makes a big difference. Balance is hard. But there's no right answer, probably lots will do fine they'll just be different games.

I started by trying to distinguish the two currencies with a conversion prog (.EXCH) going one way but not the other (credits to energy). Initially gave you 3 for 4, a slightly unfavourable exchange rate, because I thought it should cost something to use to make you think about whether it was worth it. (Could have had a second one in the other direction at a different ratio - 2 for 3? - but also such a direct resource conversion isn't interesting to have very much of, just a little is good.) Eventually it became clear that it was usually a bad choice and it wouldn't hurt to push it up to 4 for 4. I realised there's still a cost to it - the siphon spent and the risk taken acquiring the ability in the first place, and the constraint of having to do it in blocks of 4 (consider: a 100/100 exchange would never be useful, even though it's the same ratio).

This imbalance between the two currencies helped guide later decisions. Because you have the possibility to turn credits into energy you can more likely avoid running out of energy - energy is more reliable, you can sink it into using a prog over and over again, so this determines the types of progs that should use it. If something's main utility is using it several times to set up a combo or get control of a bad situation (.PUSH, .PULL, .STEP) then it should cost energy; if it is interesting to use sparingly with precision after some setup (.DEBUG, .D_BOM, .CRASH) then it costs credits. (Of course you might like to use some of these latter progs with reckless abandon, but they're still valuable when you can't, so.) There ended up being slightly more progs costing credits than energy, which aligns with the idea that energy progs are each used more often (and means there's sometimes pressure to actually find something to spend that energy on).

Having a limited number of enemy types with specific counters was part of the initial concept. I expected to have multiple subtypes within those - several varieties of virus all affected by .ANTI_V or whatever - but keeping it focused with just one of each turned out really well. Started with a counter to each type all at the same price - .ANTI_V, .KIL_D (now D_BOM), .DEBUG, .DCRPT (now .SHOW) all at $$$, and these didn't change drastically. They're in the same currency to force a choice between them: you can't deal with every type at once.

The general pattern that started to come through was: credits for damage, energy for movement/evasion. Not everything fits that pattern but keeping it in mind made many other decisions easier - e.g. .WARP both attacks something and moves something so it costs an even mix, .REDUC and .DELAY are similar in that both make enemy spawns easier to deal with, but .REDUC's cost is weighted towards credits because it prevents enemies outright (pre-destroying them) while .DELAY just holds them at bay in a weakened state. Even though the currencies have different values, I treated it as meaningful for pairs like this to have mirrored costs ($$% and $%%) because it helped simplify the decision of where to put them (other such pairs are .WAIT/.UNDO, .ROW/.COL).

Originally .ROW and .COL only did 1 damage and cost $$% and $%%, and were quite a bit more tactically interesting to use than they are now but so efficient they completely overshadowed the other attack progs (especially since they don't depend on enemy type). I couldn't find a completely satisfactory fix; there wasn't room to weaken the effect and putting up the cost by 1 was enough to leave them pretty underpowered. What I ended up doing seems balanced (which is counterintuitive - an effect is too strong at cost 3 but double the effect is fine at 4? non-linearity, having the effect twice in one go is nowhere near as valuable as having it twice at carefully selected moments) but isn't as fun to play with - but balance makes the game better overall; conservation of fun. .COL costing mainly energy clashes a little with the principle of damage mostly costing credits so to compensate I pushed up the alert cost to 5 (vs .ROW's 4): breaking a pattern merits a higher cost.

.RESET explicitly converts energy to hp, but its efficiency varies situationally: it restores you to 3 so ideally you'd use it when on 1 to maximise the effect, but sometimes you must do it on 2 when you can't avoid being hit twice next turn, or when you only need 1 because you'll restore 1 on leaving the level. Usually (ideally) it gives 1 hp for each 2 energy. Several other progs can be thought of as converting currencies to hp - at different ratios under certain conditions, so how much 1 hp is worth is pretty variable. If there's an enemy one space away from you diagonally so you can't move without being hit, then .WAIT gives 1 hp for just 1 energy (by preventing subtraction rather than by adding). With .PUSH you can very often get a bit more than 1 hp for 2 energy (avoid a hit from a nearby enemy while inconveniencing other enemies). Occasionally you need to use $$$ for 1 hp (with .ANTI-V /.DEBUG/.D_BOM) but usually these can get you quite a lot more. So I think .RESET's 1 hp = 2 energy is kind of a bad deal, but it has reliability in its favour; to emphasise this I put the alert cost really low making it safe and accessible for beginners.

Some thought went into the order in which progs unlock. The initial set has no mixed costs; they're slightly more complex to use (they clash with everything, can't be used if either currency is exhausted), and it seemed like it might make the unlocks feel a bit more special by setting up a pattern then breaking it. Also all the attacks that are independent of enemy type have mixed cost (to compensate for them being more reliable), so this meant the initial set forces you to pay special attention to enemy types which might help with learning their behaviours. When you unlock a new prog you start the next game with it, giving an opportunity to try it out straight away - which meant .SCORE had to be in the initial set because starting with it would give a huge score advantage (some of the others are a bit of a concern too but that's the worst). A side-effect of that though is it's maybe easier to score before you've unlocked everything because .SCORE shows up more reliably, this is hopefully somewhat compensated for by not having .SIPH+. In general the game gets harder as you unlock more stuff; there are some stronger abilities but you're less likely to find something that combines well. I tried to keep the balance of credits/energy fairly even at each stage of unlocking, also tried to leave gaps and then fill them later so someone might have time to wonder what something might be before unlocking it, or when something obvious was coming; no idea if this worked at all.
(For reference, initial set is .WAIT, .SHOW, .PUSH, .STEP, .ANTI-V, .DEBUG, .D_BOM, .RESET, .EXCH, .SCORE and unlock order is .WARP, .POLY, .ROW, .DELAY, .UNDO, .ATK+, .PULL, .CRASH, .COL, .CALM, .REDUC, .HACK, .SIPH+)

NOW I WILL SUM UP SOME IDEAS WITH BULLETPOINTS
  • Start by fixing some initial values to base things off (which could change later if needed).
  • Invent principles of symmetry to guide the rest. Symmetry is good because it cuts out a whole bunch of possibilities and also it might have some aesthetic value maybe?
  • Tools to convert between different resources are maybe interesting, but better if they vary situationally rather than just having a set exchange rate, and better the weirder the resources themselves are.
  • Be aware of non-linearity; don't assume the meaning of numbers scales in an intuitive way. It might be more than twice as hard to pay 6 as 3, doubling an effect shouldn't necessarily double its cost, etc.
  • Be aware of different types of cost - unreliability, difficulty of acquisition, opportunity costs - as well as the explicit numeric resources.
  • Breaking a pattern merits a higher cost.
  • The whole is more important than its component parts. Be comfortable making a component worse if it's better for the whole.
  • there's no perfect
  • What is balance anyway idk

3 comments:

  1. This was a great write up and even as someone who hasn't played yet it was easy to see your logic all flow from that decision to use the conversion ability as a yardstick, thanks.

    ReplyDelete
  2. I initially didn't agree with the one way currency flow through .EXCH but I've come to appreciate the asymmetry now. Watching an apparently balanced system tip over is half the fun of trying to keep it level.

    ReplyDelete
  3. Still want to know how you're scoring 300-plus, though.

    ReplyDelete