Featured Blog | This community-written post highlights the best of what the game industry has to offer. Read more like it on the Game Developer Blogs or learn how to Submit Your Own Blog Post
The curse of the camera
In developing Vortex Green, I challenged myself to design a game that is playable with different camera views: play it as a first-person shooter, and then replay it as an isometric game for a very different experience. Here I share my views on cameras.
It's very rare that you can play the same game with very different points of views. In fact, some game genres are defined entirely around the camera: First-Person Shooters or Third-Person Shooters, Dungeon Crawlers and Strategy Games (isometric or view-from-above), platformers (usually side-views). In developing Vortex Green, I have challenged myself to design a game that would be playable using different camera views. You can play it as a first-person shooter, and then replay it as an isometric game for a very different experience.
If you think it's as simple as changing the camera position and angle, read on. If you ever played a game with a bad camera, and think “why don't they just fix the camera”, again, read on. There is much more to the camera than meets the eye.
A simple change of camera angle changes the following: (1) how you control your character, (2) what you see and don't see, and ultimately, (3) gameplay focus, along with level design and game balance. Because gameplay is so fundamentally tied to what you can see, I will discuss those two topics jointly.
1. How you control your character
1.1 Transforming to the new screen coordinates
Players using the keyboard and mouse will often use keys “wasd” to move. In isometric games as well as first-person shooters, it's common for those keys to be used to move your character in a given direction, with perhaps the space bar to jump and the left ctrl to crouch. However, in a side-view platforming game, it is common for “w” to be used for jumping, and “s” for crouching.
This means that if the camera angle changes, the function of keys need to adapt. Ideally, developers include a way for players to assign keys to functions. However, in a game where the camera can change drastically, developers need to include both “smart keys” and “fixed keys”. Smart keys change function based on camera angle, e.g. we could make “w” move forward in first-person but jump in side-view. Fixed keys always perform the same function, e.g. “space” would always perform a jump, regardless of view.
1.2 Interpreting the mouse
Mouse movements should always translate into movements that approximately matches screen coordinates because it makes mouse usage more intuitive. What this means inside your game depends on the camera angle. In first-person, mouse coordinates translate directly to left-right and up-down angles your character is looking towards. In isometric view, mouse coordinates translate directly to left-right and far-near distances. In side-view, mouse coordinates translate directly to left-right and up-down distances.
You can use trigonometric transformations to go from screen coordinates to world coordinates and back. This may be unavoidable if you want to make sure the cursor doesn't exit the screen, and actually interacts with the objects it points to. When doing so, keep in mind that you are going from a 2D coordinate system to a 3D coordinate system. That is, when interpreting screen coordinates, you will need to assume a 3rd coordinate, e.g. that players either want to interact with objects at the same depth as their character, or with the nearest object that can be seen at the location of the cursor.
Note that each view poorly handles one type of information: first-person poorly handles distance, isometric poorly handles height, and side-view poorly handles depth (see section 2.3 below).
1.3 Joystick functions
The same concerns that apply to mouse and keyboard also apply to joysticks, except that joysticks are not restricted to work with screen coordinates like the mouse is. Nevertheless, the concept of smart and fixed functions discussed above (see section 1.1) should be extended to joysticks.
2 What you see
2.1 What is hidden
The first-person camera hides information about things that are on the other side of walls. They thus give an accurate view of what your character sees. Moreover, first-person cameras hide things that are behind you. Although it can be fun to scare players once in a while by having foes come at them from behind, do not abuse of this because too much turning around in first-person can cause nausea in some players. Most foes should come from one direction: ahead. By contrast, being surrounded by foes works really well in isometric views provided you have a good control scheme that allows you to target foes around you easily.
In isometric views, high walls can hide things that even the character should be able to see. This is to be avoided. You can either not draw these walls at all, or to draw them semi-transparently. This is especially important when the player's character becomes hidden by the walls. One common solution is to draw the player's character's outline when he is hidden, such that his position is always known.
Third-person perspectives are especially problematic with regards to the camera, as it is easy to end up with walls hiding your view. A common (and bad) approach is to bring the camera closer to your character if there are obstacles between the character and camera. This is problematic because (1) the camera changing distance becomes distracting, (2) the camera can get too close to your character in which case you might not be able to see much else, and (3) the algorithm detecting obstacles that block your view may not take into account obstacles that are not directly in front of the camera, and so you can still end up with your view blocked. A better solution is to keep the camera at fixed length (or controlled by players), and trace outlines of objects that players need to see, e.g. their character, nearby foes, and stepping platforms if they need to jump or navigate a narrow path.
2.2 What is outside of the camera range
Camera views like isometric or side-view can be zoomed in or out to change how far you can see around your character. However, doing so has many trade-offs. First, it affects how much details you see (see section 2.4). Second, if you increase the distance between your character and your camera (this is one common way to zoom out), it becomes more likely that objects like walls or foes will get between your character and the camera, thus obstructing your view (see section 2.1 for a solution). Third, it becomes harder to aim properly at long distances even with an aiming reticle, more so than in a first-person perspective.
So although it is easy to change zoom or viewing distance, realistically there is a range beyond which players cannot meaningfully interact with objects unless you include auto-targeting. For this reason, most side-view and isometric games tend to focus on weapons that are relatively good at short or medium ranges (i.e. melee or shotgun range) and tend to avoid long ranges (i.e. rifle or sniper range).
2.3 What is hard to judge
In first-person, distance is hard to judge. Moreover, foes that are close to you tend to move rapidly onscreen even with small physical movements. For this reason, combat tends to focus on medium- and long-range, with an emphasis on bullets that travel fast (or instantaneously) and in a straight line. However, foes can throw slow projectiles at you, that you are encouraged to dodge or block. Although distance is difficult to judge accurately in first-person perspective, time-to-collision is easier to judge. That is, players might have a hard time telling how far an object is, but they can accurately judge if and when a moving object will hit them.
An additional point to consider in first-person and third-person perspectives is that bullets don't necessarily hit where you aim. For example, if your character shoots from the hip (as they often do in Westerns), then the bullet will hit somewhere down and right (or left) of where you aim when shooting with your right (or left) gun. The mismatch between where you aim and where the bullet hits will appear greater for nearer objects. This problem is even more present in third-person shooters. This is the main reason why many developers choose to position the gun on the screen close to where the aiming reticle is, as this minimizes this problem. Another helpful advice is to position guns close to the body midline whenever possible. For example, in space simulations, it is harder to aim if weapons are positioned at the wing tips than if they are close to the cockpit.
In isometric perspectives, elevation is hard to judge. The common solution is to make all enemies, including flying enemies, to remain at the same height as the player. Changes in height of the terrain are usually illusory, that is, stairs are drawn but not given actual physical height. Another solution would be to given players weapons that are easy to use against foes positioned at different heights, e.g. auto-targeting or seeking attacks.
Side-view games give very poor information about which direction you are aiming towards. It would be easy for example to shoot slightly off to the right or left of foes. For this reason, side-view games tend to keep everything in the same depth plane. However, side-view games give excellent information about ballistic trajectories, which means that it is easier to throw grenades accurately or to jump accurately.
2.4 Artwork
First-person views don't generally require the player's character to be drawn. In single-player games, if you cannot see yourself in mirrors or cutscenes, you can even get away with not having a model for the player character. However, everything else needs to be shown with quite a bit of detail, especially that players can easily get close to objects. Projectiles need to be easy to see at different angles, and players need to know where projectiles come from. It is common to draw the path of bullets instead of just the bullet itself. Some artwork can be simplified by drawing using billboards, that is, by drawing a 2D object oriented towards the camera. For example, you can fake a sphere by drawing a circle facing the camera.
Isometric and side-view perspectives saves a lot of artwork because you never need to draw everything. Isometric views saves you from drawing ceilings or the bottom of things. Side-views save you from drawing one side of objects. In addition, you can reasonably make 3D-looking objects by just drawing a 2D picture. Older games tended to pre-render 3D objects to accelerate real-time rendering. These days, this trick is mostly used to save on artwork or for use on slower platforms like Internet games. Moreover, if the range of viewing distances is known, you can decide in advance how much detail needs to be visible and only create textures appropriate for those levels of detail.
3. Recommendations for multi-view games
Make sure you have a control system that intuitively adapts to the various camera views you allow (see section 1). Including both smart and fixed keys is a great way to allow players to customize their controls. Another option is let players map their controls independently for each view.
As much as possible, let the player select which camera view he is using, and make it easy for players to switch between camera views. This not only allows him to customize his experience, but also prevents the camera from switching views at unfortunate times.
Keep in mind that what the player sees will depend greatly on what camera view he chooses. It is possible to calculate which objects the character can see, and only display those. For example, some isometric games block the view of objects that are behind walls so that the player has to move his character to establish a line-of-sight before he sees the object. This way, players have access to the same information independent of camera view. Another option is to create gameplay that works well in different camera views, such as active combat that relies on control and timing more than on the element of surprise.
Medium-ranged combat work best in all views. A game that works across camera views will want to emphasize medium-ranged combat. Melee range and long-range combat can also be included, however you might want to take the following precautions: (1) make sure melee combatants have ways to get close to their ranged foes while staying alive, by for example giving them ways to run faster or block attacks, (2) make sure ranged combatants have ways to keep foes at a range, by for example giving them ways to slow down foes or push them back, (3) make sure that shorter ranged attacks have better defence and/or offence to compensate for the fact that they will on average get hit more times by long-range attacks before they get to attack back, and (4) make sure players can easily switch from short-range to long-range attacks, and/or don't need to.
Whenever possible, provide weapons that work well across views. This can be done either by giving those weapons characteristics that work well independent of view (e.g. spreading attacks, auto-targeting attacks, shields that block attacks from all directions) or changing the functionality of the weapon according to view (e.g. auto-adjusts for height in isometric view, but does not in first-person).
If you include weapons that don't work well across views, at least provide a few weapons that work well for each view. Then, players can either change the camera view to adapt to the challenge, or switch to a weapon more appropriate for the camera view.
Finally, make early levels work better across views by making levels more flat, and giving weapons that work better across views. As players learn to play, you can start introducing situations that are more challenging to given camera angles, and weapons that solve these challenges. When possible, teach players these skills with specific scenarios right before incorporating it into general gameplay.
Read more about:
Featured BlogsAbout the Author
You May Also Like