User:Nightmareci: Difference between revisions

From Hard Drop Tetris Wiki

Jump to: navigation, search
No edit summary
mNo edit summary
 
(30 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Definitions ==
== Definitions ==
In this page, the very top row is row number 0, the row below the top row is row number 1, and so on, until 20 (TGM1 has 20 visible rows + 1 vanish zone row).
Terms in [[TGM legend]] and [[Hard Drop Tetris Wiki:Glossary|Glossary]] will be used in my pages, with the original definitions. If you encounter a confusing term, look in TGM legend first, then Glossary if it's not in TGM legend.
== Tetris The Grand Master ==
Some of the following information may not be consistent with other wiki pages; where this applies, simply ignore the information elsewhere in the wiki. Corrections to this information by others are only accepted if supported by examples. Information here is still work in progress.
=== Gravity ===
Directly from [[Tetris The Grand Master]], here is the gravity curve:
{| border="2" cellpadding="2" cellspacing="0" style="margin-top:1em; margin-bottom:1em; background:#f9f9f9; border:3px #999999 solid; border-collapse:collapse;"
|+'''Internal Gravity'''[http://www.tetrisconcept.com/forum/viewtopic.php?p=11130#11130]
!bgcolor="#80A3F8"|Level||bgcolor="#BBBBBB"|Interal Gravity<br>(1/256 G)||bgcolor="#80A3F8"|Level||bgcolor="#BBBBBB"|Internal Gravity<br>(1/256 G)
|-align = center
|bgcolor="#C4E8E8"|0||4||bgcolor="#C4E8E8"|220|||32
|-align = center
|bgcolor="#C4E8E8"|30||6||bgcolor="#C4E8E8"|230||64
|-align = center
|bgcolor="#C4E8E8"|35||8||bgcolor="#C4E8E8"|233||96
|-align = center
|bgcolor="#C4E8E8"|40||10||bgcolor="#C4E8E8"|236||128
|-align = center
|bgcolor="#C4E8E8"|50||12||bgcolor="#C4E8E8"|239||160
|-align = center
|bgcolor="#C4E8E8"|60||16||bgcolor="#C4E8E8"|243||192
|-align = center
|bgcolor="#C4E8E8"|70||32||bgcolor="#C4E8E8"|247||224
|-align = center
|bgcolor="#C4E8E8"|80||48||bgcolor="#C4E8E8"|251||256 (1G)
|-align = center
|bgcolor="#C4E8E8"|90||64||bgcolor="#C4E8E8"|300||512 (2G)
|-align = center
|bgcolor="#C4E8E8"|100||80||bgcolor="#C4E8E8"|330||768 (3G)
|-align = center
|bgcolor="#C4E8E8"|120||96||bgcolor="#C4E8E8"|360||1024 (4G)
|-align = center
|bgcolor="#C4E8E8"|140||112||bgcolor="#C4E8E8"|400||1280 (5G)
|-align = center
|bgcolor="#C4E8E8"|160||128||bgcolor="#C4E8E8"|420||1024 (4G)
|-align = center
|bgcolor="#C4E8E8"|170||144||bgcolor="#C4E8E8"|450||768 (3G)
|-align = center
|bgcolor="#C4E8E8"|200||4||bgcolor="#C4E8E8"|500||5120 (20G)
|}
In the following, Gcount is the current Gravity Count; Gspeed is the Gravity Speed, and is equal to one of the Internal Gravity entries in the above table. All values can be represented with unsigned integers, as no negative values ever appear. All division has the fractional part truncated, as in ISO C (60/256 = 0, 252/256 = 0, 260/256 = 1).


On the first frame of piece display, a soft drop input is simply ignored, so, for example, some variable representing whether soft drop "is pressed" or "not pressed" would be set to "not pressed" on the first frame. The second frame and later can have a soft drop input set, for example, as "is pressed"; this processing of input occurs outside this description.
=== Row Numbering ===
# Preparation for the pieces' first displayed frame (such as during ARE):
In my pages, row numbering follows this convention:
#* Gcount = Gspeed % 256
#* Gspeed is set to the appropriate value for the current level
#* Attempt to place the piece in row number 1 + Gspeed / 256, higher if necessary
# Every frame this piece is displayed:
#* If soft drop is pressed:
#** If Gspeed < 256:
#*** Attempt to drop one line
#** If the piece has blocks beneath it now:
#*** Lock the piece
#** Go to 3.
#* If there are blocks below this piece:
#** Set Gcount to Gspeed
#* If Gcount is greater than or equal to 256:
#** Attempt to drop Gcount / 256 lines
#** Set Gcount to the remainder of Gcount / 256 (in C, this would be "Gcount %= 256")
#* Increase Gcount by Gspeed
#* Go to 3.
# Further processing after gravity (processing will come back to 2. if the piece hasn't locked)
In the above, the line "Gcount = Gspeed % 256" may appear curious, as all Internal Gravity values in the TGM series are either <256 or an even multiple of 256, but it's purpose is to properly support gravity speeds such as 4.5G; none of the TGM games have gravity like this, but this makes this description more general.


In ANSI C, one can use bitwise operators instead of the division and modulo (%) operators, because 256 is a power of 2; a simple example follows:
<ol start=0>
<pre>
<li>[[Playfield#Vanish_zone|Vanish zone]]</li>
placeInRow = 1 + Gspeed >> 8; // equivalent to 'placeInRow = 1 + Gspeed / 256;'
<li>First visible row</li>
linesToDrop = Gcount >> 8; // equivalent to 'linesToDrop = Gcount / 256;'
<li>Second visible row</li>
Gcount &= 255; // equivalent to 'Gcount %= 256;'
...
</pre>
<li value=19>Nineteenth visible row</li>
On more limited systems where division and modulo would be noticeably slow, using bitwise operators this way can significantly improve performance. Because only positive integers appear in these expressions, ANSI C guarantees these expressions are equivalent, on implementations following ANSI C. On very limited systems (such as the NES), these would be easy to translate to assembly.
<li>Twentieth visible row (last)</li>
</ol>
 
Row number 0 is the topmost row and successive rows are beneath it. In the listing above (which is TGM1's row configuration), there is a total of 21 usable rows.
 
== My Own Pages ==
[[User:Nightmareci/Detailed description of Tetris The Grand Master | Detailed description of Tetris The Grand Master]]
 
[[User:Nightmareci/Playing forever | Copy of the Playing forever page]]

Latest revision as of 15:51, 18 October 2023

Definitions

Terms in TGM legend and Glossary will be used in my pages, with the original definitions. If you encounter a confusing term, look in TGM legend first, then Glossary if it's not in TGM legend.

Row Numbering

In my pages, row numbering follows this convention:

  1. Vanish zone
  2. First visible row
  3. Second visible row
  4. ...
  5. Nineteenth visible row
  6. Twentieth visible row (last)

Row number 0 is the topmost row and successive rows are beneath it. In the listing above (which is TGM1's row configuration), there is a total of 21 usable rows.

My Own Pages

Detailed description of Tetris The Grand Master

Copy of the Playing forever page