Difference between revisions of "Tetris Elements INI hacking"
(Yes, TE can be modded.)
|(5 intermediate revisions by 4 users not shown)|
Latest revision as of 13:48, 3 January 2019
Like games that implement SRS correctly, TE uses bounding-square rotation, but the bounding boxes normally of size 2 and 3 are extended to 4 and 5.
Tetris_Classic_SINGLE.ini has 12 piece records numbered Piece00 to Piece11. Piece00 through Piece06 represent TIJOLSZ; Piece07 through Piece11 seem unused. Each piece record consists of the integer size of the extended bounding box followed by a 5x5 array describing the shape of the piece; each nonzero makes a block in that space.
This is one of two common methods used in Soviet Mind Game implementations to represent tetrominoes. The other method is to store a list of (x, y) positions of each block in the shape.
Piece00 (T) is expressed in the file as
This might be easier to see as
Piece00=5, 0,0,0,0,0, 0,0,0,0,0, 0,5,5,5,0, 0,0,5,0,0, 0,0,0,0,0
- Piece00: T rotated 180, color 5, bounding box size 5
- Piece01: I rotated left, color 1, bounding box size 4
- Piece02: J rotated left, color 2, bounding box size 5
- Piece03: O, color 7, bounding box size 4
- Piece04: L rotated right, color 4, bounding box size 5
- Piece05: S, color 3, bounding box size 5
- Piece06: Z, color 6, bounding box size 5
- Piece07: L trimino, color 6, bounding box size 5
- Piece08: Solid 3x3 block, color 1, bounding box size 5
- Piece09: Solid 4x4 block, color 2, bounding box size 4
- Piece10: P pentomino, color 3, bounding box size 5
- Piece11: I pentomino, color 4, bounding box size 5
PieceEntry0 through PieceEntry6 describe the spawn positions of each piece. They are interpreted as the (x, y) of top left corner of piece's extended bounding box, where the top left corner of the playfield is (0, 0). All diameter-5 pieces' entry positions are set to (2, -2); diameter-4 pieces are set to (3, -2). This is consistent with SRS spawn positions (centered, rounding to the left).
PieceRot00 through PieceRot04 seem to describe the wallkick entries of SRS (or a defective version thereof).
PieceRot00=0,0 PieceRot01=-1,0 PieceRot02=-1,-1 PieceRot03=-99,-99 PieceRot04=-1,2
This corresponds to a wall kick list of (0, 0), (-1, 0), (-1, 1), (99, 99), (-1, 2). These resemble the wall kicks for T-up to T-right from the diagram of the T tetromino in the Heboris Unofficial Expansion manual.