Puyo Puyo Tsu/Free fall

From Puyo Nexus Wiki
Jump to: navigation, search

Free fall occurs in various situations:

  • when the player splits his pair in two;
  • when receiving ojama puyos;
  • when a chain disappears, puyos above the hole fill the gap by free-falling.

Their speed is subject to gravity, a force increasing their speed as each frame passes.

Gravity routine


The routine works on absolute, on-screen pixel coordinates. It will apply them displacement values and check whether or not the coordinates crossed a cell boundary to advance the board coordinates accordingly.

beam-x and beam-y are the on-screen coordinates, which are stored on 2 bytes. These value are extended by 16 trailing bits, which will accumulate sub-pixel displacements, but this part is truncated when displaying the sprite, so we only have full pixel values. Hence, the speed and acceleration are represented by 32-bit values, the highest 16 of which directly impact the pixel coordinate, while the lowest 16 will have an effect only because of arithmetic carry.

The routine does the following:

  • applies the displacement to the vertical axis coordinate according to the current free-falling speed;
  • checks if the puyo has crossed to a new board cell;
  • checks if the new cell is blocked, and exits if that's the case, rounding the coordinates to the bottom of the last free cell;
  • updates the puyo's board coordinates accordingly;
  • updates the free-falling speed by applying gravity acceleration (add acceleration value to the speed that will be used at the next frame);
  • cap the speed to terminal velocity.

Equation parameters

The gravity parameters differ depending on the situation.

Pair-splitting parameters

These parameter are used when splitting a pair in two:

  • initial speed: 0x10000 (1 pixel/frame)
  • terminal velocity: 0x80000 (8 pixels/frame)
  • acceleration: 0x03000 (0.1875 pixels/frame2)

Bulk ojama parameters

These parameters are valid when ojamas fall in bulk, i.e. when receiving at least a full rock of garbage:

  • initial speed: 0 (0 pixel/frame)
  • terminal velocity: 0x80000 (8 pixels/frame)
  • acceleration for column 1: 0x02400 (0.140625 pixels/frame2)
  • acceleration for column 2: 0x02600 (0.1484375 pixels/frame2)
  • acceleration for column 3: 0x02000 (0.125 pixels/frame2)
  • acceleration for column 4: 0x02A00 (0.1640625 pixels/frame2)
  • acceleration for column 5: 0x02200 (0.1328125 pixels/frame2)
  • acceleration for column 6: 0x02800 (0.15625 pixels/frame2)

Frame data

Free-fall frame data tables are maintained on the dedicated page.