The lack of movement ability of the object in one direction but the ability to move in the opposite direction in abacus

I drew on my experience riding the NYC subways at rush hour to develop this:

Sample run
subwayPush.aia (106.5 KB)

The idea is to add lists of sprite components to act as tracks, with disabled tiny sprites at each end of each track, to act as stoppers.

Before each sprite responds to a drag, it must check the gap between it and its neighbor in that drag direction, and shove that neighbor a minimal distance to allow room for the current sprite's drag.

The procedures are recursive, like the chain of pushing needed to crowd into a subway car.

(Thanks to @TimAI2 for the Sprites)
(Thanks to @mah_bagh for a fun problem)

Detailed explanation:

The Tokyo subway image is a little misleading. AI2 sprites are inelastic, compared to subway passengers, so they don't transfer force according to Hooke's Law.

What is being transferred from passenger to passenger (sprite to sprite) is a polite request:

Could you please move dY pixels in this direction, if you don't mind, and if you have the space to do so?

(dY is short for delta Y, math speak for a difference between two Y values. It's Y values because the sprites move up and down in this example.)

The Sprites are lined up along a line on a Canvas:

(See further posts in this thread, to give the board a chance to catch up.)

6 Likes