Monday, 21 January 2013

Goals and Storytelling

Let's talk about goals in storytelling games. Not really the far-reaching "save the princess" or "kill the evil dude" kind of goals, but the local and moment-to-moment goals that face a player throughout the experience. I have sort of touched upon this in the scene-approach to high level story telling story design post, but want to discuss it a bit further. I think this is another major reason why there still a need for either violence or puzzles to drive the story forward. The reason being that the player does not know what they should be doing otherwise.

In a non-interactive story the characters can behave in certain way because it works for the narrative. They think about the things that are relevant to the story being told, and perform actions that have interesting outcomes. In an interactive work, it just does not work like this. In order to control outcomes, the player would basically  have to know the future of any action, something that is neither possible or desirable. Thus, the game will have to guide the player into making the actions that the story requires in order to give an engaging output. This is where violence and puzzles come into play.

Games based around violence teach player the following: You need to kill anything in sight and when you run out of things to slaughter you need to progress until you find more stuff to fight. Once the player accepts this the problem with having is non-issue and the role of a designer is to weave a story into this mode of progression.

Puzzles have a different set up. Here the whole idea is to constantly bring up riddles for the player to solve, and then create a story out of that. What gives the player goals and directions are the requirements of the currently encountered and unsolved puzzles.

A more abstract and direct version of this is simply to have a certain goal artifact and then evolve the entire game about retrieving this. Portal, Braid, World of Goo, etc are all examples of this approach.

Puzzles and combat are the most popular ways of settings up goals, but others exist as well.

Most platform games, like Super Mario, just have the player walking in a single direction. While these games tend not have much story content, there are more experimental games that do. Passage, One Chance and Everyday the Same Dream use this approach quite directly and are sort of very simplified platformers. I think Dear Esther and Journey can also be said to use this kind of approach, as the player does not really have any other goals than moving in a certain direction.

Another approach is to not give the player any explicit goals at all, but let them just interact until something interesting happens. There are not really any longer games that uses this method to implement player progression. The Path and some of Vector Park's games do it to a certain extent, but then only for a single specific scene. Adventure games use in limited sequences, like when being thrown into a new location and forced to explore, but never for any longer stretches. The problem with this approach is that the player cannot really make any plans, which brings down the sense of agency and engagement quite a bit. This makes this only work for short bursts, often when a sense of disorientation is appropriate.

Finally, I have to mention the on-rails method, which is essentially what Walking Dead and Heavy Rain do. It is sort of similar to the "walk this way" approach of platformers, but just removes the required interaction for forward movement. These games drags you along whether you want it to or not, only letting you interact in very small and specific situations. An interesting aspect is that the "interact until something happens"-approach can work quite nicely here, partly because there are often relatively massive amounts of exposition before each interactive moment.  This combined with a closed of scene makes it possible to set up a goal using purely plot means.

This pretty much sums up how any storytelling games goes about creating low-level goals.

When starting out the new Super Secret Project I was very much into "interact until something happens"-approach, but it did not really work. The lack of gaminess did not make the player more into the story, but created frustration  and made them spend most mental energy pondering "what the hell am I supposed to do?". Our current approach is instead to use a combination of puzzles and the "walk this way"-approach.

Puzzles tend to always give certain feel to the environments; machines to boot up, broken bridges to cross and that sort of thing. This limits the range of goals quite a bit and is often quite evident in games. For instance, in Amnesia: The Dark Descent there is always the need to open some form of door. The challenge here is to be creative of course, but it is a very hard problem. To make puzzles out of various situations is one of the biggest challenges we face.

I think it is also very important to recognize that a big part of puzzles is to provide goals. Starting with Amnesia, we stopped seeing puzzles as challenges and instead view them like interesting activities. Focus is put on making them engaging and fitting to the narrative, instead of (as was the case the before) making them challenging. One cannot remove the challenge entirely though, because then a certain immersive quality of the puzzle is lost. There needs to still be a certain amount of "revelation" taking place in order to feel as if you are really making a connection with the game's world.

The "walk this way"-approach is very interesting as it gives much more freedom in the kind of environments that can be used. Now you can place the game in just a about any situation without any need to figure out ways to use it gameplay wise. The main issue is that you need to make your environments very linear. For the approach to work the goal must always be very clear, else it turns into a puzzle. In order to keep players engaged, it is also important that there is reason for continue going in a certain direction. This can either be the promise of some reward when getting there, or a steady flow of interesting things happening along the way.

I am unsure how long a game can be and what kind of stories can be sustained by only using the "walk this way"-approach. All the current ones (that I know of) are quite short. Interestingly, the more complex and direct the story (like One Chance and  ImmorTall) the shorter, and the more abstract and vague (Dear Esther and Journey) the longer. This might just be by accident, but might also be  a sign of some kind of limit to the approach. Worth nothing is that compared to other approaching, there is little inherent engagement in this one.  Simply moving forward simply stop being interesting after a while and something else is needed.

I think the question of various ways to set up goals is a  really important issue but I do not see it addressed very often, or really at all. For some reason any design articles I come across are based on a type of design and then just take that as dogma. Perhaps I am just missing all the nice papers/articles out there?

Also interested in hearing if I missed out on any ways to create the low-level goals in a storytelling game!


Wednesday, 5 December 2012

High-Level Storytelling Design

Introduction
I recently started to play the demo for the upcoming adventure game Primordia. I really like the art-style, the setting, themes and the characters (perhaps with the exception of a somewhat annoying companion). Despite this I am finding myself not being that engaged when playing it. The main reason for this is that the game is in a very traditional point-and-click form, which means that it is mainly all about solving puzzles. Despite some good design and an in-game hint system, its gameplay back-bone is holding it back.
Note: This does not mean that Primordia is bad game though, more on this in the end notes.

At the same time we have currently been in the middle of going over some design thinking in our upcoming Super Secret Project. We have been trying to evolve the type of high level design we have used for our previous games and in that process encountered a few problems and come to a few intriguing insights.

The problems I had with Primordia and the issues we have had with our own project are closely related and deal with the high level design used for games focusing on story-telling. This sort of design is what this post will be about. I will start by going over the basic problems, then cover more recent advancements and finally outline our own approach.


The Immersion Conjecture
Since the middle of the 90s or so, the image of adventure games as the kings of videogame storytelling has slowly dwindled. Instead they have given way to more action oriented titles and nowadays most of the major storytelling efforts lie in the action-adventure genre. What has happened is that the puzzle-centric design has been replaced by one where some sort of core mechanic makes up the bulk of the experience.

I think neither of these approaches is a good way to properly do storytelling in a game. The problem with both are that they have a strong focus on the competitive aspect of games. In both of these designs the main goal is not about being immersed but about beating challenges. I have discussed this to great lengths in the paper The Self, Presence and Storytelling. The points important for this discussion are the following:

  • Challenge-oriented games have a core design which I call "black box design". This means that the main goal for the player is to intuitively figure out the game's underlying systems and to beat them.
  • When the focus is on a system of a game, it detracts attention from, or even directly contradicts, its fiction. As a result it diminishes the story aspects of the game.
  • The main focus of  games with storytelling should instead be on creating immersion or, more precisely put, a sense of presence. This is done by having a strong continuous input-out loop between the player and game.
Before going into high level approaches that focus on immersion, the normal adventure design need to be discussed. 


The Puzzle Approach
This approach is pretty much how all of the classic adventure games are built. In essence, they are made up from a set of interconnected tasks that need to be completed. In order to get to A you need to B and C, C requires that D and E are done and so forth. The entire game basically becomes a big puzzle for the player to solve.

This approach has its root in the very first adventure games ever made: Adventure. The game started out as a mapping of a cave system that the author, William Crowther, had been part of exploring. When making an interactive version of it, various puzzle elements, partly inspired by D & D, were added. Apparently the author did not find the virtual exploration of the caves engaging enough on its own. Something more was needed, and the puzzle elements was added to fill that void; a decision that would go on to influence the coming decades of adventure games. (I wonder how different history would be if Crowther had added some Dear Esther-like narrative instead!).

The reason why this approach is so successful is because it makes it very easy to weave an interactive environment together with a story. The puzzles always give the player various tasks to do which provides motivation to go forward. More importantly it serves as a mean for the player to become part of the game's world. It makes it meaningful to converse with characters and it forces players to understand how the virtual world works.

This comes as a cost though. Because the focus is on constantly providing riddles and quests for the player, the game must have a story that support this. There must be a reason for the player to question characters, ways to provide clear goals, plenty opportunity to set up obstacles and an environment that support clever puzzles. The result of this can be seen very clearly; most adventure game are either some variation on mystery/detective story or a classic, fairytale-like, grand quest one.

On top of this comes the problem discussed in the paper, namely that the constant scrutinizing of the game's world eats away on the player's make-belief. It is simply not possible for players to let story-engagement be their main focus. If they fail to stay in a puzzle solving mindset the game will refuse them to advance. This often leads to the somewhat weird situation where playing the game with a guide is more enjoyable than playing it the proper unguided way.

These problem have been known for quite a while, and in recent times some games have popped up that try to do things differently. I will now discuss the most widely used, and most successful, alternative.



The Linear Plot Approach
The basic premise for this approach is to craft the game like a normal non-interactive story. One then looks for parts were it is possible to insert some sort of player interaction and add these to the otherwise passive experience. (This is not how would go about creation such a game exactly, but it describes the type design quite nicely.) The first game I know that did this was Photopia, and it used it very successfully. It is widely regarded as a highly rewarding and emotional experience. The approach has been more popularized by Fahrenheit, which unfortunately got a much more negative response. More recently the approach gained a lot of success in Telltale's adaption of The Walking Dead and here this approach have really showed its advantage to a bigger audience. I think it is by far the best usage of a linear plot design done so far. To The Moon is another, and different, example that also uses this approach to great effect.

What makes this approach so effective is that it is much better at keeping up the narrative momentum. When using the puzzle approach, it is highly likely that players will get stuck and taken out of the experience. With the linear plot approach this happen very rarely since the game is so focused. Right before it is time to give the player control, the protagonist can pretty much explicitly state what is needed to be done without it feeling out of place.

What I find striking about this approach is the very strong scenes that the games let you take part in. Heavy has the basement capture and self-mutilation scene. Walking Dead has the staircase stand off and mercy killing scenes. By having a very strict and controlled path throughout the game, it is possible put the player inside very specific scenes that would have been hard to set up in other kind of games.

Another big advantage is that it allows for a lot more diverse stories, as there is much less pressure on building everything into a puzzle structure. The approach has focus on the presence building qualities of the game medium instead of the competitive (black-box) aspects. Games like Photopia and Walking Dead clearly show how effective this is and there is probably a lot more that can be explored here.

Of course all is not well with designing a game in this way. There are some areas that are really problematic. The main issue is that there is not really much interaction, especially when it comes to building a sense of presence. The basic premise of the approach is just this, so it is really an intrinsic fault and not that interesting to discuss. However, more subtle, and intriguing, problems arise when it comes to picking the actual parts where the interaction happen. Two main issues arise here.

One is that it is very hard to have some sort of consistency in interaction, partly because activities can be so diverse and partly because they happen so rarely. Heavy Rain went the route of QTE's and the result is not that good. While there are some really good scenes, as a whole there are just too many arbitrary button presses. Walking Dead does it a lot better with having a few types of more intuitive input, such as aiming a cross-hair and mashing a single button. But the infrequent usage and not always clear functioning makes this problematic still. Dialog usually work better, but that interaction lacks a tight feedback loop instead. (However, an interesting way in which both games try and make this more immersive if by having a time-limit and banging on about how every choice has consequences).

The other issue is that much of the sense of exploration evaporates. Whenever players are given a space to explore it is very confined and static. The cause of this is that the game always need to make sure that you can go back into "cut scene mode" after an interactive section is over. There is a bottleneck that needs to be reached with very specific requirements met. This means one has to be very careful about moving characters, changing the environment, and so on, in order for the next cut scene to feel coherent. There is also the problem of keeping the quality of characters when starting a less controlled section that lack the tightly polished look of a cut scene. This means only so much can be done with characters during these more open sequences. Finally, because you need to have some overall unity in the control scheme, any open sections can only have the simplest of input. Usually only movement is allowed and the rest handled by some sort of menu like system (basically like a point-and-click game). In the end interaction during these part come off as clunky and contrived.

There is also a big problem when it comes to production. Simpler games like Photopia and To The Moon do not suffer so much from this, but in a game like Heavy Rain it is very evident. Because much of the game is not actively played but passively watched , the need for high quality cut scenes is a must. It needs to be made sure that the player can be engaged when the presence-feedback loop is weak or completely missing. This means tons of assets, which in turn requires the game to be planned far ahead. For instance, Heavy Rain had the complete script written before the production started. And then all motion capture and voice recording needed to be done before gameplay could be tried out. When it comes to making the actual game there is little room for change and iteration, and one basically has to stick with the script. This is a big disadvantage for interactive media as much of the real good stuff can come from unexpected directions.

While linear plot design gives a better sense of flow in the narrative and a more coherently immersive experience, it still feels lacking. The main problem is that there is so much interactive down-time and great loss in the feeling of exploration. There needs to be some other way of doing things. For our upcoming Super Secret Project we wanted to try a different route and craft an experience where you play the whole time.



The Scene Approach
The design that we have come up with is something I will refer to as the "Scene Approach". The basic idea is that you give the player an area, a scene, where they are free to roam. When appropriate players are able to leave and enter the next scene. Each scene should have a strong focus on some form of activity and/or theme  and be self contained. Moving on to the next scene should be evident, either by a very simple interaction (e.g. opening a door), some form of activity (e.g. starting a generator) or by reaching some sort of state (e.g. waiting for a 2 minutes). The same underlying base mechanics should be used throughout the game and interactions should behave in a consistent manner. The wanted end result is to have an experience where the narrative flows throughout the game, but retains a tight interaction loop and a strong sense of agency. It is basically about taking the better interactive moments from the linear plot approach and stretching them out into scenes with globally coherent interaction.

Is this really possible? The moments in the linear plot approach have been carefully set up and are normally extremely focused and contained. Is it really possible to recreate this in a more open environment and without any cut scenes? The scene approach cannot possibility recreate every situation found in a linear plot game, but if done correctly it should be possible to come pretty close.

The first requirement is that the levels need to be designed in such a way that players are rewarded and driven towards behaving in certain ways. For instance, in early designs we tried to give tons of freedom in what players could do, but much of this freedom resulted in actions that went against the narrative. This is negative freedom. Instead we have tried to limit actions into "what makes sense for the protagonist to do" and do so without breaking any sort of consistency. This is positive freedom. The goal is then to eliminate the negative freedom and maximize the positive one, which is very simple to say but have proven hard to do in practice.

Even with a neatly designed scene, all is not set. There is still the problem of communicating the goals. Early on I thought that it was just a matter of having an interesting enough environment and players would partake in the activities provided. The problem is that the larger the environments become the harder it is for players to figure out what is of interest and what is not. It is also very easy to loose ones sense of direction and become unsure of what to do next. This problem is even more severe now that we pulled back on the problem solving focus. Players are not in the mood for constantly looking for clues but are instead focused on soaking up the narrative and having an immersive experience. This is how we want them to be, and should thus not be something that hinders progress.

To get around this, we have had to made sure that the larger a scene is, the more clear and obvious your end goal becomes. Also, any activity in a large area should always be optional unless it is closely related, both spatially and conceptually, to the object or state that makes the game progress to the next scene. Whenever the player is required to carry out some activity, the scope of a scene need to be decreased. The greater the freedom is in terms of possible actions, the less actions must be compulsory.

The scenes themselves are not the only problem though. A perhaps even greater concern is how to connect them. At first I thought this would not be a big issue and that you could get away with pretty loose connections. Problems arise very quickly though, the main being that the experience simply stops making sense for the player. There must be some sort of logical connection and narrative flow between each scene. If not it becomes increasingly harder for player to figure out what they should be doing. This means either lowering the degrees of positive freedom or to have more set up for each scene. The first option gives something like Thirty Flights of Loving and the second is basically to use the linear plot approach. We do not want to do either, so having clear connections is a must.

This results in an a sort of curious conclusion. One of our goals in storytelling is to rely as little as possible on plot in order to give an experience with a strong sense of agency. However, in order to provide as much positive freedom as possible, it is essential that the scenes are put together in a very tight and engaging fashion. In other words, on a scene level there is a great need for a strong plot in order to have as little plot as possible in the actual scenes.

In turn this limits what kind of scenes that are possible. Now that the connections need to make sense, it is not possible to simply fill the game with scenes that lends themselves very well to our core mechanics. So far we have to been able to pull this off quite nicely, and we are slowly wrapping our minds around these concepts.


End Notes
This is not some final verdict on how to improve upon the adventure game genre. It just summarizes a bit on the design direction that we are taking for our next game. Nothing is final yet, so I am not sure how it all will turn out in the end, or how much of the above we will be actually using. This is at least our current thinking and what we are working on now.

Also have say few ending words on adventure games in general. It might sound in the beginning like I loathe traditional click and point games, but this is not the case. I have enjoyed playing a lot of adventure games, and using puzzle approach for high-level game design is a very valid one. The best adventure games really take advantage of this, for instance Monkey Island and Broken Sword. These games are made in a way that makes the design really works and creates a really memorable and unique experience. However, for some games, like Primordia, my main draw is not to have this kind of experience. In this game I am more interested in exploration and getting immersed in the world. The classic puzzle design does not do this properly and I feel as if my experience is not as good as it can be. Primordia is still a good game and it uses the setting nicely to create some interesting puzzles. But it feels like they could have taken a lot of the game's essence and packaged into a form that would have delivered it much better.



Monday, 8 October 2012

Humble beginnings of the HPL Engine

I recently stumbled upon some really old videos with gameplay tests in the HPL engine and decided they would be fun to show off. This was not our first foray into 3D first person horror (Unbirth was), but it was the first time the the HPL engine was used. All of these are gameplay videos are from a student project then know as "The Hatch" and later became the "Penumbra Tech Demo".



6th of December 2005 - First Gameplay Test
I had now been working on the engine from scratch since late July, so a little more than 5 months. It is fun to see that most of the important interaction features are in at this point. The sound system for the physics is actually pretty much the same we have used until Amnesia. Jens is the one who recorded this.




7th of February 2006 - Improved Gameplay Test
The engine is now a little bit more refined, mainly with interaction and speed I think. I think that the portal visibility system got added during this time (I actually remember that I came up with a solution in the parking lot when buying groceries for Christmas). Recorded by Jens as well.



23rd of March 2006 - AI Test
The first proper AI test. It now has all the basic systems in, pathfinding, hearing and so on. Most of these features actually survived until Amnesia as well (and still use some variants). It is great to see how the AI works with the physics and shoves the door open as you try to close it. Interestingly, this creature has the most complex pathfinding we have used so far since it had two separate ways of moving about. I recorded this myself and the resolution is so crappy because my computer was unable record and play the game at the same time otherwise.


4th of April 2006 - Kind of Proper Gameplay
Pretty much all features needed to power the gameplay in the tech demo is in now. I think I recorded it.

The final version of the tech demo can be found here.


Monday, 1 October 2012

Hiring: Level Designer Wanted

Frictional Games, the creators of Amnesia and Penumbra series, seeks a Level Designer for a new game project. Taking what we learned from our previous games we aim to take horror and interactive story-telling to the next level. We are looking for a talented individual to help us design and implement this vision.

Main Responsibilities:
  • To take creative decisions on how puzzles, events, layout are to be designed.
  • Through scripting implement gameplay in a level.
  • To place sounds, tweak lighting and similar things to create atmosphere.
  • Communicate with writers and artists on how to achieve the goals of a level.
  • Provide feedback on design suggestions and implemented gameplay.

Work conditions:
The job will be carried out on a distance so you need to be able to work from home. This means you must have a fast internet connection, strong work moral and live in a timezone near the Swedish one (which is GMT+1). If you are not living in Sweden, you must also be able to invoice (or at least be willing to set this up). The work environment at Frictional Games is quite open and you need to be able to schedule your own time and take initiative when required.

Required qualifications:
  • Having designed and implement gameplay for a commercial game or a released mod/indie project.
  • Progressive view on video games and a will to evolve the medium.
  • Excellent understanding of game design for adventure games and immersive simulations.
  • Good enough coding skills to implement your ideas.
  • Experience in working with 3D level editing software.
  • Good understanding of lighting and architecture in 3D scenes.
  • In-depth knowledge on how to create an interactive narrative.
  • Not be shy of learning new things and work in areas out of your comfort zone.

Further Qualifications:
  • Experience in writing fiction.
  • Skills in 3D modeling.
  • Experience in the horror-genre.
  • Interest in science and science-fiction.
  • Experience with Fmod and/or sound-editing.
Send your application to jobs@frictionalgames.com. Attach your CV to the mail, but provide links for other files or images.

Privacy Policy
By sending us your application, you give us permission to store your personal information and attachments.

We store all applications in a secure system. The applications are stored for two years, after which they are deleted. If you want your your information removed earlier, please contact us through our Contact form. Read more in our Privacy Policy.


Monday, 10 September 2012

Amnesia - Two Years Later

Introduction
It has now passed a little more than two years since we launched Amnesia and one year since the last report, so time for another! One would think that there is perhaps not much to be said this long after release, especially for a single player game with no built-in social features. But the fact is that Amnesia is still going very strong and 2012 will probably be the best financial year here at Frictional Games, which we would never had expected two years ago.

Sales
As always, let's start with the sales and some numbers. The first thing will be to figure out how many units we have sold in total, which is actually really hard to pin down. The biggest reasons for the uncertainty is that Amnesia was part of the Humble Indie Bundle (HIB) earlier this year and Potato Bundle last year. Both of these account for quite a lot of sales. Without counting the units bought there our total lands at 710 000 units. Adding all HIB and Potato Sack sales gets us to 1 360 000 units in total, which can be called the optimistic figure. This means that, optimistically speaking, Amnesia has sold almost 1.4 million units! This reasoning is not strictly speaking invalid, but I think that one should not really count anyone that bought the bundle and already owned Amnesia as a proper unit. A slightly pessimistic guess (not far from reality I think) is that 2/3 of every bundle and pack buyer already owned Amnesia. This gives us about 920 000 units in total, pessimistically speaking. So saying that we have sold a million units seems fair. Wait... a million units! Oh shit!!

Despite that huge number of sales, what I think is more interesting is how good the monthly sales still are. Not counting any discounts, the monthly full price sales lie at over 10 000 units. This means that less then every 5th minute someone in the world is buying a copy of Amnesia. This is totally insane to me. The figures themselves are far beyond any guesses we would have made two years ago. It is also insane, because this number is actually higher than it was around three months after initial launch. That a game can still be going this good two years after is truly remarkable.  This success is due to many factors, some of which are the uniqueness of the game (horror games without combat do not really exist on PC), the large modding community (more on this later) and the steady flood of YouTube clips (which is in turn is fueled by the modding community output).

Also worth noting that our Penumbra games are still going on at the same rate that they always have. They are still selling about the same numbers (a little more actually) as they did three years ago. This totals to about 900 units per month. Taking all sales together is more than enough to support the company, financing A Machine For Pigs (more on that later) and having some left over. This means that we are in a very good position and aim to use it to take more risk and try out new things (more on this later).

I think we have never disclosed how much we Amnesia cost to make, so might as well do that here. The (exactly) three years of development cost a total of 360 000 US Dollars. It has since earned more than ten times that. Take that investors we talked to in 2009!

Piracy
It has been over a year since we even thought about piracy. With sales as good as above we cannot really see this as an issue worth more than two lines in this post, so screw it.

Modding
I mentioned it a bit in last years summary, but feel it was not given enough focus. When we created the possibility of custom stories, it was something we thought of very late and I think Luis implemented it in less than a day. We put a few days on adding documentation our wiki as well, but all in all, it was a tiny effort compared to the rest of the game. Despite that, this aspect as been immensely important for the game and while it is hard to give any exact features in terms of sales, the influence on our community is easily seen. Before modding started, we had one or two daily post on our message boards. But as the modding community has grown, it is now up in over 40! (Remember this on the boards of a 2 year old a single player game.) There is even a long meme thread regarding the custom story community. What is interesting is that there are even internal expressions used, like "poofer", that we at Frictional did not know about and that was specific to Amnesia modding.

The output of modding community has been quite big as well. Amnesia is as of writing the 2nd most popular game at ModDB and sports 176 finished mods. Not only do this amount of user content lengthen the life of the game, it has also increased the amount of YouTube movies made with an Amnesia theme. There are lots of popular Let's Play channels that have devoted quite a bit of time with just playing various user-made custom stories. As mentioned earlier this have probably played a large role in keeping our monthly sales up.

It is quite clear that allowing users to create content is a feature worth putting time into. I also think that we managed to have a pretty good balance between having simple tools and still allowing a lot of possibilities. It is far from perfect though and for our new engine (which AMFP is not using) will have lots of improvements. It will still be possible to use the simple scripting as before, but now you can pretty much remake whatever you like and do not have to use a complicated total conversion to do so.

Future
The next big thing for us will be the release of Amnesia: A Machine For Pigs, which is a follow-up developed by thechineseroom and produced by us. This release will be very interesting in many ways. First of all it is a big experiment for us to do this sort of collaboration, so from the start we had no idea how it would turn out. Judging from the latest build we have nothing to worry about though, and so far it looks great. Another interesting aspect is how well it will sell compared to the initial Amnesia launch. Not only is the market a lot bigger now than two years ago, Amnesia is more known. The result will be very important to how we plan our future. Release for AMFP is expected early 2013.

At Frictional Games our main concern is our new super secret project. We do not want to say much about this project yet,but we can disclose that it will be horror and that it will be first person. One of the things I was most disappointed with in Amnesia was that it never really managed to deliver any deeper themes, but was more like a shallow fright-fest. For the new project we want to change that and really try and bring a certain theme to the front. Our hope is that this will create a very special experience, creating horror in a much more disturbing way. For the curious, some information on the path we are taking can be found in this paper. The game's current status is that we have pretty much all tech working, and have started to playtest the first parts. Still, a lot is up in the air and the current design is bound to change. While we do not want the project to go on forever, we want to use our good financial situation the best we can and make sure we do not just rush something out (which we did with Amnesia actually). Release will probably be some time in 2014.

Frictional Games have also grown over the last year and we now employ 11 people, which feels very close to the maximum. At least the way we run the company right now. We also do not want to lose the small underdog spirit that has fueled us in the past. When you have such financially different situation compared to when you started I think it is easy to get caught up in expansion, wild ideas and basically do not get much done. So, we do our best to keep our feet firmly on the ground, to be strict on deadlines and to always remember our humble pasts. At the same time we will not take any easy solutions and play it safe. After the successes we have had, I think it is our responsibility to use our money and independence the best way possible.


Friday, 7 September 2012

Tech Feature: HDR Lighting


Introduction

Hello my name is Peter and I’m the new graphics and engine programmer. New is not really the correct word since I have been working at Frictional for a year now. During this time I have updated the engine and added a lot of new graphic features. This will be the first of my blog posts descripting the changes that have been made.


HDR


One of the biggest changes to the the new engine is the introduction of HDR (High Dynamic Range) Lighting. This is a technique to increase the detail of the lighting system. The benefit of using HDR is that bright things can be really bright, dark things can be really dark, and details can be seen in both.

In nature there is no limit to how bright something can be. The difference between a 60 W light bulb and sunshine hitting the earth is around 10 000 luminance (cd/m^2). This means that we need a way to store high intensity values while keeping the quality and precision of the dark areas. Thankfully there already exists a method for storing such values - by using floating point numbers.

We use a 16-bit fp RGBA buffer to store our lighting. This gives us enough of a dynamic range without taking up too much memory.


Tone mapping

A normal computer monitor can display 8-bit colors between the value of [0..1]. Because of this the monitor can not display a 16-bit HDR image directly. To be displayed the image will have to be converted to 8-bit while keeping as much of the details as possible.

Tone mapping is the process of converting an image of dynamic range to one with a clamped range between [0..1].

The simplest method for doing this is to use the Reinhard tone mapping algorithm.

vec3 color = x / (x + 1.0)

No matter how high x gets the final value will always stay between [0..1]. The problem with Reinhard is that it desaturates your dark colors and removes contrast. In the brighter parts of the image Reinhard produces great result with its soft highlights.

What you want to have is an algorithm that preserves the saturation of the color in the dark areas and that keeps as much of the contrast as possible.

I ended up choosing an algorithm created by John Hable for Uncharted 2.

vec3 Uncharted2Tonemap(vec3 x)
{
float A = 0.15;
float B = 0.50;
float C = 0.10;
float D = 0.20;
float E = 0.02;
float F = 0.30;

return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;
}
Left: Long curve, Right: S-curve near dark values



This algorithm is based on a filmic tone mapping algorithm created by Kodak. It keeps the nice highlights from Reinhard while using a slightly S-shaped curve too keep the dark colors saturated.



Exposure

If you have been sitting in a dark room for some time and walk out into the sun, your eyes will not be ready for the bright light and you will have to squint. After a while your eyes will have adjusted to the light and it will not bother you anymore.

Exposure is a way to control the intensity of light that gets passed through the lens. In the eye this is controlled by the size of the pupil and in a camera it is done by selecting for how long the sensor should be active.

There are a few different ways to control exposure in a game. It can be controlled automatically by storing the average luminance over a few frames and calculating a exposure from that value.
We choose to go with a much simpler method that lets the artists control the exposure by dividing the level into areas that have different exposures. So in a dark area the exposure can be increased and in an outdoor area the exposure can be decreased.

vec3 color = Uncharted2Tonemap(scene_color * exposure)


White Point

A white point is used to increase the contrast of the image. This is the value that is selected to be the brightest any pixel can be. Pixels brighter than the white point will be clamped to 1.0.

vec3 color = Uncharted2Tonemap(scene_color * exposure) / Uncharted2Tonemap(white_point)

HDR Bloom

When a pixel is brighter than the white point it can be used to generate an additional post effect called HDR Bloom. Pixels that get too bright should start bleeding over to other nearby pixels, producing a halo around them. It is a subtle effect that adds realism to the image.

To solve this I use a few render passes. First a bright pass is applied to the image which removes all pixels that are below the white point and scales down all the pixels that are above it. The result is then blurred to create the halos. The blurred image is then added to the original image. The HDR Bloom effect must be performed before the tone mapping.


Final Thoughts

I would say that HDRL and filmic tone mapping is the most important part of any rendering pipeline. It greatly increases the quality of lighting and will make your game look much more realistic.

But HDR and tone mapping is all for nothing if your calculations are not done in linear color space. My next tech feature will focus on gamma correction and the linear color space.

References