Stefan Schuermans commited on 2019-08-14 17:42:35
Showing 2 changed files, with 187 additions and 0 deletions.
| ... | ... |
@@ -114,6 +114,7 @@ |
| 114 | 114 |
<li><a href="sipphone.html">SIP Phone Connector</a></li> |
| 115 | 115 |
<li><a href="syncnamesplitter.html">Synchronization Name Splitter</a></li> |
| 116 | 116 |
<li><a href="syncprinter.html">Synchronization Printer</a></li> |
| 117 |
+ <li><a href="tetris.html">Tetris</a></li> |
|
| 117 | 118 |
<li><a href="transformer.html">Transformer</a></li> |
| 118 | 119 |
<li><a href="udp4phone.html">UDP4 Phone Connector</a></li> |
| 119 | 120 |
<li><a href="udp4receiver.html">UDP4 Receiver</a></li> |
| ... | ... |
@@ -0,0 +1,186 @@ |
| 1 |
+<html> |
|
| 2 |
+ <head> |
|
| 3 |
+ <title>Blinker - Tetris</title> |
|
| 4 |
+ </head> |
|
| 5 |
+ <body> |
|
| 6 |
+ <h1>Blinker - Tetris</h1> |
|
| 7 |
+ <p> |
|
| 8 |
+ The tetris module provides a tetris game on demand. |
|
| 9 |
+ If starts when the operator connection for the player is established. |
|
| 10 |
+ </p> |
|
| 11 |
+ <h2>Keys</h2> |
|
| 12 |
+ <p> |
|
| 13 |
+ The game is controlled via an operator connection, i.e., via telephone |
|
| 14 |
+ keys. The key have the following functions: |
|
| 15 |
+ <table> |
|
| 16 |
+ <tr><td><b>key</b></td> |
|
| 17 |
+ <td width="2em"></td> |
|
| 18 |
+ <td><b>description</b></td></tr> |
|
| 19 |
+ <tr><td><code>#</code></td> |
|
| 20 |
+ <td></td> |
|
| 21 |
+ <td>leave game</td></tr> |
|
| 22 |
+ <tr><td><code>*</code></td> |
|
| 23 |
+ <td></td> |
|
| 24 |
+ <td>play start sound to inform user about the active game</td></tr> |
|
| 25 |
+ <tr><td><code>1</code></td> |
|
| 26 |
+ <td></td> |
|
| 27 |
+ <td>rotate falling stone left (counter-clock-wise)</td></tr> |
|
| 28 |
+ <tr><td><code>2</code> / <code>3</code></td> |
|
| 29 |
+ <td></td> |
|
| 30 |
+ <td>rotate falling stone right (clock-wise)</td></tr> |
|
| 31 |
+ <tr><td><code>4</code></td> |
|
| 32 |
+ <td></td> |
|
| 33 |
+ <td>move falling stone to the left</td></tr> |
|
| 34 |
+ <tr><td><code>6</code></td> |
|
| 35 |
+ <td></td> |
|
| 36 |
+ <td>move falling stone to the right</td></tr> |
|
| 37 |
+ <tr><td><code>8</code></td> |
|
| 38 |
+ <td></td> |
|
| 39 |
+ <td>drop stone</td></tr> |
|
| 40 |
+ </table> |
|
| 41 |
+ </p> |
|
| 42 |
+ <h2>Configuration</h2> |
|
| 43 |
+ <p> |
|
| 44 |
+ The configuration of the tetris module with name <code>NAME</code> |
|
| 45 |
+ is located in the <code>tetrises/NAME</code> subdirectory. |
|
| 46 |
+ </p> |
|
| 47 |
+ <h3>Colors</h3> |
|
| 48 |
+ <p> |
|
| 49 |
+ The colors of the background and of the stones are configurable. |
|
| 50 |
+ They are given in web notation, i.e., as 6 hexadecimal digits - |
|
| 51 |
+ 2 digits for read, green and blue. |
|
| 52 |
+ The color is automatically converted to the selected format |
|
| 53 |
+ (i.e. number of channels and number of colors). |
|
| 54 |
+ Each color is defined in the appropriate file. If the file is missing |
|
| 55 |
+ or contains an invalid color code, the respective element is not drawn |
|
| 56 |
+ on the frames. |
|
| 57 |
+ The following color files exist: |
|
| 58 |
+ <table> |
|
| 59 |
+ <tr><td><b>file name</b></td> |
|
| 60 |
+ <td width="2em"></td> |
|
| 61 |
+ <td><b>element</b></td></tr> |
|
| 62 |
+ <tr><td><code>backgroundColor</code></td> |
|
| 63 |
+ <td></td> |
|
| 64 |
+ <td>background of the tetris field</td></tr> |
|
| 65 |
+ <tr><td><code>stoneColorColor</code></td> |
|
| 66 |
+ <td></td> |
|
| 67 |
+ <td>stones - falling stone as well as fixed stones</td></tr> |
|
| 68 |
+ </table> |
|
| 69 |
+ </p> |
|
| 70 |
+ <h3>Delays</h3> |
|
| 71 |
+ <p> |
|
| 72 |
+ Multiple timins of the tetris game can be configured. |
|
| 73 |
+ This is done by specifying the duration of certain times in the delay |
|
| 74 |
+ files. |
|
| 75 |
+ They contain a number that specifies the time in milliseconds. |
|
| 76 |
+ If the file is not present, a default value is used. |
|
| 77 |
+ The different settings, the valid value ranges and the defaults are |
|
| 78 |
+ listed in the following table: |
|
| 79 |
+ <table> |
|
| 80 |
+ <tr><td><b>file name</b></td> |
|
| 81 |
+ <td width="2em"></td> |
|
| 82 |
+ <td><b>description</b></td> |
|
| 83 |
+ <td width="2em"></td> |
|
| 84 |
+ <td><b>default</b></td></tr> |
|
| 85 |
+ <td width="2em"></td> |
|
| 86 |
+ <td><b>minimum</b></td> |
|
| 87 |
+ <td width="2em"></td> |
|
| 88 |
+ <td><b>maximum</b></td></tr> |
|
| 89 |
+ <tr><td><code>blinkDelay</code></td> |
|
| 90 |
+ <td></td> |
|
| 91 |
+ <td>time for blinking of completed rows before they vanish</td> |
|
| 92 |
+ <td></td> |
|
| 93 |
+ <td><code>50</code></td> |
|
| 94 |
+ <td></td> |
|
| 95 |
+ <td><code>50</code></td> |
|
| 96 |
+ <td></td> |
|
| 97 |
+ <td><code>250</code></td></tr> |
|
| 98 |
+ <tr><td><code>delay</code></td> |
|
| 99 |
+ <td></td> |
|
| 100 |
+ <td>time after which a falling stone moves down a pixel</td> |
|
| 101 |
+ <td></td> |
|
| 102 |
+ <td><code>400</code></td> |
|
| 103 |
+ <td></td> |
|
| 104 |
+ <td><code>200</code></td> |
|
| 105 |
+ <td></td> |
|
| 106 |
+ <td><code>1000</code></td></tr> |
|
| 107 |
+ <tr><td><code>dropDelay</code></td> |
|
| 108 |
+ <td></td> |
|
| 109 |
+ <td>time after which a dropped stone moves down a pixel</td> |
|
| 110 |
+ <td></td> |
|
| 111 |
+ <td><code>100</code></td> |
|
| 112 |
+ <td></td> |
|
| 113 |
+ <td><code>50</code></td> |
|
| 114 |
+ <td></td> |
|
| 115 |
+ <td><code>250</code></td></tr> |
|
| 116 |
+ <tr><td><code>gameOverDelay</code></td> |
|
| 117 |
+ <td></td> |
|
| 118 |
+ <td>time the tetris field is still shown after the stones have |
|
| 119 |
+ reached the top before the game ends</td> |
|
| 120 |
+ <td></td> |
|
| 121 |
+ <td><code>2000</code></td> |
|
| 122 |
+ <td></td> |
|
| 123 |
+ <td><code>100</code></td> |
|
| 124 |
+ <td></td> |
|
| 125 |
+ <td><code>5000</code></td></tr> |
|
| 126 |
+ </table> |
|
| 127 |
+ Please note that the game speeds up a little bit with each completed row. |
|
| 128 |
+ </p> |
|
| 129 |
+ <h3>Format</h3> |
|
| 130 |
+ <p> |
|
| 131 |
+ The file <code>format</code> describes the format of the canvas, |
|
| 132 |
+ i.e. its dimensions, the number of channels and the color depth on |
|
| 133 |
+ each channel. |
|
| 134 |
+ The file must contain a string |
|
| 135 |
+ <code><width>x<height>-<channels>/<colors></code>, |
|
| 136 |
+ e.g. <code>18x8-1/256</code> for 18 pixels width, 8 pixels height |
|
| 137 |
+ in 256 grayscales. |
|
| 138 |
+ </p> |
|
| 139 |
+ <h3>Locking</h3> |
|
| 140 |
+ <p> |
|
| 141 |
+ It is possible to interlock different games among each other, |
|
| 142 |
+ i.e., to make sure that only one of the those games can be started at the |
|
| 143 |
+ same time. |
|
| 144 |
+ If the file <code>lockName</code> exists, it defines the name of a |
|
| 145 |
+ mutual exclusion lock that is acquired when the game is started. |
|
| 146 |
+ If the lock with this name is already taken by another game, the game |
|
| 147 |
+ will not start. |
|
| 148 |
+ </p> |
|
| 149 |
+ <h3>Output Stream</h3> |
|
| 150 |
+ <p> |
|
| 151 |
+ The file <code>outstream</code> contains the name of the stream to |
|
| 152 |
+ send the frames to. |
|
| 153 |
+ No frames are sent when the game is inactive (i.e. the player has not |
|
| 154 |
+ connected yet). |
|
| 155 |
+ </p> |
|
| 156 |
+ <h3>Sound Names</h3> |
|
| 157 |
+ <p> |
|
| 158 |
+ It is possible to request playing a sound on certain events occuring |
|
| 159 |
+ during the game. |
|
| 160 |
+ The names of the sounds to play are configurable via the following |
|
| 161 |
+ files: |
|
| 162 |
+ <table> |
|
| 163 |
+ <tr><td><b>file name</b></td> |
|
| 164 |
+ <td width="2em"></td> |
|
| 165 |
+ <td><b>play sound on event</b></td></tr> |
|
| 166 |
+ <tr><td><code>gameOverSound</code></td> |
|
| 167 |
+ <td></td> |
|
| 168 |
+ <td>stones have reached top of field, |
|
| 169 |
+ game is about to end</td></tr> |
|
| 170 |
+ <tr><td><code>rowCompleteSound</code></td> |
|
| 171 |
+ <td></td> |
|
| 172 |
+ <td>one row (or multiple rows) have been completed |
|
| 173 |
+ and will vanish</td></tr> |
|
| 174 |
+ <tr><td><code>startSound</code></td> |
|
| 175 |
+ <td></td> |
|
| 176 |
+ <td>game starts</td></tr> |
|
| 177 |
+ </table> |
|
| 178 |
+ </p> |
|
| 179 |
+ <h2>Operator Connection Interface</h2> |
|
| 180 |
+ <p> |
|
| 181 |
+ The name of the operator connection interface provided by this module |
|
| 182 |
+ is the module name. Thus, it is <code>tetrises/NAME</code>. |
|
| 183 |
+ </p> |
|
| 184 |
+ </body> |
|
| 185 |
+</html> |
|
| 186 |
+ |
|
| 0 | 187 |