terça-feira, 26 de março de 2019

Planning - The Core Reason Why Gameplay Feels Good

In this post I dig into planning, and how it is a fundamental part of what makes a game engaging. Planning affects many aspects of what is so special about games and why we enjoy playing them. This post will go over the reasons behind this, and explains why planning is so important for narrative games.

I think we can all agree that there is a difference in how certain games feel to play. There are just certain games that feel "gamier" than others. Just compare playing Super Mario to something like Dear Esther, and I think it's clear that the former feels like it has more gameplay than the latter. What is it that causes this? My hypothesis: the ability to plan.

The more a player can plan ahead in a game, the more engaging that game will feel to play.

Before I cover some evidence of why this is most likely true, I will need to get into some background information. In order to understand why planning has such a prominent role in games, we need to look into the evolution of our species and answer this question: why are fish so stupid?
---

This is how the world looks to the average fish:


They can really only see 1-2 meters in front of them and often it's even worse than that. This means that a fish can't do much planning. It just reacts to whatever pops up in front of its face; that's really what their lives are all about. If a fish's life was a game, it would be a limited version of Guitar Hero played to random noise. This is why fishing works. Fish don't think like us, they're mainly just driven by hardwired responses.

For a large part of earth's history this was what life was like for organisms. But then 400 million or so years ago something happened. Fish started to move on to land. Suddenly, the view looked more like this:


This changed their world. Suddenly it was possible to plan ahead and to properly think about your environment. Previously, smart brains had been a waste of energy, but now it was a great asset. In fact, so important was this shift that it is probably a big factor in how consciousness evolved.  Malcolm MacIver, who as far as I can tell originated this theory, writes about it like this:
"But then, about 350 million years ago in the Devonian Period, animals like Tiktaalik started making their first tentative forays onto land. From a perceptual point of view, it was a whole new world. You can see things, roughly speaking, 10,000 times better. So, just by the simple act of poking their eyes out of the water, our ancestors went from the mala vista of a fog to a buena vista of a clear day, where they could survey things out for quite a considerable distance. 
This puts the first such members of the "buena vista sensing club" into a very interesting position, from an evolutionary perspective. Think of the first animal that gains whatever mutation it might take to disconnect sensory input from motor output (before this point, their rapid linkage was necessary because of the need for reactivity to avoid becoming lunch). At this point, they can potentially survey multiple possible futures and pick the one most likely to lead to success. For example, rather than go straight for the gazelle and risk disclosing your position too soon, you may choose to stalk slowly along a line of bushes (wary that your future dinner is also seeing 10,000 times better than its watery ancestors) until you are much closer."
 To showcase the above, he has the following image:


This images nicely shows the conceptual difference in the processes involved. In one you basically just use a linear process and "react as you go". In the other one you scout the terrain ahead, consider various approaches and then pick one that seems, given the available data, to be the best one. 

It is not exactly the same, but there is a striking likeness to the following image comparing old school and more modern FPS design:

I know that this is not a completely fair comparison, but the important point here is that when we look at these two images, it feels pretty clear which of these two designs ought to have the best gameplay. The image on the left represents a more complex and interesting landscape, while the one on the right represent a linear sequence of events. And just like the worlds of a fish compared to that of the world of land animals, this means a huge difference in our ability to plan.

There are other interesting connections with the ability to see far and to plan. Malcolm MacIver replies to a question regarding the intelligence of octopi:
"It's incredible what being an unprotected blob of delicious protein will get you after eons of severe predation stress. They, by the way, have the largest eyes known (basketball size in the biggest deep sea species). Apparently, they use these to detect the very distant silhouettes of whales, their biggest threats, against the light of the surface. 
The theory is committed to the idea that the advantage of planning will be proportional to the margin of where you sense relative to where you move in your reaction time. It then identifies one period in our evolutionary past when there was a massive change in this relationship, and suggests this might have been key to the development of this capacity. It's interesting that octopuses and archerfish tend to be still before executing their actions. This maximally leverages their relatively small sensoria. There may be other ways, in other words, for animals trapped in the fog of water to get a big enough sensorium relative to where they are moving to help with planning."
Sight is of course not the only reason for us humans to have evolved our current level of intelligence and consciousness. Other important factors are our upright pose and our versatile hands. Standing up meant that we could see further and allowed us to use our hands more easily. Our hands are the main means with which we shape the world around us. They allowed us to craft tools, and in various ways to change parts of the environment to optimize our survival. All of these things are deeply connected to the ability to plan. Once we learned how to reshape the world around us, our options opened up and the complexity of our plans increased immensely. 

It doesn't stop there. Planning is also a crucial part of our social life. Theory of mind, our ability to simulate other people, is both a reason for and a product of our planning abilities. Navigating our social groups has always been a careful activity of thinking about various paths of action and their consequences. 

Planning also underlies two other phenomena that have been discussed recently on this blog: Mental Models and Presence. The reason why we have mental models is so that we can evaluate actions before we make them, which obviously is crucial to planning. Presence is a phenomenon that comes from us incorporating ourselves into our plans. We don't just want to model what happens to the world, but also to ourselves.

So, to sum things up: there are lots of evolutionary reasons why planning would be a fundamental part of what makes us human. It's a big part of who we are, and when we are able to make use of these abilities we are bound to find that engaging. 

---

So this background is all very well, but is there really any good evidence that this is actually a thing in games? Yes - in fact, quite a bit of it! Let's review the ones that I find the most important.

There is a model of player engagement called PENS (Player Experience of Need Satisfaction) which is quite rigorously researched. It uses the following criteria to evaluate what a player thinks about a game.
  • Competence. This is how well a game satisfies our need to feel competent - the sense of having mastered the game. 
  • Autonomy. How much freedom does the player have and what options do they have to express it?
  • Relatedness. How well is the player's desire to connect with other people satisfied?
Measuring how well a game performs on the above metrics has been shown to be a much better indicator of various types of success (sales, how likely people are to recommend the game, and so forth) than simply asking if the game is "fun". 

And, more importantly, two of the above factors are directly related to planning. Both Competence and Autonomy heavily rely on the player's ability to plan. Let's go over why this is so.

In order for a player to feel competent at a game they need to have a deep understanding of how the game works. Sure, there are games where mere reflexes are enough, but these are always very simplistic. Even in most rhythm games there are certain rules that the player needs to learn and understand in order to play well. A big part is also learning the melodies that make up each level. Why? In order to optimally place your inputs (be that fingers or feet) to hit as many beats as possible. All of these aspects boil down to one thing: being able to predict the future.

You see the same thing in most games. You get better at Darks Souls when you understand how monsters attack, how levels are laid out and how your own attacks work. Learning how a world operates and gaining the ability to predict is a cornerstone of competence. Sure, you also need to develop the motor skills to carry out the required actions, but this is almost always less important than understanding the whys and whens of the actions. Simply being able to predict is not enough, you also need to have a sense of what goal you are trying to achieve and then, using your predictive abilities, to carry out the steps required to reach it. Or in other words: you need to be able to plan.

Autonomy is also highly dependent on the ability to plan. Imagine a game where you have plenty of freedom, but have no idea how the game works. Everybody who has booted up a complex strategy game without understanding the basics knows that this is not very engaging. In order for the freedom to mean something, you need to have an idea what to do with it. You need to understand how the game's mechanics behave, what tools are at your disposal, and what goals you want to achieve. Without this, freedom is confusing and pointless.

So in order to provide a sense of autonomy a game needs to not only provide a large possibility space, but also teach the player how the world works and what the player's role in it is. The player needs to be able to mentally simulate various actions that can take place, and then come up with sequences that can be used to attain a specific goal. When you have this, you have freedom that is worth having. It should be pretty obvious that I am again describing the ability to plan. A world in which the player is not able to plan is also one with little autonomy.

Similarly, if the game only features a linear sequence of events, there's not much planning to be done. In order for the player to be able to craft plans there need to be options. This is not the case if only a certain chain of actions is possible. This scenario is a typical example of having no freedom, and unsatisfactory in terms of autonomy.  Again, planning and autonomy are intricately linked.

One could make the case that Relatedness also has a connection with planning. As explained earlier, any social interactions heavily rely on our ability to plan. However, I don't think this is strong enough and the other two aspects are more than enough. Instead let's look at evidence from a different angle.


One trend that has been going on for a long time in games is the addition of extra "meta" features. A very common one right now is crafting, and almost all big games have it in some way or another. It's also common to have RPG-like levelling elements, not just for characters, but for assets and guns as well. Collecting a currency that can then be used to buy a variety of items also turns up a lot. Take a look at just about any recent release and you are bound to find at least one of these.

So why do games have them? The answer to that is quite easy: it makes the game more engaging. The harder question is why that should be the case. It can't solely be because it gives the player more to do. If that was the case you would see games adding a random variety of mini games to spice things up. But instead we are seeing certain very specific types of features being used over and over again.

My theory for this is that it's all to do with planning. The main reason that these features are there is because it gives the player a larger possibility space of plans, and more tools to incorporate into their planning. For instance, the act of collecting currency combined with a shop means that the player will have the goal of buying a particular item. Collecting a certain amount of currency with a view to exchange it for goods is a plan. If the desired item and the method in which the coins are collected are both connected to the core gameplay loop, then this meta feature will make the core loop feel like it has more planning that it actually has. 

These extra features can also spice up the normal gameplay. Just consider how you need to think about what weapons to use in combat during The Last of Us. You have some scrap you can craft items from, and all of those items will allow you to use different tactics during combat. And because you cannot make all of them, you have to make a choice. Making this choice is making a plan, and the game's sense of engagement is increased. 

Whatever your views on this sort of meta-feature are, one thing is certain: they work. Because if they weren't we wouldn't be seeing this rise in them persist over such a long time. Sure, it's possible to make a game with a ton of planning without any of these features. But that's the hard way. Having these features is a well-tested way to increasing engagement, and thus something that is very tempting to add, especially when you lose a competitive advantage by not doing so.


Finally, I need to discuss what brought me into thinking about planning at all. It was when I started to compare SOMA to Amnesia: The Dark Descent. When designing SOMA it was really important for us to have as many interesting features as possible, and we wanted the player to have a lot of different things to do. I think it is safe to say that SOMA has a wider range of interactions and more variety than what Amnesia: The Dark Descent had. But despite this, a lot of people complained that SOMA was too much of a walking simulator. I can't recall a single similar comment about Amnesia. Why was this so?

At first I couldn't really understand it, but then I started to outline the major differences between the games:
  • Amnesia's sanity system
  • The light/health resource management.
  • Puzzles spread across hubs.
All of these things are directly connected with the player's ability to plan. The sanity system means the player needs to think about what paths they take, whether they should look at monsters, and so forth. These are things the player needs to account for when they move through a level, and provide a constant need to plan ahead.

The resource management system works in a similar fashion, as players need to think about when and how they use the resources they have available. It also adds another layer as it makes it more clear to the player what sort of items they will find around a map. When the player walks into a room and pulls out drawers this is not just an idle activity. The player knows that some of these drawers will contain useful items and looting a room becomes part of a larger plan. 

In Amnesia a lot of the level design worked by having a large puzzle (e.g. starting an elevator) that was solved by completing a set of spread out and often interconnected puzzles. By spreading the puzzles across the rooms, the player needs to always consider where to go next. It's not possible to just go with a simple "make sure I visit all locations" algorithm to progress through the game. Instead you need to think about what parts of the hub-structure you need to go back to, and what puzzles there are left to solve. This wasn't very complicated, but it was enough to provide a sense of planning.

SOMA has none of these features, and none of its additional features make up for the loss of planning. This meant that the game overall has this sense of having less gameplay, and for some players this meant the game slipped into walking simulator territory. Had we known about the importance of the ability to plan, we could have done something to fix this. 

---

A "normal" game that relies on a standard core gameplay loop doesn't have this sort of problem. The ability to plan is built into the way that classical gameplay works. Sure, this knowledge can be used to make such games better, but it's by no means imperative. I think this is a reason why planning as a foundational aspects of games is so undervalued. The only concrete example that I have found[1] is this article by Doug Church where he explains it like this:
"These simple, consistent controls, coupled with the very predictable physics (accurate for a Mario world), allow players to make good guesses about what will happen should they try something. Monsters and environments increase in complexity, but new and special elements are introduced slowly and usually build on an existing interaction principle. This makes game situations very discernable — it's easy for the players to plan for action. If players see a high ledge, a monster across the way, or a chest under water, they can start thinking about how they want to approach it. 
This allows players to engage in a pretty sophisticated planning process. They have been presented (usually implicitly) with knowledge of how the world works, how they can move and interact with it, and what obstacle they must overcome. Then, often subconsciously, they evolve a plan for getting to where they want to go. While playing, players make thousands of these little plans, some of which work and some of which don't. The key is that when the plan doesn't succeed, players understand why. The world is so consistent that it's immediately obvious why a plan didn't work. "
This is really spot on, an excellent description of what I am talking about. This is an article from 1999 and have had trouble finding any other source that discuss it, let alone expands upon the concept since then. Sure, you could say that planning is summed up in Sid Meier's "A series of interesting choices", but that seems to me too fuzzy to me. It is not really about the aspect of predicting how a world operates and then making plans based on that.

The only time when it does sort of come up is when discussing the Immersive Sim genre. This is perhaps not a big surprise given that Doug Church had a huge part in establishing the genre. For instance, emergent gameplay, which immersive sims are especially famous for, relies heavily on being able to understand the world and then making plans based on that. This sort of design ethos can be clearly seen in recent games such as Dishonored 2, for instance [2].  So it's pretty clear that game designers think in these terms. But it's a lot less clear to me that it is viewed as a fundamental part of what makes games engaging and it feels like it is more treated like a subset of design.

As I mentioned above this is probably because when you take part in "normal" gameplay, a lot of planning comes automatically. However, this isn't the case with narrative games. In fact, narrative games are often considered "lesser games" in the regard that they don't feature as much normal gameplay as something like Super Mario. Because of this, it's very common to discuss games in terms of whether you like them to be story-heavy or gameplay-heavy, as if either has to necessarily exclude the other. However, I think a reason there is still such a big discrepancy is because we haven't properly figured out how gameplay in narrative games work. As I talked about in an earlier blog post, design-wise, we are stuck at a local maxima.

The idea that planning is fundamental to games presents a solution to this problem. Instead of saying "narrative games need better gameplay", we can say that "narrative games need more planning".

---

In order to properly understand what we need to do with planning, we need to have some sort of supportive theory to makes sense of it all. The SSM Framework that I presented last week fits nicely into that role.

It is really best to read up on last week's blog post to get the full details, but for the sake of completeness I shall summarise the framework here.

We can divide a game into three different spaces. First of all we have System space. This where all the code is and where all the simulations happen. The System space deals with everything as abstract symbols and algorithms. Secondly we have the Story space which provides context for the the things that happen in the System space. In System space Mario is just a set of collision boundaries, but then when that abstract information is run through the Story space that turns into an Italian plumber. Lastly, we have the Mental Model space. This is how the player thinks about the game and is a sort of mental replica of all that exists in the game world. However, since the player mostly never understands exactly what goes on System space (nor how to properly interpret the story context), this is just an educated guess. In the end though, the Mental Model is what the player uses in order to play the game and what they base their decisions on.

Given this we can now start to define what gameplay is. First of all we need to talk about the concept of an action. An action is basically whatever the player performs when they are playing the game and it has the following steps:
  1. Evaluate the information received from the System and Story space.
  2. Form a Mental Model based on the information at hand.
  3. Simulate the consequences of performing a particular action.
  4. If the consequences seem okay, send the appropriate input (e.g. pushing a button) to the game.
A lot of this happens unconsciously. From the player's point of view they will mostly view this sequence as "doing something" and are unaware of the actual thought process that takes place. But really, this always happens when the player does something in a game, be that jumping over a chasm in Super Mario or placing a house in Sim City.

Now that we understand what an action is, we can move on to gameplay. This is all about stringing several actions together, but with one caveat: you don't actually send the input to the game, you just imagine doing so. So this string of actions are built together in mental model space, evaluating them and then if the results feel satisfactory, only then do we start to send the required input.



Put in other words: gameplay is all about planning and then executing that plan. And based upon all of the evidence that I showed above, my hypothesis is: the more actions you can string together, the better the gameplay feels.

It isn't enough to simply string together any actions and call that a plan. First of all, the player needs to have an idea of some sort of goal they are trying to achieve. The actions also need be non-trivial. Simply having a bunch of walking actions strung together will not be very engaging to the player. It's also worth pointing out that planning is by no means the only thing that makes a game engaging. All other design thinking doesn't suddenly go out the window just because you focus on planning. 

However, there are a bunch of design principles that go hand in hand with planning. For instance, to have a consistent world is crucial, because otherwise it isn't possible for the player to form a plan. This is why invisible walls are so annoying; they seriously impede our ability to create and execute plans. It also explains why it's so annoying when failure seems random. For gameplay to feel good, we need to be able to mentally simulate exactly what went wrong. Like Doug Church expressed in a quote above: when a player fails they always need to know why.

Another example is the adventure game advice that you should always have several puzzles going at once. In planning terms this is because we always want to make sure the player has ample room to plan, "I will first solve this and then that". There are lots of other similar principles that have to do with planning. So while planning is not the only thing that makes a game engaging, a great number of things that do can be derived from it.

Let's quickly look at some examples from actual games.

Say that the player wants to assassinate the guy in red in this situation. What the player does not do is simply jump down and hope for the best. They need to have some sort of plan before going on. They might first wait for the guard to leave, teleport behind the victim, and then sneak up and stab them. When that's done they leave the same way they came. This is something the player works out in their head before doing anything. It isn't until they have some sort of plan that they start acting.

This plan might not work, the player might fail to sneak up on the guy and then he sound an alarm. In this case the plan breaks, however that doesn't mean that the player's plan was totally untrue. It just meant they didn't manage to pull off one of the actions of. If presented properly, players are okay with this. In the same way, the player might have misinterpreted their mental model or missed something. This is also okay as long as the player can update their mental model in a coherent fashion. And next time the player tries to execute a similar plan they will get better at it.

Often this ability to carry out your plans is what makes the game the most engaging. Usually a game starts out a bit dull, as your mental models are a bit broken and the ability to plan not very good. But then, as you play, this gets better and you start stringing together longer sets of actions and therefore having more fun. This is why tutorials can be so important. They are a great place to get away from that initial dullness by making the experience a bit simpler and guiding the player to think in the correct manner about how the game works.

It's also worth noting that plans should never be too simple to carry out. Then the actions become trivial. There needs to be a certain degree of non-triviality for engagement to remain.

Planning doesn't always need to happen in the long term, it can also be very short term. Take this scene from Super Mario, for instance:



Here the player needs to make a plan in a split second. The important thing to notice here is that the player doesn't simply react blindly. Even in a stressful situation, if the game works as it should, the player quickly formulates a plan and then tries to carry out that plan.

Now compare these two examples to a game like Dear Esther:



There are a lot of things one can like about this game, but I think everybody agrees that the gameplay is lacking. What's harder to agree on, though, is what's missing. I've heard a lot about the lack of fail states and competitive mechanics, but I don't find these convincing. As you might guess, I think the missing ingredient is planning.

The main reason that people find Dear Esther unengaging is not because they cannot fail, or because there is nothing to compete against. It's because the game doesn't allow them to form and execute plans. We need to figure out ways of fixing this.

By thinking about the planning in terms of the SSM-framework we get a hint at what sort of gameplay that can constitute "narrative play": When you form a plan in Mental Model space it is important that the actions are mostly grounded in the data received from Story space. Compare the the following two plans:

1) "First I pick up 10 items to increase the character X's trust meter, this will allow me to reach the 'friendship'-threshold and X will now be part of my crew. This awards me 10 points in range combat bonus."

2) "If I help out X with cleaning her room, I might be able to be friends with her. This would be great as I could then ask her to join us on our journey. She seems like a great sharpshooter and I would feel much safer with her onboard."

This is a fairly simplistic example, but I hope I get the point across. Both of these describe the same plan, but they have vastly different in how the data is interpreted. Number 1 is just all abstract system-space, and the number 2 has a more narrative feel, and is grounded in the story space. When the gameplay is about making plans like the second example, that is when we start to get something that feels like proper narrative play. This is a crucial step in evolving the art of interactive storytelling.

---

I believe thinking about planning is a crucial step in order to get better narrative games. For too long, game design has relied on the planning component arising naturally out of 'standard' gameplay, but when we no longer have that we need to take extra care. It's imperative to understand that it drives gameplay, and therefore that we need to make sure our narrative experiences include this. Planning is by no means a silver bullet, but it's a really important ingredient. It's certainly something that we're putting a lot of thought into when making our future titles here at Frictional Games.



Footnotes:

1) If anyone has other concrete resources describing planning as a fundamental part of games I'd love to hear about them. Please post about them in the comments if you know any.

2) Steve Lee had an excellent lecture called "An Approach to Holistic Level Design" at this year's GDC where he talked a lot about player intentionality. This is another concept closely related to planning.

Nenhum comentário:

Postar um comentário