Part 7: Dynamic Orbiting Camera


Camera and... Action!

The camera is the eye into the magic universe of a video game and has a crucial role in shaping the player's experience. The camera perspective and movement should go unnoticed, but at the same time the camera dynamics really affects how the player experiences the game.

Dynamic camera

Many 3D games use a third-person camera that follows the avatar from behind. Oftentimes the the player is not restricted to a fixed-angle and is offered a dynamic camera that can pivot around the avatar using a mouse or joystick. 

A common feature of dynamic third-person cameras is that when moving forward after looking around, the camera will automatically slide back in behind the player character. The assumption is that what's in front of the avatar is what's the most important to see while moving forward. 

In Pirate Sea Jam the dynamic third-person camera works slightly different. The player can move the camera around the ship but it will not fall in behind the ship when the player stops pivoting the camera. Instead the camera will perserve its perspective until manually moved again. The reason behind this behaviour is that for a player engaging in naval combat the most important view might not be straight ahead, but rather towards the sides where the cannons are firing at an enemy sloop. 

For Pirate Ship Jam it is less obvious what angle the camera should align to when the player is not actively moving the camera. Consequently the  camera does not gravitate towards any particular position in relation to the player ship. Future game play testing might reveal that there's a natural position for the camera to fall back into after after the player stops looking around. 

If you try out the game and have any opinion, please leave a comment.

Line-of-sight

Currently Pirate Sea Jam only consist of open ocean, so there are no objects like islands that can come in between the player ship and the camera. Having the line-of-sight broken when the avatar navigates in a complexly setup level is a common problem for 3D games. This issue can be addressed by making the camera aware of obstacles and swing off to one side to adjust its position in relation to the avatar and avoid having things in the game world obscuring the avatar. 

This maybe needs to be addressed in future versions of Pirate Sea Jam that includes island and possibly other objects in the environment that could break the line-of-sight. 

Different camera distance for different angles

In Pirate Sea Jam the camera will never drop fully to offer a worm's eye view. The player will always be looking slightly down at the ship from an angle of at least 20 degrees. In the opposite direction, the player can pitch the camera so that it looks downwards at the ship. 

Note that the bird's eye view actually reduces the visibility and hides the horizon. To compensate for the smaller field of view, the camera distance is increased as it swings up. In contrast, the camera goes in for of a closeup view when the perspective is more level with the horizon.

Camera angle and distance

The camera distance is increased with the pitch to compensate for the reduced visibility

Remapping directional controls

When using mouse and keyboard to control the ship in Pirate Sea Jam, the player simply turns the ship to port or starboard using the "A" and "D" keys. 

Pirate Sea Jam offers a virtual joystick to control the ship when the player uses a touch screen. The ship will steer in the direction of the stick, which is kind of stating the obvious. But note that when going from using a static camera to a dynamic camera, directional controls need to be remapped.  To steer the ship in the direction of the stick rather than in the cardinal direction (north, east, northeast etc) requires the directional controls to seamlessly be adjusted as the camera orbits around the ship.

Next up

With the camera now being dynamic and following the ship around in the game world it has become more and more evident that the ocean is currently just a small patch of water. Next up will be to extend the ocean into the horizon. 

Ship ahoy!

Get Pirate Sea Jam

Leave a comment

Log in with itch.io to leave a comment.