Stefan Schuermans commited on 2019-06-16 18:17:06
Showing 2 changed files, with 103 additions and 1 deletions.
... | ... |
@@ -98,13 +98,14 @@ |
98 | 98 |
The following module types are available for instantiation: |
99 | 99 |
<ul> |
100 | 100 |
<li><a href="canvas.html">Canvas</a></li> |
101 |
- <li><a href="filter.html">Filter</a></li> |
|
102 | 101 |
<li><a href="etherpix.html">EtherPix</a></li> |
102 |
+ <li><a href="filter.html">Filter</a></li> |
|
103 | 103 |
<li><a href="loveletter.html">Loveletter</a></li> |
104 | 104 |
<li><a href="opprinter.html">Operator Connection Printer</a></li> |
105 | 105 |
<li><a href="opsplitter.html">Operator Connection Splitter</a></li> |
106 | 106 |
<li><a href="output.html">Output</a></li> |
107 | 107 |
<li><a href="player.html">Player</a></li> |
108 |
+ <li><a href="pong.html">Pong</a></li> |
|
108 | 109 |
<li><a href="printer.html">Printer</a></li> |
109 | 110 |
<li><a href="priority.html">Priority</a></li> |
110 | 111 |
<li><a href="ratelimiter.html">Rate Limiter</a></li> |
... | ... |
@@ -0,0 +1,101 @@ |
1 |
+<html> |
|
2 |
+ <head> |
|
3 |
+ <title>Blinker - Pong</title> |
|
4 |
+ </head> |
|
5 |
+ <body> |
|
6 |
+ <h1>Blinker - Pong</h1> |
|
7 |
+ <p> |
|
8 |
+ The pong module provides a pong game on demand. |
|
9 |
+ There are two potential operator connections - one for the left player |
|
10 |
+ and one for the right player. |
|
11 |
+ The game starts as soon as the first player joins. |
|
12 |
+ In case only one player is in the game, the other side is played |
|
13 |
+ by the computer. |
|
14 |
+ </p> |
|
15 |
+ <h2>Configuration</h2> |
|
16 |
+ <p> |
|
17 |
+ The configuration of the pong module with name <code>NAME</code> |
|
18 |
+ is located in the <code>pongs/NAME</code> subdirectory. |
|
19 |
+ </p> |
|
20 |
+ <h3>Colors</h3> |
|
21 |
+ <p> |
|
22 |
+ The colors of the different element of a pong field are configurable. |
|
23 |
+ All of them are given in web notation, i.e., as 6 hexadecimal digits - |
|
24 |
+ 2 digits for read, green and blue. |
|
25 |
+ The color is automatically converted to the selected format |
|
26 |
+ (i.e. number of channels and number of colors). |
|
27 |
+ Each color is defined in the appropriate file. If the file is missing |
|
28 |
+ or contains an invalid color code, the respective element is not drawn |
|
29 |
+ on the frames. |
|
30 |
+ The following color files exist: |
|
31 |
+ <table> |
|
32 |
+ <tr><td><b>file name</b></td> |
|
33 |
+ <td width="2em"></td> |
|
34 |
+ <td><b>element</b></td></tr> |
|
35 |
+ <tr><td><code>backgroundColor</code></td> |
|
36 |
+ <td></td> |
|
37 |
+ <td>background of the pong field</td></tr> |
|
38 |
+ <tr><td><code>ballColor</code></td> |
|
39 |
+ <td></td> |
|
40 |
+ <td>pong ball</td></tr> |
|
41 |
+ <tr><td><code>computerColor</code></td> |
|
42 |
+ <td></td> |
|
43 |
+ <td>pad played by the computer</td></tr> |
|
44 |
+ <tr><td><code>goalColor</code></td> |
|
45 |
+ <td></td> |
|
46 |
+ <td>game score when a goal has been scored</td></tr> |
|
47 |
+ <tr><td><code>lineColor</code></td> |
|
48 |
+ <td></td> |
|
49 |
+ <td>line in the middle of the field</td></tr> |
|
50 |
+ <tr><td><code>padColor</code></td> |
|
51 |
+ <td></td> |
|
52 |
+ <td>pad played by a real player</td></tr> |
|
53 |
+ <tr><td><code>scoreColor</code></td> |
|
54 |
+ <td></td> |
|
55 |
+ <td>game score when the ball is moving</td></tr> |
|
56 |
+ </table> |
|
57 |
+ </p> |
|
58 |
+ <h3>Delay</h3> |
|
59 |
+ <p> |
|
60 |
+ The file <code>delay</code> describes the duration of a frame / a step |
|
61 |
+ of the game. |
|
62 |
+ It contains a number that specifies the time in milliseconds. |
|
63 |
+ Valid values are from <code>100</code> to <code>500</code>. |
|
64 |
+ In case the file is not present, a default of <code>200</code> is used. |
|
65 |
+ Please note that the game speeds up a little bit when the ball bounces |
|
66 |
+ a pad and when a goal is scored. |
|
67 |
+ </p> |
|
68 |
+ <h3>Format</h3> |
|
69 |
+ <p> |
|
70 |
+ The file <code>format</code> describes the format of the canvas, |
|
71 |
+ i.e. its dimensions, the number of channels and the color depth on |
|
72 |
+ each channel. |
|
73 |
+ The file must contain a string |
|
74 |
+ <code><width>x<height>-<channels>/<colors></code>, |
|
75 |
+ e.g. <code>18x8-1/256</code> for 18 pixels width, 8 pixels height |
|
76 |
+ in 256 grayscales. |
|
77 |
+ </p> |
|
78 |
+ <h3>Maximum Scrore</h3> |
|
79 |
+ <p> |
|
80 |
+ The file <code>maxScore</code> configures at which score the game ends. |
|
81 |
+ The file contains this maximum score as a number. |
|
82 |
+ Valid values are from <code>1</code> to <code>99</code>. |
|
83 |
+ In case the file is not present, a default of <code>9</code> is used. |
|
84 |
+ </p> |
|
85 |
+ <h3>Output Stream</h3> |
|
86 |
+ <p> |
|
87 |
+ The file <code>outstream</code> contains the name of the stream to |
|
88 |
+ send the frames to. |
|
89 |
+ No frames are sent when the game is inactive (i.e. no player has |
|
90 |
+ joined yet). |
|
91 |
+ </p> |
|
92 |
+ <h2>Operator Connection Interfaces</h2> |
|
93 |
+ <p> |
|
94 |
+ The name of the operator connection interfaces provided by this module |
|
95 |
+ is the module name plus the side of the player. Thus, the operator |
|
96 |
+ connection interface for the left player is <code>pongs/NAME/left</code> |
|
97 |
+ and the one for the right player is <code>pongs/NAME/right</code> |
|
98 |
+ </p> |
|
99 |
+ </body> |
|
100 |
+</html> |
|
101 |
+ |
|
0 | 102 |