The Players' Lens - Designing the Camera System
Camera by Genre
The camera in a game is the lens through which the player experiences the game. Different camera systems will be employed depending on the circumstances of the game itself. For instance, games that prioritize making player's feel as if they are experiencing the game themselves will be from a first-person-perspective. My favorite examples of this are horror games. Many of these games aim to insert the player directly into the experience. For this same reason, many first person horror games will also leave the protagonist unclear and silent, so that the player can more easily insert themselves into the game.
It is my belief that the genre with the most complicated camera systems are 3D platformers. Players must be able to navigate themselves and their camera within a 3D space at the same time, and this can be quite tricky--even for a player with average level of experience.
Because of this, 3D platform games will prioritize creating elaborate camera systems that are:
- Intuitive
- Semi-Autonomous
- Apparent
Whether or not a 3D platformer has an effective camera system is usually a player's first judgment of quality. While it may seem easy in theory, actually creating the system for such a complex system to work can be a great undertaking (as soon I found out through my work on Jungle Jim.)
Autonomous Flow
3D platformers aim to automate many aspects of the camera so that the player can focus on the platforming. The rotation, camera distance, and collision of the camera change dynamically to present a clear view to the player, even without their input. With this in mind, there are many autonomous camera features in Jungle Jim to assist the player.
Auto-Pivoting
Many 3D platformers implement "auto-pivoting" to their camera system. What this means, is that as the player walks left and right of the camera, the camera will rotate with a pivot to keep looking towards the players intended direction.
This causes the camera to feel almost as if it is controlled by a cameraman, and helps the player keep their camera oriented to the direction they are turning to without having to influence the right joystick constantly.
This is a hard feature to adjust, but it strongly affects game feel. If the auto-pivoting is non-existent, the player will constantly be begrudgingly moving the camera for every minor alteration. If the auto-pivoting is too high, it can make platforming in the space difficult to perform.
I think allowing the player to control how much influence the auto-pivoting has for themselves would be a great option, but I did something different for Jungle Jim. I will go more in depth about it later, but the auto-pivoting can be disabled/enabled in certain areas of the level, as well as through player control input. This makes it so that the auto-pivoting can be altered for an optimal situation.
Auto-Panning
As the player moves fully left or fully right, they will be unable to see what is directly in front of them. To counteract this, Auto-Panning was implemented. The camera will rotate to the left or right to "pan" where the player is in the screen space, allowing for the player to see in front of themselves while moving laterally. The camera will then interpolate back to initial rotation, centering the player in the screen again.
Camera Distance
The distance of the camera compared to the player will dynamically shift depending on where the player is in the level. There are situations in which the camera should be closer and those of which it should be farther to present the game space appropriately.
Another adjustment I made was to increase the camera's distance the higher it is compared to the player. This allows the player to see the game space from a birds-eye-view, rather than just viewing the ground.
Camera Aim
The aim of the camera can also be controlled autonomously in certain parts of the level. For situations such as a tunnel, the camera should shift to avoid collision as well as centering itself so the player can see ahead of them. The direction of the camera is controlled through a Vector and an interpolation speed for the XY and Z axis. The vector can also be toggled to work both ways like an axis.
Camera Collision
Many games will feature cameras that will trace to the player and snap in front when blocked so that the player is always on screen. This effect alone is not enough for Jungle Jim. The reasoning is because when a player needs to move around in a 3D space in complex ways like in a platformer, the camera constantly snapping forwards and backwards on even the smallest ledge is incredibly jarring. Because of this, I implemented a more sophisticated system.
The camera will only snap when the camera itself hits geometry, not when geometry obstructs the view of the player. Instead, the player will become silhouetted behind geometry blocking its view. This system has proven to be effective in allowing players to platform with greater camera precision due to them not having to play the game with an invisible stick tied between themselves and the camera.
This system has existed for awhile, and exists in many other games(notably the Mario series), but I had to figure out how to program and execute this system myself, and it was one of my greatest undertakings of the project.
Player Camera Control
Autonomous features are great, but the player should always be able to control their view of the world. Jungle Jim features fast-paced movement, so it is important that the player is able to quickly, accurately, and simply determine their camera's behavior. This should be intuitive enough for the player to be able to perform without much thought at all. I wanted to give the player all of the options they need to control the camera's behavior.
Cam Acceleration
Jungle Jim can be played on both keyboard and controller. For those using controller, camera acceleration was added to the right joystick to control the camera. As the player moves the camera for longer, the speed of the cameras rotation will speed up. This allows the player to move the camera quickly, while at the same time allowing for small adjustments to the camera to also be made. This setting is also toggleable in the options of the game, so that the player can disable it if they desire to.
Zoom Button
Being able to control the distance of the camera compared to the player can be a valuable tool for players. When the camera is up close, the player feels faster and more immersed with the world and the character. Downside of a close camera, is that there is less visual space to show the players surroundings. A camera that is far away has the inverse effect. Often times, players will want to fully control how they are experiencing the world, and allowing them to adjust their "lens" into the world is a great accomodation for that desire.
For Jungle Jim, the player needs to be able to quickly adjust this while performing other actions. Pressing the right joystick inwards will toggle the camera between close, normal, and far camera distances. Since cam zones can control the distance of the camera autonomously, the camzone value is added to the players desired camera distance with a clamp. This makes it so that the camera is always taking account for the players desired view point.
Focus Button
Sometimes the player will want to immediately correct their camera to an optimal position. The left shoulder button will "focus" the camera. This usually quickly swings the camera behind the player, facing their forward direction while bringing the camera up and down to just above their position.
That alone is great, but the "focus" can be much smarter for the player. When the camera is zoomed out far, the player is able to see more of the environment. Often, I would notice players using the camera in a near birds-eye view to play, as they could more easily see enemies and platforms from that perspective.
During this, the focus button shouldn't snap the camera down as the player is very intentionally keeping the camera in that position. If the camera's distance is above a certain threshold, the focus will only rotate the camera to the players facing direction, without swinging the camera back down behind them.
Lock Button
As mentioned before, the camera system has an auto pivoting feature. Depending on what kind of obstacle the player is facing, the auto-pivoting can either be desired or not desired. Precision platforming is much easier with the auto pivoting disabled.
While camzones can disable the auto-pivoting, there are also areas where the player should have full control of this feature. With this in mind, the right shoulder button will toggle the auto-pivoting. To make this easier for the player to understand, it is referred to as "locking" and "unlocking" the camera.
Jungle Jim (WIP Page)
The world is your jungle gym!
Status | In development |
Author | yosheDev |
Genre | Platformer, Adventure |
Tags | 3D, 3D Platformer, Cute, Funny, movement, Singleplayer, Third Person, Unreal Engine |
Leave a comment
Log in with itch.io to leave a comment.