Why Don’t Things Fall Up? Making Use of Physics Engines

When film director Stephen Spielberg first announced he would be collaborating on the development of a game for the Wii console, many people were intrigued as to what sort of storytelling extravaganza they might be treated too… At the time, I’m not sure many of the would have anticipated anything like the physics based puzzle game Boom Blox in which the aim is to knock stacks of blocks (“blox”?!) down as efficiently as possible!

(If you’re creatively minded, there’s also a “create” editor in Boom Blox that allows you create your own levels.)

So why does everything fall the way it does in Boom Blox? Physics…

In the post Gravity Waves, I mention three games based around simulated physics – Newtoon, Launchball (a browser based physics puzzle game, also with its own level creation tool) and Phun. In each case, the idea is to manipulate or create objects in the game world and then let physics – gravity, elasticity, and so on – have its way…

Crayon Physics is another construction-led physics game (in many respects reminiscent of Phun) in that the idea is to… well, watch the following video clip, and you decide…

How would you describe Crayon Physics?

Physics games are games that involve the player directly and purposefully engaging with the physics of the game world. But for many games, whether they are 2D Pacman like arcade games, or 3D games set in realistic simulated real world settings, physics still plays a part. Why can’t Pacman walk through a wall, for example? And why do cars crash just the way they do in many a 3D racing game? Physics, that’s why…

According to the presentation shown above (or otherwise), what, in the context of game physics, are:

  • “rigid bodies”;
  • “soft bodies”;
  • “ragdolls”.

In many games, a physics engine is used to manage the behaviour of both small and large objects alike according to set of mathematical equations that model the physics – that is, the physical behaviour – of the the objects. This behaviour extends from describing how objects move, or fall, to how they swerve round each other, and what happens when collide: people generally can’t walk through walls, for example, but neither do they tend to break, or shatter, or crumple…

The mathematics involved in calculating game physics can be very computationally expensive and difficult to programme, particularly as simulations get more realistic and require the behaviour of ever increasing numbers of particles to be modeled. Many games make use of licensed physics engines that have been developed by specialist companies or the larger game developers, which means that they can benefit from complex simulations without the need to programme that behaviour in from scratch.

Read the Gamasutra article Outsourcing Reality: Integrating a Commercial Physics Engine. If physics is (not yet) your thing, the following may help you in your reading:

  • Integration Basics: Geometry Export: what basic shapes is the physics engine likely to undertsand?
  • Time Management: what are ‘game time’, ‘frame time’ and ‘simulation time’ and how do they relate to each other?
  • Applying Forces: in what three ways can an object be compelled to move in a physical model?
  • Spatial Queries: in what ways might the physics engine allow ‘logical statements’ to be made about the interaction of different characters in the game world?
  • Integrating Keyframed Motion: although many game objects move in the way they do because of physics, and the forces applied to them, some objects may have been animated as keyframes – that is, they have been drawn to move in a single particular way and as such will not respond to any forces applied to them, although they may exert forces on objects they are in contact with…
  • Player Control Strategies: to simplify collision detection, a simple, regularly shaped ‘bounding box’ or ‘capsule’ is often drawn around game and player characters. This box is then used as the basis for collision detection.

    What are the ‘three fundamental approaches’ to controlling how the player character actually moves? How does the choice of approach affect the ‘usability’ of the game in terms of how easy the character is to control?

Plausible – and well modeled – game physics can make a significant difference to the feel of game, both from a usability (ease of control) point of view, as well as a degree of faithfulness point of view (for example, some racing games pride themselves on how realistic the physical behaviour of the cars is).

Getting to grips with game physics can also be a great way of learning about real physics – and the maths used to describe it – because it provides a real context for using the equations. If you would like to learn more about game physics, a good place to start is with these OpenLearn videos on differential equations

To learn more about physics games, visit the Fun-Motion physics games blog. As well as a comprehensive listing of physics related ‘games’, it also includes a wide range of posts and video clips relating to many issues of game physics.


2 Responses to “Why Don’t Things Fall Up? Making Use of Physics Engines”

  1. 1 Jo Iacovides July 23, 2008 at 1:10 pm

    Hi Tony

    I’m a research student in IET looking at video games and learning and have been reading your blog on and off for quite a while now – thanks for always giving me something to think about!

    Though the slideshow mentions Half-life 2 under the title physics as gameplay, I thought it might be worth mentioning Portal as a really good example of the same idea. Instead of a gravity gun, you have a portal gun which you need to use to get through a series of test chambers. After you complete each level, you can also listen to the designers commentary of how they put everything together, though I would have to check again to see whether they mention anything about explicit about the physics engine. Echochrome (http://www.youtube.com/watch?v=QfICeBtVv8U) is another example of a game that gets you to think about physics and perspective and it looks pretty challenging, though I haven’t had a chance to play it yet.

  2. 2 Tony Hirst October 17, 2008 at 11:11 pm

    Hi Jo – glad you find the posts thought provoking :-)

    The designers commentary sounds good – I guess this is like a director’s commentary as a film DVD extra?

    As far as gravity and physics stuff goes, I have to say I’ve had a lot of fun with Boom Blox on the wii, and I’m looking forward to World of Goo, too :-)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s



%d bloggers like this: