Monday, 20 May 2013

Uniform Activations

There's this common structure a lot of games have: a list of different abilities the players choose from. Comes in a lot of different shapes - equipment, magic spells, shop purchases, research upgrades, starseeds.. sometimes they're randomly distributed, often there's an opportunity cost such that choices between them are somehow exclusive, whatever. The point is they're a collection of modular parts that do different things; removing one or adding a new one doesn't drastically change the nature of the game. It's a useful structure both for players and designers because independent pieces are easy to think about, can be introduced one at a time, can be replaced individually without much hassle, and the process of gradually understanding how disparate parts fit together can be wonderful.
(Its weakness is that a design composed of replaceable pieces lacks the particular beauty of elegant minimalism, of a pure holistic design that appears to be the only possible way it could be.)

Now, a lot of games that use this structure have these abilities behave in a variety of different ways. Classic roguelikes (just for example; other genres are similar) have collectable items that are consumed once, activated repeatedly consuming a finite number of charges, activated repeatedly consuming an energy resource, exclusively equipped to give a passive effect, non-exclusively equipped to give a passive effect, exclusively or non-exclusively equipped to give an ability that can be activated repeatedly.. as well as similar effects gained by leveling up killing monsters doing quests eating food praying to the gods. And when abilities are activated, they might require input to select a direction or an enemy or a friend or a location, and they might take effect instantly or after a delay or last for a particular duration or until deactivated. It can be a right mess.

More often than not this variety is a crutch for the designer. Pretty much any idea you come up with can be stuck into a game design without putting in any effort to ensure it behaves in a predictable way - but this offloads work onto the players to learn and keep track of the myriad different behaviours; and in a videogame it offloads work onto the programmer to implement interfaces for all these different behaviours. Here's an advantage to being both designer and programmer: if a small amount of extra design work saves you a large amount of programming work you're going to do it, and if you run into an unpleasant and unnecessary programming task you can go back and design with the grain - often making the game better by doing so.

Magic: the Gathering is probably the most egregious example of this. Seven different card types, in five different colours (and multicolour, hybrid, colourless), which depending on their type are played either by spending mana or a limited number of times per turn, and either have a one-off effect (which might target any number of different objects with any number of constraints) or create a permanent object (which might have effects later under any number of different conditions). There are no straightforward consistent rules governing how they behave - any pattern has an exception somewhere.
But there's a reason for this: they're trying to create the illusion of a "Calvinball" game where anything could happen, where every rule can be broken - but at the same time keep it constrained and balanced. (And of course sustain their business model by churning out vast numbers of new cards each year.) They're making a compromise for a particular effect. There are always compromises in design - even if not from external resource constraints there are internal tensions - and this is totally okay. The important thing is to ensure that when you're learning from the good parts that you don't copy the compromises as well if you don't have to - unfortunately when something is successful every part tends to get copied indiscriminately.
(David Sirlin wrote recently of how dropping an awkward timing system his game had inherited from Magic improved it.)

A few examples from things I've made of how I prefer for this to be done:
- All of Zaga-33's items are single-use instant-effect untargeted abilities that take one turn to use. Most of the effects are borrowed from other roguelikes but "fire a beam in a straight line" required some adaptation to avoid needing extra interface to choose a direction: the solution was to select all the directions simultaneously (other methods would have been to pick one at random, or intelligently choose the one with the most/nearest enemies).
- Early on during 86856527's design some of the abilities I wanted to include were passive effects (granting the ability to see invisible things, increasing attack damage) and some were active (blow something up right now). Converting the passive effects to active ones (durations lasting until the end of each sector) not only made things more consistent and elegant, but also made them more interesting: you have the choice each level whether to spend resources maintaining the effect. So I ended up with all abilities being multiple-use instant-effect untargeted, costing resources, not taking a turn to use. Many of these effects target specific enemies or areas but without requiring specific player input - they take a random one, or the nearest, or all of a particular type (and 868-HACK will display more methods).
- Exuberant Struggle and Vertex Dispenser both squeeze something of the base-building and army-constructing of RTS into games where you're directly controlling a single unit and activating abilities with a single key press: abilities that create units or buildings just place them at your current location, and the units go off and act automatically.
- Glitch Tank pushes unification to an extreme, with basic movement actions being shuffled in with weapon and army building cards, all activated instantly by a single button press - unlike these other examples where moving (and sometimes attacking) are a separate type of ability.

Now, there can be good reason to have different interfaces and behaviour types, this isn't a firm rule - just a suggestion. If you gain something worthwhile from this variety then by all means do it: just consider whether this could still be expressed in a cleaner system. I mentioned Magic, where they're partially justified in having a messy design to give the particular impression they want. Sometimes you can convey meaning through different behaviours. Consider Starcraft - the Zerg create units in a completely different way to the other races, rather than training them at dedicated buildings they grow larvae into different types: this reinforces their character as a weird biohorror race that mutates and evolves on the fly. But this actually argues in favour of keeping abilities consistent most of the time: you need to set up a pattern in order to break it. Keep the mundane consistent so that the magical can be magical.

Thursday, 16 May 2013

Re pulling up the ladder

response to "Pulling up the ladder" by Rami Ismail

Rami makes a good point that it's not necessarily healthy for successful "indie" developers to be curating newcomers, because there's a problem of self-interest, they're putting their own hard-earned reputations on the line, making them less likely to recommend risky new things. I'm not sure how large a problem this is - though I'm not personally in such a position, I'll happily recommend anything I like any time regardless of weirdness or inaccessibility.

..which reveals another problem with this: it's based on what the people doing the recommending like, so it tends to reinforce the same set of tastes.

I've made things in a bunch of different genres and styles so I may be better positioned to see this than most. It's very clear to me that whenever I make a new game, those who are keenest to pick up on it are those who make similar games themselves. When I make a roguelike, it's lifted up by the roguelike crowd. When I make a fairly conventional puzzle game with a cute twist, people who make puzzle-games-with-twists talk about it. When I make a slow ambient exploration thing without much conventional "gameplay", it's those who make that kind of thing who promote it. But when I make something that doesn't already have a strong presence in the indie games scene, it fizzles. And I get the reverse effect sometimes too - people say things like "why are you wasting your time making [style of thing I don't like] when you're good at making [style of thing I do]?".

So here's the deeper problem with putting the responsibility of lifting up newcomers on those who are already successful in the field: even if they're completely willing to take risks on things that might not pay off, they're only interested in things that interest them. The gaps where things are really getting missed you don't even see, because they're not things you personally care about.

There's been more discussion recently of the "just make a great game and the rest will magically work out" fallacy. The thing is - this might work when what you want to make lines up with a wave that's there to catch, but not otherwise. The "indie games scene" acts as a filter; it's very hard for a game to reach the outside world without passing through it, the larger videogame community and the world as a whole trust small cliques to curate what might be of interest to them from the masses of stuff that gets made. But the games that might appeal to people out there but don't conform to the tastes of the successful "indie game" clique just get lost. There's no room for anything truly new if for anything to succeed it has to be liked by someone who likes the old things best.

A challenge for everyone : try to perceive the value in something that's not the kind of thing you usually like, and that also hasn't been authorised as "good" by a friend or public figure.

Sunday, 12 May 2013

do something to videogames

Quick (edit: not so quick) response to Darius' piece that's been going around because there's no comment box attached to it so everyone has to write their own post in their own place (which might not be a bad thing hey).

On the whole I agree with what he's saying, some good points. Don't limit yourself to one medium, pick the right tool for the job, find what works for you, be prepared to abandon what doesn't work for you, be careful about being guided by external validation.

Now, slide 2 specifically points out that this message is not for me - expressing myself creatively through videogames works for me - so this response may be off track. I do "struggle" to express myself, but I feel satisfied with the outcomes. But I have struggled with less satisfactory results in other artforms - the written word, music, mathematical proof - so I feel like I have some idea.

Underlying Darius' piece is this idea of "I’m trying to do X, now what can I do to make it happen?", and that maybe the particular grain of videogames makes them unsuitable for doing X. This is a 'top-down' design approach, starting with a concept or message and then trying to express it. And I'm not sure this is quite the right approach to doing creative work - insofar as there can be said to be anything like a 'right' approach.. I guess what I mean is that it's not the only approach, and it's not one that I've found to be very productive for me. I've gotten better results by picking a medium and then working with the grain to see what comes out. Usually I do start with an idea, but as I try to implement it changes, and I've found it better to be open to this than to try to force through my original concept.

I gave a talk at A MAZE in Berlin recently on this topic of 'working with the grain'. Not going to rehash everything I said there because they were videoed so I'll just link that when it's online (edit: link). But the basic points were: a lot of our brainpower is unconscious and is accessed by doing rather than thinking, the underlying structure of a form can carry truth and beauty that's revealed by working in it, it's better to create things by jumping in and creating and being open to unexpected influences than by trying to plan things out before we start.

I feel like videogames have a particularly strong and structured grain, so they might be more resistant to the top-down design approach than some other artforms. Maybe this makes a stronger point than Darius' - maybe if you're struggling to express a concept in videogames it means not only that the concept is unsuited for videogames but that your entire approach to art is unsuited for videogames. This might be related to problems Darius has had expressing himself, I'm not sure - his recent work creating curious bots has been lovely and natural and grain-exploring so I certainly don't want to claim he's taking the 'wrong approach'. But in general I think good things come from listening to the problems that come up so it's better to respond by adapting your concept to take that feedback into account rather than running away to somewhere you don't encounter resistance.

When I make a strategy game, I have particular ideas about which ways to play will be interesting. Sometimes it turns out they aren't - maybe this can be fixed, but not always. Sometimes it turns out they are, but the game discourages them because they're dominated by another strategy which is boring or 'grindy' - to fix this may requires a clever insight into how to remove the boring approach without breaking anything else. They're intricately balanced systems, and tuning them requires finding the correct underlying rules to produce the effects I want.

It's hard to lie with a game. This is an advantage to having a rigid grain, it pushes you to find the truth in what you're trying to express rather than just uncritically broadcasting what you believe. If you want to write a story that communicates "communism is bad" or "the free market is bad" that's easy - just make the villains communists or capitalists and say that's bad. But to make a game that critiques such a system requires simulating the system. If your enemies are capitalists and it turns out your simulation of capitalism makes them more efficient than the communist heroes, that challenges what you're trying to express. Don't get me wrong, you can definitely lie with a game - you don't have to accurately simulate systems, you can cheat in the background, you can use all the non-systemic parts to lie about what the system means. You can avoid simulating the systems you're talking about - games-as-propaganda tend to reskin old games and use only the text/images/sounds to convey their message rather than holistically expressing it through mechanics as well. But fundamentally: any game simulates some system honestly - even if you mislead about how that might correspond to any real-world system. If you want something to happen in a game, you have to write the rules honestly so that it happens - you can't just assume it will happen because that was your authorial intent.
(Games aren't special in this respect; it's even harder to lie with a formal logical proof - though it's easy to mislead with an argument that appears logical or that reasons from false assumptions.)

So if you're struggling to express yourself through games, do consider Darius' points and question why you're set on making games specifically, but also consider whether what you're trying to express might be 'wrong' - whether adapting your concept to avoid the problems you're having might actually make it more beautiful.

Wednesday, 8 May 2013

Score Conditions

Something I've been thinking about with respect to 868-HACK (yes I'm still working on it, the new version has a new name, I don't know when it will be done) is how players can approach score in a game differently depending on their goals, even when the score system itself is fixed. Some of this comes from conversations with @rocketcatgames and @stiknork.

Zaga-33 had a very minimal score system. The main focus is on the win condition of killing the end-boss; the score essentially measures progress towards achieving that condition (by counting which dungeon level you've reached), with a bonus at the end for how efficiently you achieved it when you do (by counting items remaining in your inventory). I discussed this in a previous post (which also touched on some of the other things I'm writing about here).
Before you've completed the game, playing for score is quite effective: it helps you measure your progress towards the ultimate goal. But it turned out that once you can complete it, playing for score wasn't interesting for very long. Whether you could get a high score depended largely on random factors: whether items and level configurations were favourable. Then once you'd achieved the maximum possible score, there was nothing further to achieve. (This is why I didn't include an online scoreboard, see another post.)
But that wasn't the end of it. @Rocketcatgames found another way to play: trying to get a streak of as many wins as possible in a row. I'd tried to balance the game to almost always be completable, and he put that to the test. So I patched in a streak counter that shows up when you win the game, to keep track of this for him (and anyone else who wanted to try that challenge).
In one of the previous posts I talked about how taking a very coarse measurement for score helps to average out the effects of randomness; here we have the coarsest measurement of all - win or lose - added up over multiple plays, turning out to be the best way to display skill.
The interesting thing that came out of this for me was: playing to get the maximum score and playing to get the longest streak required subtly different priorities - similar skills, but applied differently. To maximise your score requires taking reckless risks and succeeding at them, while streaking requires minimising risk as much as possible. The conservative player uses an unidentified item under controlled conditions, where the consequences won't be too bad if it turns out not to be useful; the risky player gets into a situation where only one item will do and then guesses right - or dies, which is okay because they wouldn't have gotten the top score anyway.

Consider the sequence of scores (or wins/losses) across multiple games, instead of just a single number from one game. One way to interpret that sequence is to just keep the biggest one in it, the "high score", that's fine, but there are other possibilities.
Counting streaks (where there's no win condition, you could look at streaks of scores larger than N).
Average score - Drop7 tracks this, and it affects how it's played (although it's a bit broken because you can cancel a game before the end without it contributing to the average). This is potentially really deep because you have to work out to what extent the higher scores you may get by taking extreme risks balance out the lower scores you get when those chances don't work out. In a game with an exponential score system it might be worth getting nothing most of the time in exchange for the occasional zillion-point game - or it might not.
Also there are different types of average you could take: median, geometric mean, harmonic mean.. or you could look at average streaks, or something weirder - what if the ideal way to display your skill at a game is to lose every seventh time you play and win the rest, or to guarantee that each score is higher than the last - a streak of increasing (or decreasing!) scores?

Measuring streaks of wins is pretty similar to measuring your win percentage - a high proportion of wins implies long streaks; long streaks could come from playing badly but many many times, but are most likely to come from being able to win reliably. So win percentage might be a slightly more accurate way of expressing skill, but I prefer to look at streaks because they feel more exciting - there's a psychological difference. Tension builds as you win multiple games in a row, and you may change your style to be more conservative to try not to break the streak. "I won 30 times in a row" sounds more impressive than "I win 83% of the time". (Also the average becomes hard to change once you've played a lot - though this can be solved by averaging across a rolling window of the last N plays.)

A similar consideration comes up in multiplayer games: are you trying to maximise your chances of being in first place, or maximise your expected position among the players? Often you get situations where anyone could attack the player in the lead to bring them down, but it would cost them their own position and give the game to someone else (a form of kingmaking) - and sparks can fly when players have different implicit ideas about what they should be playing for. And when there's a score, if you're behind do you take risks to try to win or do you aim to maximise your score to lose "by less"? Does the absolute value of your score mean anything at all, or is it just about how it compares to other players? Tournament structures around the game can answer this one way or another - in an elimination tournament you might just want to be first (or to not be last), whereas in Poker you typically only care about your score.

SpaceChem does something interesting with its scores, which the developer spoke about at GDC this year. It offers multiple criteria by which your solution is evaluated, so as well as completing levels you can try to improve your solution along each of these axes. But the criteria aren't independent: improving on one axis will cost you on the others. One really clever side-effect of this he pointed out: optimising for one type of score means you're likely to be below average on others, but all scores are added to all leaderboards regardless of which one the player was aiming at, which means everyone can get to be above average on one of them.

868-HACK, like Zaga-33, has both a score and a binary win condition. And, also like Zaga-33, it's possible to achieve the win condition almost every time with cautious skilled play. But unlike it, your score is not closely tied to the win condition at all. You might get 24 points and then die in the first sector, or get to the end with no points at all. There's often a choice between the two - getting points is risky and reduces your chances of survival; sometimes you can guarantee a higher score if you don't try to get out *ALIVE* as well.
The first thing I did, which is in the 7-day version, was to order the scoreboard so that any winning score - even 0 - is above any losing score. This kind of says that your score means nothing if you're dead. And this is interesting, it's a deeper challenge to figure out how exactly many points you can safely get to the exit with than to just grab the highest numbers you can find.
But over time it became clear that it suffered from a similar problem to Zaga-33: getting the highest scores was largely a matter of luck. I already knew a solution: streaking technology. But since this time scoring and winning are not coupled, the length of a streak alone wasn't enough: instead I'm tracking the cumulative score. It presents a difficult problem: how many points should you get in each game to maximise your score across a streak? This works really well.
The expected sequence of mastery is: trying to get to the end, trying to get a high score, trying to get a high streak score. Note that of course I don't expect all players to be interested in this - I'm perfectly happy if someone stops at an earlier tier. If you just get to the end and are satisfied with that that's completely fine, but if anyone wants to keep on playing then there's a greater challenge to measure themselves against.

When putting a score in a game, don't just say "try to get the biggest number" and be done with it. Consider whether it's a score that makes sense to compare against other people, or if it's (like Zaga-33's) better just as a measure of personal progress. Consider the context around the score, how different goals across the sequence of repeated plays can shape how players approach each individual play. And when you find the most interesting goal to aim for, consider how to present it to players. Show people a number and someone will care about it and try to make it bigger. Be open to players inventing their own approaches, a game can accommodate different styles of play driven by different goals.

Sunday, 5 May 2013

being good at glitch tank

WARNING: MOPEY

I find myself in possession of what is possibly the most pathetic skill: being really good at a competitive game that I made myself and that virtually nobody else plays.

Recently I've been struggling when I try to make multiplayer games. I get excited about ideas but lose motivation very quickly. This weighs heavy on me, even though I'm doing okay making singleplayer games; multiplayer is what I care more about. I try not to be too much influenced by people's responses, or by stupid numbers like download counts or page views or sales, but I've not been able to be unaffected by the difference in response I get to singleplayer games versus multiplayer ones. I've written before about the frustration of feeling that I've failed these multiplayer games (Glitch Tank in particular) by not being able to give them the audience I feel they deserve. I suspect at this point there is no chance of them ever finding that - this culture has a singleminded obsession with newness; if something is "old" (i.e. not released THIS WEEK) then it's not worth paying attention to; new opportunities arise only for things newly made. So I must accept failure.

Was trying to explain to someone recently why Glitch Tank is the best game I've made. I thought maybe writing something about what's good about it might help me to move on (it worked for my scarf).

(Is it the best game I've made? Possible cognitive biases at play here: 868-HACK may be better but it's still too close for me to view objectively - its compromises are too fresh; Vertex Dispenser took a lot out of me and I don't much like to think about it now; O's vulnerability to violence bothers me; solved puzzles aren't interesting.)

I suspect maybe in my being-bad-at-marketing I've failed to communicate what kind of game Glitch Tank actually is. Or more importantly, what it isn't: it's not a casual party game. I think maybe people are sometimes disappointed with it because they expect this is what it should be? It's an "indie" game, it's on the ipad, and that's what most of the other local multiplayer games on there are. Glitch Tank has humour, but it's not something that plays well without giving it your full attention. It's a deep competitive game, and it's most interesting at a high level of skill. It's an "e-sport", if that's your preferred language. It's good for getting good at, it's good for playing a lot of, we still play it. This fits well with how I like to play games: picking a few to master rather than trying to keep up with everything that gets released. It's maybe not so appealing if you prefer to dip into lots of different things. It's a high-skill game; this means it doesn't work terribly well between players of widely different skill levels. The best way to enjoy it is with a group of people getting good at it together. It's not so interesting if you just get good at it and then beat people up; you want to be challenged.

You have to make decisions in a short space of time. It's hard to quickly calculate the consequences of an action; the relevant information is spread across the map and it takes time to process it. It presents a wide range of possible situations, and subtle variations can lead to very different outcomes. The heart of the game is the duplicate action, creating a copy of your tank which responds to the same input in parallel. The same instructions produce different outcomes for tanks in different positions and orientations, and all of these outcomes matter. Attacking from an unexpected direction with one of your clones expresses quick thinking, cleverness, simultaneously paying attention to disparate things, creative problem solving.

Eventually you develop an awareness of how long it will take to absorb this information and work out the consequences, and you start to take this time into account. You enter a state of "metacognition", thinking about your thought processes, making decisions based on acute self-awareness. Weighing the advantage gained from acting quickly against the advantage gained from considering your move.

Meanwhile you are of course considering your opponent's thought processes, how long they will take to think about things. You've seen that they have an opportunity to attack you but they're thinking about something else - do you act quickly to evade the attack but risk hurting your position because you haven't taken time to fully evaluate your evasive move, or do you wait to be more certain of your move but risk them becoming certain of theirs?

A key factor that makes this work is that every action carries a risk of negative side-effects. The laser and mine actions allow for friendly fire, you can damage yourself; mine especially since you place it right next to you. This makes the duplicate action risky; because your clones start near you they're more likely to harm you than your opponent (this too is why spamming actions quickly is unwise - you'll kill yourself more often than not; the "overheating" effect was not added for balance but to signal that this is a bad idea). Just moving becomes risky when you might step on a mine or into your opponent's line of fire, and even turning can ruin you if you end up stuck facing a wall or danger. So a poorly evaluated action doesn't just fail to improve your position, it can actively hurt you.

SPOILERS:
The rare invisibility action is the fullest expression of this; it's clearly advantageous to be hidden from your opponent, but unless you act very carefully (which costs attention, slows you down) you can lose track of your own position at which point you're acting blind - unless you do a action with a visible effect, which reveals you to your opponent also.

In some ways these thought processes are a lot like other high-level competitive games (which is what I was aiming for; the Kompendium project was an attempt to make the mental states of high-level RTS play more accessible). But I feel it's different enough (at least from ones I'm aware of) to be notable. The way randomness is fundamentally incorporated into your actions means your plans must be flexible, you have to manage risks and possibilities, and there are strategic considerations that aren't possible in a low-randomness game (holding onto opportunities until they're useful, trying to cycle through actions that aren't useful without endangering yourself, ensuring your hand doesn't get cluttered with problems). But the way this happens in real-time distinguishes it from the board/card games that present similar considerations; you have to think about these things quickly and manage time.