dream in sketches

dream in sketches was the working title for a post long gone. Now it’s more like dream with sketches, but the old name lingers like memories of Kraft cheese and forts at the Alphabet Tree, Reno NV. I really want to talk about “linear physics,” which is something the G-Sketch team has been working on.

The “agent physics” (one moving actor) used in games like Line Rider and Jack Russell can be approximated with a simple rule:

SCALAR internal_energy, internal_energy_falling

VECTOR last_applied

each cycle:

if touching:

internal_energy += internal_energy_falling

internal_energy_falling = 0

internal_energy += <OBJECT.last_movement, downward vector>

last_applied = tangent * internal_energy

apply last_applied

else:

internal_energy_falling += 1

apply last_applied

apply downward vector * internal_energy_falling

done

For this to work, the game tool must be able to trigger on “touching” and compute the tangent (normalized) at the touching point. The point (called the OBJECT) must be aware of its motion last cycle. Finally the environment must support “line occlusion”, where motion over lines is occluded by the normal.

The big deal with linear physics is that it is completely specified by the above rule. So you can change the behavior of gravity and directional forces by simply re-drawing them.

Leave a Reply


Locations of visitors to this page