The struggle between Light and Dark

When making a horror game an important ingredient is the darkness. When in a dark place people tend to be more easily spooked and have a more vivid imagination, a genetic heritage passed on from our ancestors who were hunted by predators at night. Taking advantage of this is important and just changing the light level of an environment can make a huge difference in the scare factor.

Of course one cannot just turn off the lights and hope to make a scary game. The player still need to be able to see something, as watching a pitch black image is not all that exciting. The appropriate amount of light also depends on the type of environment and the type of events that will take place. If the environment is very large, then it might need to be brighter, whereas smaller rooms, where it is easier to navigate, can be darker.

Added to this the player is usually equipped with some kind of lantern or flashlight to help illuminate. In Amnesia (and the penumbra tech demo) the player has a vague light around her to help make the closest surroundings more easy to see. Penumbra Overture and Black Plague had a large blue help light when sneaking in darkness, although this had the problem of illuminating too much. Finally another trick is to add “fog” that gets blacker the longer the distance and this gives a the darkness a more thick and oppressive feel. This was used to great effect in the first Silent Hill game and gave the added visual effect of enemies emerging from the darkness a head of you.

Once starting to implement this, a huge problem appear: Darkness is Subjective! This means that a certain area willseem to have a different light level depending on who plays it and how it is played.

The first problem comes from the monitor itself and depend on:

  • Light level of the room.
  • Settings on the monitor.

This means that depending on the current setup at a player, a scene can look vastly different. The only way to get around this is by some sort of setup screen. Ever since I made Fiend I have been obsessed by this and always make sure to do preparations when playing a horror game. The problem is that most games do not provide with any such screen and when they do the setting is often far from optimum and makes game way too bright. I cannot understand how game developers can miss something as important as this and wonder if they ever did any tests in a dark room when creating the adjustment screen (or even played the game using the purposed settings). It is even worse with movies and although I can not think of anyone who has raised this problem before, it can make a huge difference when watching a horror flick.

As implied above, I think it is essential to have a good light level setup screen for a game (and would like it for movies). For Penumbra we had an in-game gamma value that could be tweaked and also a test image to calibrate against. There were however two large flaws here. First of all the judgment required (“Make this screen barely visible”) is a highly subjective! Instead we should have had some simpler and more accurate test and in Amnesia we will have two squares of different light levels, where one should be visible and the other not. This is far from perfect, but avoids some of the extra subjectivity. Secondly, gamma is not all there is to it: changing the contrast makes a large difference and can make the calibration image fail. There is also the actual brightness to be change which of course also make a large difference. To make matters worse these three values (gamma, contrast and brightness) affect each other too.

The problems does not stop there though! It also turns out that the apparent light level changes depending on the light environment it is in. This illusion clearly illustrates the point:

Although it is hard to believe, the squares A and B are of exactly the same light level! A game example of this is in Silent Hill were the background light level looks much darker when the flashlight is off than when it is on. This means that when you setup your monitor to look good when flashlight is on, it looks too bright when it is turned off. The game developers should actually have decreased the ambient light when the flashlight was off in order to give the best effect. Another example is how a game can look much darker when running in windowed mode because of a brightly colored desktop image (note: windowed mode usually do make a game objectivly darker, but this problem can add to the effect).

So how to solve this struggle between light and dark? For developers it is important to always check a settings screen and adjust gamma before testing the lighting in a level. And to do this properly there must off course be good tools for doing just that. Another important thing is to always try the light level of a map in different ways. How does it look when the flashlight is on, when it’s off, what happens when the fog comes rolling in, etc. Changes in the environment and gameplay can greatly affect the perceived darkness which in turn can have great effect on the game’s ambiance.

It is also upon the players to make sure that they set up properly before playing. I have read several reviews where the reviewer claimed that the game was too dark and one can wonder if they really had set up properly. One can also wonder if the makers of the game gave proper direction on how a good set up would be like! There needs to measures taken on both sides to assure that a game can reach its potential to frighten.

How do you go about with setting up monitor gamma and so on? How much thought have you given this in the past?

Maps with s-tile

Originally posted by Luis.

The tool guy is back with some more dirty inside secrets on the development. This post was meant to talk a bit about the Level Editor, but first I need to tell you about something you might not know… and it’s called tilemapping.

The term tilemapping refers to a technique born in the mid 80’s or so, back when videogames were pretty much down to 2D. These games used 2D images to represent the game world and entities in it. A 2D image is, in a nutshell, a grid of color values or pixels, with the following parameters:

  • Size in pixels (width x height): these values tell how big our image is – 64×64, 320×200, 1280×800…
  • Color depth/bits per pixel(bpp): precision used to store an individual pixel in the image – 8 bpp, 16 bpp, 24 bpp, 32 bpp. This parameter pretty much depends on the format we are using to display our image.

To understand the need for such a technique, we have to think in terms of the hardware available back in the day. We are talking about machines with veeery limited resources, i.e. real slow CPU’s and quite low on memory (far from a single megabyte), so one had to be really careful and always keep an eye on those limits when developing… and even more if developing a game.

Many older 2D games out there display a quite big and detailed world where the game action takes place, and with big here I mean many times the screen (Turrican‘s huge maps being a real good example of this). So, let’s do a simple example:

  1. Figure our system has a graphic mode with a screen size of 320×200 pixels and 8 bpp for color depth (and we are talking high tech here).
  2. Now, we want our game to have maps with a moderate size of 960×200 (that’s only three times the screen width). The first solution that comes to mind is making a 960×200 drawing that represents the map. Doing the math, that is 960*200*8 bits = 960×200 bytes = 187.5 KB in memory at runtime. Not that much, I agree, but back in the day we could have limits like 256 KB in our main memory, so in this case we would have little room left for the rest of the game data (not to mention the worst and most common case would actually be having even lower limits and much higher needs)

So here’s where the tilemapping technique comes in. The technique itself is rather simple: we have an array of small (e.g. 16×16, 24×24,…) images called tiles, containing all the graphic details we need in our level, plus a 2D collection of integer values (almost like an image), which would act as the actual map, indicating which tile goes where. In our example, using a moderate set of 20 different 24×24 tiles and a 20×9 sized int array, we manage to build a big enough map to fit our needs, with a cost of 20*24*24 + 20*9*2 = 11880 bytes = 11.6 KB. Now that’s saving memory, don’t you think? ;).

Although nowadays we have tech advanced enough to kiss tilemapping goodbye, it’s still used, specially in games for small and limited devices such as cellphones and hand-held consoles. Actually, Fiend and Energetic use tilemapping for levels 🙂

Little 2D horror gem
The Energetic map editor, in all its glory

After having bored you all with all this seemingly pointless babble, I’ll tell you how most 3D games do for levels. There are many ways of having a 3D world. Most common is creating a huge 3D model in the modeling program of choice, that is all the geometry and texture mapping done there. While this is cool, any 3D artist out there would say it is a pretty time-consuming task, and doesn’t allow much reuse of stuff.

I know it looks untextured and that… but does this ring a bell?

What we are doing in Unknown is to create several sets of 3D pieces and make maps using them as building blocks. One can have a production-quality map in less than four days with this method, and thanks to the excellent job from our artists, the results are really nice to the eye as well.

Quite impressive what you can do with such simple pieces I must say… kudos to Jens

As you might have noticed, there’s quite a similarity in both cases. We can make a close analogy between the big 2D drawing and the huge 3D model map, and our current mapping method to the ancient tilemapping technique, although our point is not related to saving memory really, but to save time and sanity. Still, our technique allows for more flexibility, such as going back to the “huge 3D model” totally (by creating a piece containing the whole map geometry), or partially (just a room). Also, we have a grid, but only to ease the task of aligning pieces, so we are not constrained by it.

There’s little left to add really. I hope this served at the very least to give you guys a little overview on one of the most famous game development techniques that has been around for quite a lot of time, and how its basic principle can still apply to today’s methods.

Just couldn’t help myself

A History of violence. Part 1

Some links in this article have expired and have been removed.

Ever since I started working on horror games (first was a simple 2d game called Fiend) I have been thinking about what kind of combat one wants in a horror game. This question was even more important when working on Penumbra as we had some problems in Overture concerning weapons. Our idea was that player would want at least something to defend themselves with, so we gave them some weak weapons and cumbersome combat mechanics, thinking it would only be used as last line of defense. Instead all kinds of problems arose, some players thought that since there where weapons, combat was meant to be used and complained about it be boring. Others figured out some tricks with the combat and thought it was way too easy. Very few players seemed play the game like we intended it to and we had to fix this somehow.

In Black Plague we took the decision to skip combat altogether and let the player be as vulnerable as possible. Not only did this make the design easier for us (could always assume enemies where alive), but most players also found the game scarier and more fun to play. Still, I think that there should be some way to use weapons, as it seems like such a “natural” thing. For example: if some monster/bad guy traps you in a corner, you will probably grab what ever is near and try to use it as means to get away. This kind of mechanic is also very common in horror movies, for example Scream uses it quite a bit.

For our new game “Unknown” we first considered using weapons and having them as defense only. But after some playtesting, the same problems that we had in Overture popped up. Some found the combat way to easy and others found it almost impossible. As trying to configure good difficult settings would be really hard, we decided to tone down combat and make the player very vulnerable instead. Further gameplay testing seem to confirm that this was the right thing to do.

In part 2 I will discuss the different kinds of combat found in games.

Until then: What are your thoughts on the combat in Overture and the lack thereof in Black Plague? Does removing combat really make a game scarier or is just a matter of how it is implemented?