Spring is in the Air

A Bridge To Somewhere

Gravity is a feature in games that most people can understand fairly easily. In most games, gravity is assign the downward direction, so that if they fall off a cliff, or building side, or whateverelse the player might encounter in games like Tomb Raider or an Indiana Jones game set in the depths of a jungle. If we really wanted to, we could figure out the exact physics of a rope bridge and apply that physics model to the bridge. This could be tedious, time and resource consuming which in today's game industry is not always desired. A much simpler way of applying believablephysics to the bridge would be to approximate the bridges movement using multiple "invisible" springs. These springs wouldn't be encountered by players in the game, instead, they would "suspend" the bridge. We could attach these springs to fix points in space above the bridge, while their lower ends were attached to the bridge. When the bridge is empty, these springs rest at theirequilibrium points. When a player mounts the bridge, these "physics springs" start to stretch downward (assuming gravity is down). As a player crosses the bridge, the section with the player on it would be deforming its springs the most. Springs to either side of the player would gradually return to their equilibrium points.


Rope Bridge

Point of View

Another way in which spring physics can be applied to gaming is in the implementation of the "camera" in third person games. In first person games, the player sees the environment from the perspective of their character in the world (think Halo), in third person games, the player sees the environment from the perspective of a "camera" that follows the player, either over the shoulder, or perhaps elevated slightly above the player, and back a ways. For obvious reasons, we don't want the player to "leave behind" the camera, so we end up having to tether the camera to the player somehow. Once again, this tethering is "invisible", and is not seen by the player.

A very flexible option for tethering the camera to the player is to use a spring. With camera tethered to the player using a spring model, we gain the flexibility of having the camera position adjust its distance in accordance with the world around it. When the player is out in the open, the tether spring can sit at its equilibrium point. If important action is happening out of frame, we can stretch the spring to pull the camera back and show more of the environment. If our player is moving through some narrow hallway or tunnel, we can compress the spring to bring the camera into the constraints of the tunnel.

By modeling spring physics on the camera "tether" we can ensure the during normal play, the camera is always the same distance from the player. In the scope of camera modeling, we don't need to worry about the springs breaking point, or its permanent deformation point when compressed.


Spring attached camera