Sponsored By

How can physics make a genuine difference to gameplay in today's AAA games, beyond the novelty? Veteran designer Luban (Splinter Cell series) discusses his work on physics-enhanced Unreal Tournament 3 mods and general principles of design that are enhanced by physics elements.

Pascal Luban, Blogger

December 4, 2007

17 Min Read

The use of physics in video games is not something new. Many of us lovingly remember Lunar Lander and Marble Madness. The gameplay in such games fully consisted in interacting with gravity. Today it's new technical solutions that enable an advanced management of physics in mass-market games that is the novelty.

Physics management is quite demanding in terms of computing power. Thanks to the increased sales of multicore CPUs and the availability of dedicated physics cards (such as that developed by Ageia), a much more intense use of physics in games may now be considered.

The real question in such cases is what we are to do with this new resource. Until now, the use of physics in action games was most often limited to cosmetic effects. These are important for the gamer's immersion in the world but don't really change the gameplay.

The question is now to know what the possible applications in terms of gameplay are. How are we going to provide the gamer with new experiences?

The purpose of this article is to offer some answers and share my experience which I gained while designing the CTF-Tornado multiplayer map, one of the maps available in an Unreal Tournament 3 mod designed to take advantage of the processor developed by Ageia. The map was developed by the talented Gameco Graphics studio.

marblemadness2.jpg


lunar_lander2.gif

Part One: Introduction

Definitions

Let's start with a few definitions. The scope of physics is not limited to gravity simulation and collisions between objects. Physics also includes the following applications:

  • Fluid dynamics, either liquid or gaseous

  • Distortion of soft objects such as fabric or of hard objects such as metal plate or even solid hollow objects

  • Simulation of friction and viscosities

  • Changes in the state of matter such as the passage of water from the liquid state to the solid state

  • Breaking of materials

Thus physics covers a wide scope of issues, some of which have never been used in games. The potential is huge but the issues faced by the developers are equally challenging.

Challenges arising from the use of physics in games

There are several challenges:

  • The requirements in terms of computing capacity

  • The challenge in multiplayer games

  • The incompatibility between the scripted dimension of certain games and the chaotic nature of physics

Let's take a closer look at each of them.

The requirements in terms of computing capacity

Physics management requires a huge computing capacity. It is not by accident that physics has not been widely used in games so far, despite the fact that good software physics engines like Havok have been available for several years.

In the current games, only a very small portion of the CPU power is allotted to physics, between 10 and 25% of a single core. Yet, physics requires considerable resources. Let's consider the simplest case, that of collision management.

The movement of each dynamic object is managed by many parameters (direction of movement, speed, rotation on multiple axes) which must be recalculated for each image. Then, interactions among dynamic objects must be calculated. Ten dynamic objects that are packed against each other require far more calculations than if they did not touch each other. Two technical solutions are available:

  • The arrival of multi-core CPUs will provide a massive amount of CPU power. Dual-cores are still too weak but quad-cores will begin to bring the power needed for massive applications of physics. Will it be enough? We don't know for sure. Quad-cores will provide much more power than we currently have, but game engine requirements will increase accordingly and there is no guarantee that there will be enough extra power left for physics applications. Furthermore, programming multiple cores is more complex and generates its own overhead. We might have to wait for eight--core processors.

  • The second solution is the use of dedicated physics cards such as the one manufactured by Ageia. Like any new hardware, it will pick up when enough exciting applications will be available, which in turn will be developed if the installed base is large enough.

Physics also makes more work for the CPU outside of the physics in itself

  • The use of physics in one level makes the pathfinding far more complex. In fact, it must adapt on-the-fly to a changing environment. If a large block falls down in the middle of a road, the artificial intelligence of the game must take it into account, so that the NPCs controlled by the AI move around the object or use it for cover.

  • The lights and the shadows must be dynamic. If objects move or walls are destroyed, pre-calculated shadows or lights cannot be used. Thus, the use of dynamic lighting becomes essential. This can be avoided by choosing environments with little contrast, but the graphical quality of the map suffers.

The challenge posed in multiplayer gaming

The use of physics in a multiplayer game offers very interesting perspectives from the gameplay point of view, as the gamer can then modify the topology to his or her advantage. However, when compared to a single player game, the multiplayer game offers additional constraints as well: the available bandwidth for sessions played on the internet, and the latency. The challenge is to synchronize the events that have a direct impact of the gameplay on all machines.

Until now, in most games, only the position of the gamers and their projectiles had to be synchronized. If physics is to have an impact on gameplay, all physics events should be synchronized as well: physical objects, clouds of particles that are likely to block the view, damage zones etc.

Unfortunately, this constraint is largely independent of the computing power of the game machine, but several solutions enable the use of physics in a multiplayer session. The strategy to follow is to have a physics implementation whose impact is focused on the client machines and which requires little synchronization. Thus, the number of large objects that have an impact on the gameplay should be limited, as they have to be synchronized on all machines.

On the other hand, a cloud made up of particles or small objects does not require perfect synchronization on all machines. Synchronizing the position of the cloud and its possible damage volume would suffice. Thus, if synchronizing the effects of the fall of a watchtower is desired, what should be synchronized on all machines is the damage volume associated with the fall of debris and not the debris itself, of which there is far too much. Physics locally manages the collisions between debris.

The level design should take this constraint into account from the very beginning by allowing that a maximum number of physical effects should be managed locally, and by providing a "budget" of objects to synchronize.

The incompatibility between the scripted dimension of certain games and the chaotic nature of physics

All games that offer a single experience aim to provide the gamer with the best sensations. For game development cost reasons, such games offer a linear level design, thus ensuring that the gamer takes advantage of the projected special effects, cutscenes and scripted combat situations. The linear level design also allows controlling the rhythm of the game. If the gamer starts to roam in a place where nothing interesting happens, they might get bored.

Of course there are many exceptions that offer open game environments such as most of the RPGs or certain action games that take place outdoors, such as Far Cry, but the majority of action/adventure games provide linear or semi-linear architecture.

ctftornado.jpgIn such a context, the use of physics may lead to situations that are unpredicted by the level designer. This is called emergent gameplay.

This type of gameplay is usually welcome, but the use of physics provides for the possibility to change the topology of a level and therefore create situations like blocked movements, disturbance of the characters' AI or disappearance of key items for the script. These kinds of problems may also occur in the multiplayer maps.

Thus, in CTF-Tornado we quickly became aware that the movement of large objects by the tornado or gamers could block the access to the bases and therefore prevent them from getting back or laying down the captured flags. This option had to be offered, as it opens new tactical possibilities, but care had to be taken not to block play on the map.

Consequently, various solutions were developed: the number of access paths was increased and we offered gamers the opportunity to get rid of the possible obstacles themselves by using the Impact Hammer, one of the Unreal Tournament 3 weapons that provide a repelling effect.

Part Two: Gameplay Applications of Physics

Except for games where physics provide the main gameplay mechanism, physics has been essentially used in games for cosmetic purposes. Even today very few games use physics to improve their gameplay. The reason for this is simple. Mass-market games like action games are already very demanding in terms of computing power and we have seen that physics is especially demanding in that area, and strongly impacts other parameters such as real-time display.

Today, a more intensive use of physics is conceivable, regardless of the kind of game -- but for what purpose?

In my opinion, there are four groups of application:

  • To give the player new ways to handle the challenges he or she will face in the game

  • To create mobile game environments

  • To develop powerful learning mechanisms

  • To allow the player to build his own tools

Providing the gamer with new tools

For most games, the idea behind the gameplay is: 1) offer the gamer a challenge to overcome, such as defeating a group of enemies and 2) provide him or her with tools to succeed: weapons, animations, background elements etc. The gamer's objective is to learn how to master such tools and use them wisely to overcome the challenge.

From this perspective, any new "tool" that is offered to the gamer should enable him or her to achieve this objective. The same is true for physics. If it does not provide new ways for the gamer to overcome the challenge, it is completely useless from the gameplay perspective.

This tough reality should always be taken into account, for the use of physics remains highly demanding in terms of resources and implies significant decisions at the beginning of the project. Let's now look at a few ways to really take advantage of physics to improve gameplay.

Action games represent a major genre, so let's look at the possible uses of physics in action gameplay. In this kind of game, the gameplay lies essentially on the challenges of combat and movement. Physics should therefore provide the gamer with new tools to respond to the following problems:

  • Weaken or eliminate opponents

  • Protect himself or herself

  • Open or close a passage

  • Detect opponents

  • Hide from opponents

When the gamer's purpose is understood, numerous practical applications come to mind:

  • The destruction of background elements enables the gamer to reach an opponent from an advantageous point, gain protection by building a cover, open new paths or on the contrary, close existing paths.

  • Fluid management offers a totally new scope. Fluids may be either liquid or gaseous. They allow the player to light up a fire or let the wind blow it in right direction. The smoke generated by the player's actions may impair his opponents' vision, thus offering new tactical opportunities. A moving or expanding liquid may drastically affects the physics of the other bodies: certain bodies will sink, while other will float to the surface. Filling up or, on the contrary, emptying an area may also drastically change the combat and movement conditions and provide a totally new gameplay in an area previously already exploited. A moving fluid may also serve to carry an odor, thus widening the means of detection available for the gamer… and his or her opponents.

Non-static game environments

Today, almost all game levels are totally static. It is the opponents that animate them. Let's imagine games where the game environment itself is the opponent, or at least provides changing conditions. Physics allows for changing environments, with all the consequences: falling objects, loss of balance, objects more or less difficult to move according to the slope, etc.

Imagine an action game that takes place on a sinking ship. Compartments fill with water and change the movement of characters by blocking certain passageways, but also by putting out fires. The angle of the hull itself changes. Large objects can slide along the decks and be used as obstacles or even weapons. The complete change of the ship's angle, such as a turn around or passage to vertical, could lead to a drastic change of the circulation in the hull.

Other situations are imaginable: Fire, earthquake, tidal wave, bombing, sea storm, changes in gravity or space pressurization etc.

It is in fact what we did with CTF-Tornado. The tornado behaves as the "third team", by helping or putting at a disadvantage one of the two sides. The tornado changes the circulation in the map by blocking or opening numerous passageways. Its simple presence prevents the gamers from taking the shortest passageways. It also changes the defense conditions of the map by tearing off pieces of walls or roofs. It can even sidetrack gamers' projectiles!

Providing the gamer with a powerful learning mechanism

Playing is not an activity reserved to mankind. It is a mechanism of discovery and learning that had been developed by nature well before Homo Sapiens descended from their trees. Playing is learning. Of course this mechanism applies to our own games. The gamers learn in a FPS to anticipate their opponents' reactions and to evaluate the power of a weapon, for instance.

How do they do it? By exploring their game environment and by testing it, for example by using the available weapons and evaluating the results. It is thus possible to teach the gamers how to use tools they do not know. But this mechanism becomes much less efficient when the cause-effect relationship is not obvious. You've seen this in certain puzzles that do not respond to our logic but rather to that of the game designer that created them.

Physics is especially suitable for this kind of self-learning mechanism, since we know how it works in the real world. Thus, we instinctively know how the forces of gravity and fluid physics will influence a spilled liquid. Providing the gamers with gameplay that relies on physics enables them to find their own solutions to complex problems.

Think this is just hazy theory? Let's look at a few applications. In Half-Life 2 several moving puzzles lie on a well-known mechanism: buoyancy -- or its absence -- of certain objects. The gamer thus uses the positive buoyancy of barrels to make a heavy object float or, on the contrary, takes advantage of the mass of the metal pieces to make a floating object sink.

graw2_ai_01.jpg In the PC version of GRAW 2 developed by the Swedish studio Grin, gamers can get rid of opponents entrenched in a tower by causing its fall. Finally, let's consider the example of Switchball. In this puzzle game, some of the puzzles are solved by using balls of different densities. A player quickly discovers that too light a ball does not have enough energy to make its way through some obstacles.

A physical game environment would allow the player to use his or her initiative and spirit. The player can find solutions by using his or her own real-life experience.

Let's project ourselves ahead into the future and figure out what a level designer with a physical game environment available could accomplish. Imagine that a gamer is blocked by a group of opponents solidly entrenched behind a barricade. What solutions could he or she come up with to pass?

The falling of a tree or a building could crush opponents, a large cylindrical object could be moved by the player who would then be able to push it to make a mobile rampart, a vehicle could be freed along a slope in order to be used as a ram, a vehicle could explode so that the smoke column mask the player's movements. All these solutions derive from the simple observation of the environment and from our innate understanding of what is possible in the real world.

switchball.jpg

Letting players build their own tools

Physics enables the distortion of objects such as plates, hoses or beams. It is therefore imaginable to allow the gamer to shape them according to his or her needs. Thus, by distorting metal sheets, a player can build watercourses or ball paths. A skillfully cut canvas could act as roofing or veil within a survival simulation. The frailness of certain materials such as branches enables the building of traps by covering a hole with the respective materials. The flexibility features of a steel blade or board enable the building of a primitive catapult.

Such applications of physics would probably be limited to certain kinds of games such as puzzles or survival games. In fact, the interface would have to be adapted. But the fun potential of the game could be huge. Imagine a building game where each brick is designed with physical features. The gamer could build a totally unique game environment.

Conclusion

Physics is extremely demanding in terms of resources and some of the ideas that I have developed here are not currently achievable -- but the advances in the tools and technologies are foreseeable, giving us the power in the future. From now on, gameplay can be improved with uses that are not just cosmetic. The development of dynamic game environments that the player can change on the fly is already a trend in today's level design. Physics makes this evolution possible.

Near future technologies will astonish us and provide us with the power increase. The ball will then be in the court of the game and level designers who will then have to take this advantage we need to bring new experiences to the gamer.

Acknowledgements

I would like to thank the following persons for their contribution:

David Black

Hervé Vazeilles

James Dolan

Jean-Pierre Bordes

Majdi Kraiem

Monier Maher

Philippe Geldard

Read more about:

Features

About the Author(s)

Pascal Luban

Blogger

Pascal Luban is a freelance creative director and game designer based in France. He has been working in the game industry as a game or level designer since 1995 and has been commissioned by major studios and publishers including Activision, SCEE, Ubisoft and DICE. In particular, he was Lead Level Designer on the 'versus' multiplayer versions of both Splinter Cell: Pandora Tomorrow and Chaos Theory, he designed CTF-Tornado, a UT3 mod multiplayer map built to showcase the applications of physics to gameplay, he was creative Director on Wanted – Weapons of Fate and lead game designer on Fighters Uncaged, the first combat game for Kinect. His first game for mobile platforms, The One Hope, was published in 2007 by the Irish publishers Gmedia and has received the Best In Gaming award at the 2009 Digital Media Awards of Dublin. Leveraging his design experience on console and PC titles, Pascal is also working on social and Free-to-Play games. He contributed to the game design of Kartoon, a Facebook game currently under development at Kadank, he did a design mission on Treasure Madness, zSlide's successful Free-to-Play game and completed several design missions for French and American clients. Pascal is content director for the video game program at CIFACOM, a French school focusing on the new media industry.

Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like