Game Development Reference
In-Depth Information
F IGURE 8.2
Screenshot of the platform demo.
the engine in part V. If you create mass aggregates, they will appear to slide over the
ground as if skating on ice. Try replacing the infinite masses of the platform demo
and see the platform slide about.
If you are intending to implement only a mass-aggregate physics system, then it
is worth skipping forward to chapter 15. The discussion of friction there can be easily
adapted for particle contacts. In fact the mathematics is a little simpler: we can ignore
all the rotational components of the contact.
For anything but the simplest assemblies of particle masses, it may be worth im-
plementing the full physics engine in any case. You can create any object with a mass-
aggregate system, but as the number of constraints increases, so does the burden on
the collision response system and the tendency for stiff constraints to flex slightly as
groups of hard constraints compete to be resolved. A full rigid-body solution is the
most practical for general physics simulation. It's time to bite the bullet and move
from particles to complete rotating, extended objects.
8.2.3
B LOB G AMES
Recently there have been a couple of games with soft-bodied characters simulated in
a way that is easy to replicate with our engine.
The independent Gish and the hit PSP game Loco Roco use 2D characters made
up of a set of particles (in the case of Loco Roco you get more particles as you play;
in the case of Gish there appear to be three or four at all times). These particles are
connected together using soft springs, so they can move a reasonable distance apart.
To avoid moving too far apart the springs have a limit of elasticity, beyond which they
act as rods and cannot be further extended (you could use this limit to split the blob
into smaller blobs).
The difficult part of using this setup is to then render the whole character as the
agglomeration of blobs. In 2D this can be done by superimposing a circle on each
particle, and making sure the springs don't allow the circles to separate from one an-
other, giving the impression of a soft blob. In both 2D and 3D you could also use a
Search Nedrilad ::

Custom Search