new game rules string - xale/iTetrinet GitHub Wiki
At the start of a game, the server will send the client a “newgame” message, which will look something like this:
newgame 0 1 2 1 1 1 18 33333333333333555555555555552222222222222224444444444444466666666666666777777777777771111111111111111111111111111111111111111111111112222222222222222222234444444444444566666666666666678888889999999999 0 1ÿ
Tetrifast servers will substitute seven asterisks *******
for the newgame
This string, which represents the game rules, breaks down as follows:
newgame <starting height> <starting level> <lines per level> <level increment> <lines per special> <specials added> <special capacity> <block frequencies> <special frequencies> <average levels> <classic rules>
or
******* <starting height> <starting level> <lines per level> <level increment> <lines per special> <specials added> <special capacity> <block frequencies> <special frequencies> <average levels> <classic rules>
argument | type | values | meaning |
---|---|---|---|
starting height |
integer | ≥0 |
the number of garbage lines that should be present at the bottom of each player’s field when the game starts |
starting level |
integer | ≥1 |
the level at which all players begin the game |
lines per level |
integer | ≥1 |
the number of lines a player must clear to advance to the next level |
level increment |
integer | ≥0 |
the number of levels a player advances when he or she completes the requisite number of lines |
lines per special |
integer | ≥1 |
the number of lines a player must clear before specials are added to his or her field |
specials added |
integer | ≥0 |
the number of specials added to a player’s board when he or she completes the requisite number of lines |
special capacity |
integer | ≥0 |
the number of specials a player can hold in his or her queue at a given time. specials collected beyond this number are discarded |
block frequencies |
string of 100 integers | 1 – 7 |
the frequency of occurrence (each number being 1%) of each of the different block types |
special frequencies |
string of 100 integers | 1 – 9 |
the frequency of occurrence of each of the different special blocks |
average levels |
boolean | 1 or 0 |
if 1 , the client should display the average levels of all players in the game (0 just means the value is hidden) |
classic mode |
boolean | 1 or 0 |
if 1 , classic-style adds are enabled |