Tuesday 7 June 2016

imbroglio notes 5 - imbroglio friends

It was pretty clear that weapons couldn't improve at every level. I had a few effects that scaled with level, e.g. the Lantern's stun on kill, but there weren't enough of these for every weapon to get one. And with the low numbers of hit points it definitely wasn't reasonable to always increase damage. Just no room in the design for any very small effects that make something like 5% better, it's twice as good or nothing. I could only really make small effects by adding extra words to limit them down (extra damage only to serpents when your score is even and it's sunny), but then it feels weird to have so many words for such a small effect - and a weapon with one of these tiny effects for each level would get pretty clunky. So there were going to be a lot of times that weapons leveled up without improving and that felt kind of bad. It made sense for the design, I could make an early-game weapon like the Club that gets 2 damage already at first level but doesn't improve after that, or a late-game weapon like the Cleaver that doesn't get anything at first level but goes all the way up to 3 damage, but when you played with them and got the empty levels it felt bad.

I decided to add another resource to the game: every level-up would earn a "rune", whether the weapon improved or not. This made there be always some value to leveling weapons up, and also gave some extra incentive to focus on leveling something early rather than just letting kills fall wherever. In the end I did try to ensure everything got at least a small bonus at level 4 even though with runes it's not strictly necessary, it still felt better that way, but at least it didn't have to be something at every level.

So next there needed to be a way to actually use these runes. I could make some weapons that spend them but that leaves the possibility of a board that doesn't feature any of those weapons - in these cases they'd have no value so we're back to having empty level-ups; there needed to be a way of spending them always available. Simultaneously I was thinking about other design problems; the concern that people would find one "best" board and have no reason to play different setups, also the question of whether there needed to be more ways to deal with bad/unfair situations in the game - a panic "bomb" for when too many enemies surround you, or even whether to include a "wait" button to deal with zugzwang (possibly a limited-use effect like 868-HACK's .wait prog). I thought about encouraging board exploration with challenges where you had to design a board under restrictions, then I realised this could hold the solution to the other problems too: the challenges could be different /characters/ each with also a special ability button (bomb, wait, etc.) costing runes. Solving 3 problems at once while giving the game more character, good going.

I'd written up a list of board restrictions (no range, no blues, no duplicates); character disadvantages were a more general concept so I added more some ideas along the lines of 868-HACK's "bonus powerups" (less hit points, one enemy is worse, enemies spawn faster). Paired it with a list of ability effects and just tried to match them together. Started drawing a bunch of people and trying to get a sense of which abilities they would have. Some pairings came easily from the mechanics, some mechanics were inspired by who I thought the people were, some fairly arbitrary. In general it felt natural to match character concepts with abilities, but the disadvantages felt more arbitrary and ended up moving around a lot. It helped when I realised they didn't have to all share the same scoreboard, so they didn't need to be "balanced" to compete with each other, they just needed to each be playable on their own. This is quite a shift from how multiplayer games work - rather than the top players gravitating to the strongest characters to win more, you'd expect they'll be interested to play the weaker ones for the challenge.

Some notes on individual characters:

Count Harry I was a spooky vampire, the really nasty sort, villainous and everything. Someone managed to trap him in the worst kind of maze, the "8 steps to gem" kind. But he wasn't much fun to play, "8 steps" is pretty extreme and even his efficient (1 rune) regeneration wasn't enough to deal. His great-grandson isn't so bad. I needed a basic introduction hero and healing seemed the simplest ability so I paired that with the simplest disadvantage. The main advantage of range is to avoid some forced hits from stepping next to enemies so I made his heal/wait expensive to exacerbate the lack, I think it helps get across that it's okay that you have to take a hit sometimes. Ideally you can use the power to deal with 2 hits at once (one avoided, one healed), and then paying 2 feels just.

Susannah was going to be the first character for a while, I thought it was simpler to introduce the game without having to think about different weapon colours, but I realised they're so important I should really introduce them immediately. She didn't really change from the initial idea. It's an obvious board restriction and she gets a blue damage power to deal with its weakness / her vows forbid using magic weapons but she can call on divine assistance in times of need. Rune damage is shaped for tactical positioning, cross shape matches paladin concept. Only question was whether to make it 1 rune for 1 damage or 2 for 2; 2 makes it more a desperate prayer than a casual everyday thing, also makes it fast enough for a double-smite to be viable against red enemies when you really need it.

Vesuvius Bob was also a candidate for first character, back when he had "no ranged weapons" and was an absolute powerhouse, back before his tragic injury.
In the analogy to a card game with the weapons as your deck, wall generation is the shuffle. Having no duplicates increases shuffle variance, you're less likely to be able to reach the weapon you need. Breaking walls is deck manipulation to deal with unlucky shuffles / get somewhere you need to. Gem shortcuts are an added bonus.

Masina's rune power came after I had the two effects triggered by swiping into inner and outer walls (Bob and Johnny) and I tried to think of more of these kinds of automatic trigger (as opposed to pushing an extra button). An effect on hits was possible, extra damage is as simple as it gets, a red/blue switch gives a way to control it on any reasonable board, attaching it to red fits because it's the colour associated with more damage, there you go. Played it out, really liked the tactics of it - strong but difficult to use well, requiring discipline to avoid burning through your runes too quickly. So I just tried to draw someone very strong, who overcomes opposition through great discipline. With the tactical challenges of not being able to wait in place and trying to conserve runes, her disadvantage doesn't need to be very bad, and ideally it shouldn't affect the board design much because her power already gives plenty of direction there. So I tried everything I could think of for simple disadvantages that just make things vaguely worse, "enemies spawn faster", "6 steps to gem" (8 having been too many for old Harry), "1 less mana", all of these turned out too hard. The level generation used to sometimes block off tiles and it was not a big deal but kind of annoying (one friend was convinced it always deliberately picked the weapon he'd leveled up the most); that seemed reasonable as a disadvantage.

Obviously there had to be a cursing hero. Jeska originally had "no duplicates" (imagining a witch's eclectic hoard) but cursing makes you want to build combos so that conflicts. Gave her "weapons don't get damage increases" to really shift the focus to combos; good idea in theory but everyone got confused that the curse hero couldn't effectively use the big obvious curse weapon. So I just came up with something minor that represents her being a bit old and physically frail, wanting to avoid getting hurt and instead use magic.
Now that she was the first character to be solved I wonder if I really should have stuck with the damage reduction. Still, it's not surprising that a cursing character would break something since having a reliable way to curse removes half the balance limitations on curses.

Dominic! Several of 868-HACK's bonus powerups exaggerated the strengths of one enemy type so that was an obvious thing to try here. There isn't the same complexity in enemy abilities so I went with the simplest: the hardest enemy to kill gets extra hit points to make it even harder. It's still more vulnerable to one damage type, and it still deals its separate damage type so the extra danger doesn't stack too badly with other enemy types. The stun power helps you survive the big enemies without making them any quicker to kill, so it's alleviating the disadvantage without directly opposing it.

Tried several different disadvantages with Johnny. Similar thoughts to Masina - his rune effect shapes boards a lot so the disadvantage can be fairly generic. Difference is that his power is really really strong. "Enemies spawn faster" seemed a good fit for a while but made late-game survival impossible. "Five kills to level" seemed fair but was pretty boring. "Weapons don't get damage increases" was an appropriate level of challenge but cut out a lot of the point of mobility for being able to access high-damage weapons. Ended up with "8 steps" because nobody else could handle it and his flying naturally counteracts it.

Monday 6 June 2016

imbroglio notes 4 - when this

Most of the ideas I had for weapon effects could be phrased "when X, do Y". When this hits an enemy, stun them. When this kills an enemy, charge the player. Made a basic description language with this format; level / trigger / conditions / effect / conditions. Exceptions are passive effects like "you have an extra hit point", "this weapon is ranged", these can squeeze in as special cases. So weapon data file looks like this:

Vampiric Spear
red 11112
L1 kill restore_red
L2 kill cursed restore_red

Wicked Thorns
blue 11111
L1 hit cursed damage_blue
L1 move_onto percentage_level 10 20 30 50 curse

character 6
passive ranged
red 11111
L1 hit boss damage_blue num_level

Started with a basic set of triggers: hit, kill, level up, start of turn, move onto; and basic effects: hit, kill, damage (red or blue), heal (red or blue), stun, teleport, feed; also modifiers to specify whether the target of the effect is the enemy being attacked, a random enemy, all enemies, or enemies of a specific type. Already just combining these generic triggers and effects creates a lot of possibilities, and having a simple text format for them makes it easy to try out different possibilities. The in-game rule text is automatically generated from this code so I'm not constantly having to update two copies whenever I change anything.

So far with these effects there aren't many interactions between weapons, just some basic tactics. Deck-building is all about combos, different pieces than can combine together to make a bigger effect, I wanted exciting ways you can put some weapons together and they explode. Simplest interaction would be for one weapon to just modify another, so we get something like the Whetstone. Trying out these kinds of effect, they tend to be very strong and fairly complex, but also not very interactive because the modification happens once and then you just play with the new version. (Ongoing modifications are hard to pull off in such a small space, like with maximum damage 4 an effect like "increase damage of another weapon when this kills an enemy" doesn't have much room to work in.) So I didn't put many of these.

I needed some kind of economy, one weapon creates a resource and another weapon spends it. Something cyclic, an engine that takes constant interaction to produce and consume, rather than a static bonus. Started with the concept of "charge", a simple resource you can only carry one of - when weapon A gets a kill you become charged, then with weapon B you can discharge for extra damage. Went through all the combinations of this with the primordial effects - charge on hit, charge on kill, charge on level-up, discharge to damage, discharge to kill, discharge to heal, discharge to stun.

As well as granting a status effect to the player it made sense to grant one to enemies too, so I put in the concept of cursing. Thinking a bit of Netrunner's tags here. Again, go through all the combinations - curse on hit, curse another on kill, extra damage to cursed enemies, discharge to curse, charge when you kill a cursed enemy. Playing this version of the game, some things kind of worked but overall it had gotten very complicated, too much to keep track of. There were too many ways of doing the same thing, maybe I needed to prune it down so that charges and curses each had separate types of effects they produced. I'd also added the possibility for weapons to spend hit points for an extra effect and I realised charges weren't doing much different to this - "spend charge to stun" and "spend #b to stun" felt very similar, both spending a resource that was attached to the player.

As status effects, curses were more interesting than charges because they created more possible situations - different subsets of the enemies on screen could be cursed to create different setups, but the player being charged is always only one thing. And as a resource to spend, hit points were more interesting than charges because they also interacted with enemy damage. So I dropped charges, kept curses, and ended up limiting hit point spend to just blue. Through most of development curses had no innate effect which had some elegance ("but what do curses do?" "exactly what your cards say they do") but they needed a little extra and I got convinced to give them an effect of their own, again nice because it makes curse weapons contribute something even if you don't go for a combo.

Wednesday 1 June 2016

imbroglio notes 3 - monsters

I expected each enemy to have a simple rule variation like in 868-HACK - this one moves faster, this one has a ranged attack. Maybe elemental resistances to distinguish their interactions with weapons - this one is immune to fire, this one takes double acid damage. Playing with weapon positioning, maybe some rules could be positional - this one has a shield on one side, this one patrols back and forth along a row. Spent a while trying out with different designs but once I hit on the 2d hp system it turned out just giving them different amounts of blood and mana was exactly enough.

868-HACK's enemies also have subtle movement preferences distinguishing them but it turned out that doesn't make much sense on such a small grid; there are so few different paths that it rarely mattered and the paths are short enough that you didn't see any one enemy moving far enough to get a feeling for it.

Obsessed with the number 4, I thought each enemy would have 4 hit points divided between the two colours, 1/3, 3/1, 2/2, uh maybe a 4/4 boss or like another 2/2 with a different ability or something, until I wised up and noticed 5 total points nicely gives 4 unique enemies and so that stuck.

Enemies are also distinguished by the damage type they do. The obvious choice is to have half of them red and half blue, so I didn't do that. If there's equal numbers dealing each damage type, each hit point bar is equally much under threat, so you'd always choose to lose the one you have most of. But if one of them is more threatened the tipping point is hard to calculate. With 3 red enemies and 1 blue you'll usually prefer to take the blue hit; at some point that's low enough that you'd take red instead but how do you know where that point is? Well with only a maximum of 4 there can't be many different options but hopefully enough other factors come into play to vary it situationally.

The 4/1 and 1/4 enemies have the most variance. Hit them with the right colour and they always die in one hit, but if you get stuck hitting them with the wrong colour that's 4 hits, pretty bad. 3/2 and 2/3 are more regular, there's a preferred colour but if you get it wrong it only takes one more hit - but they always need at least two so in the best case they're harder. I distinguished the weapon colours by making red weapons generally do more damage and blue ones generally have more effects, meaning the 2/3 enemy ends up being easier to kill than 3/2 (though this depends somewhat on your board), so to compensate I made the 3/2 enemy deal the less common type of damage: it's hardest to kill but its damage is the least threatening.

For board construction, I wanted different reasons why you would put choose to put weapons in different places. Think of everything that could affect positioning. Damage types are a good start, you want those sort of evenly distributed so you can usually reach the preferred colour for each enemy. Maybe two weapons work in sequence (this one curses, this one kills if cursed) so they're good near each other. Possible interactions based on position - Blacksmith Tongs affecting adjacent tiles, Whetstone affecting the row. Ranged weapons - putting these in a corner lets them potentially hit 4 additional spaces, on an edge 3 and a central tile only 2 - but paths more often go through the central tiles so they might get to attack those extra spaces more often. In general corner/edge/center tiles turned out to have very different value. Effects when an enemy moves into a tile. These aren't enough.

I came up with the idea enemies entering through the screen edges (rather than spawning anywhere on the map). Makes more sense with such a confined board anyway, and adds more differentiaton to the positional values of corner/edge/center tiles. Then later I realised - the board has four sides, there are four enemy types, what if each side just generated one type? Felt very counterintuitive to me at the time; enemy spawns are the main source of chaos, restricting them to always come in the same places would just be putting you in the same situation over and over again rather than a lovely roguelike engine of endless variation. But I really liked the way it broke the symmetry of board-construction, putting a weapon on the left now meant something different from putting it on the right because it will be near where different enemies come from, eight times the number of practically different boards because reflections/rotations aren't equivalent. Tried it out and I guess it was totally fine. There's plenty of variety from different wall placements and the timings and orderings of enemy spawns, it doesn't feel like it's repeating situations except when the same enemy type appears a few times in a row - and then each repetition is usually worse than the previous because you've taken a hit.

In fact getting the same enemy several times in a row is sometimes downright nasty when they obstruct you from getting the gem to heal and shuffle, especially because they'll all be hitting the same colour. These situations were responsible for a lot of deaths and often felt unfair. So I thought, what if I just eliminate them? Have a rule that the same enemy can't spawn twice in succession. This felt pretty great. Smoothed out all the difficult situations, the game flowed a lot more pleasantly, you could much more reliably survive and level everything up and get a good score and everything is nice and friendly. So I decided not to keep it. All those knots of difficulty aren't nice but they're an interesting challenge to deal with and that is much more the point. I went with a watered down version: it looks at the last five enemies spawned, if three of those are the same then it makes sure the next spawn isn't a fourth. So you can still have three in a row, which is bad, but then you get a break. Four in a row would be unfair because you can't guarantee not taking a hit from each, and four hits of the same kills you.

A method for inventing card ideas: look at the alternate-universe versions of the game rejected during design and push it into one of those. If you were thinking of giving something away for free but it has value then maybe consider charging for it. So we get the Forbidden Scroll to block double spawns, but it takes spaces on the board (one for each gate you want to filter) and has to be leveled up to work.

At first I didn't communicate the enemy spawn locations and it was pretty interesting how players could develop an intuition for it without explicitly noticing it. Nobody ever saw the pattern, they'd see the same enemies appearing in the same places over and over again but still think it was random. Even when I drew the gates shaped like the enemies to make it clearer hardly anyone noticed. But if I then removed that rule it just felt very unsettling, because the pattern had very much been unconsciously recognised. I thought this was quite lovely and I wanted to keep it as a slow realisation even though it meant people would play for ages without knowing about one of the main constraints driving board construction, I only really decided to put it in the manual because the gaps next to the enemies looked weird without text in them and there wasn't much else to say. Maybe I shouldn't have, oh it was so bizarre how nobody noticed, amazing. Until I wrote the manual the enemies didn't have names either, except serpents for Dominic and minotaurs for the slingshot, I kind of liked the idea that you can only infer these names from clues elsewhere, but again the 80s arcade bestiary made demands on me.

Okay I was thinking of this as kind of an "arcade game" in structure, you're fighting off waves of enemies while trying to get high score, like a shmup where the enemies come in fixed patterns, a preset sequence of obstacles to get through. If the enemy difficulty is tied to something the player does then it's possible to manipulate it and that can get really complicated, I saw the game being quite complicated already so I wanted to avoid that. Classical roguelikes increase enemy difficulty with dungeon depth, allowing the possibility of sometimes staying on a lower level to get kills (meaning experience levels and items) before heading to riskier areas - but they generally have a hunger timer or similar so grinding an easy dungeon for hours to level up isn't an effective strategy. This could have been a risk in Imbroglio. In some ways less of one because the most readily accessible source of healing is to collect gems (= advancing the dungeon level) but on the other hand the choice of "do I want to heal to reduce my danger of dying now but also increase the danger of everything else ever" sounds pretty unpleasant. Healing is already a risk because the new level layout might impede you, but that would be even worse. Alt-healing items would probably become pretty dominant. So yeah all in all it seemed appropriate to have a fixed enemy progression.

I started with the enemy spawns divided into fairly explicit "waves", like maybe four would come at once then a break, then two at a time with shorter breaks between, then one boss, that kind of thing. Very shmup. But playing it out, multiple spawns were very dangerous because you can get flanked (at least until you have weapons that can deal with that, but simplicity dictated that those should be higher level effects) and breaks were very boring because there's nothing to do except trudge over to the next gem. So I kept adjusting the patterns little by little, increasing the gaps when a pattern seemed unfair, reducing them when one seemed too easy, ended up with this huge complicated table of spawn times that I don't really understand because it just evolved out of small changes over hundreds of plays. It starts with gaps of 6-9 turns between enemy spawns and gradually drops, with some wrinkles along the way. There are still some bits with the sense of a "wave" followed by a reprieve but they're squishier.

For consistency and simplicity I chose to keep the same wave pattern for all characters. This made tuning it difficult because the different characters have different power levels at different stages of the game, what is a pleasant challenge for one might be trivial for another and an unavoidable death for a third. Probably nobody would have minded if there was a different pattern for each character but it just went against my aesthetics, I wanted to be able to write the complete rules for each of them in a few words, not like "no red weapons (but the enemies come slower at first then speed up more in the middle but taper off again at the end so don't worry)". I didn't like rudely killing people with no way out so I decided to err on the side of it maybe sometimes feeling slow/unchallenging at the start for some characters. I went back and forth on this a lot, solely end-game focused boards were proving very effective so I kept pushing the early spawns a bit faster so there'd be some pressure to include items that peak earlier, and then pulling them back a little because I started getting too many unfair deaths.

I was worried about players thinking the early game was boring if they kept killing enemies with the nearest strong weapon and not using the space they had to level things in a deliberate way. This would be a problem if when they then died due to a lack of leveled-up weapons they didn't see the connection between that and the time they could have spent to focus kills better. But I think I managed to get the numbers to somewhere that there is enough risk early on to make it interesting, and where there's enough motivation to level things up that you'll take some risks for it.

Was worried about the late game not being challenging enough so I went back to the idea of those 4/4 bosses, put them in as minotaurs. They were red for a while but turned blue so as not to stack with the most common other sources of damage. The curse on death was a very late addition, I just thought it would be nice to give curse triggers a small effect in any board.