-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·252 lines (230 loc) · 12.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<!doctype html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>slinky</title>
<meta property="og:title" content="slinky"/>
<meta property="og:type" content="website" />
<meta property="og:url" content="https://aemartos.github.io/slinky/" />
<meta property="og:image" content="img/slinky_img.png"/>
<meta name="description" content="Ironhack first project. SVG, SASS and JS game. By: anæstrada">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
<link rel="icon" href="img/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/styles.css">
<script src="js/vendor/modernizr-3.6.0.min.js"></script>
</head>
<body>
<div class="container">
<!-- <div class="teletransport">
<svg><rect x="2" y="0" width="90%" height="90%" id="wall01_01" class="form wall wall01 wall01_01"/></svg>
<svg><rect x="2" y="0" width="90%" height="90%" id="wall01_01" class="form wall wall01 wall01_01"/></svg>
<svg><rect x="2" y="0" width="90%" height="90%" id="wall01_01" class="form wall wall01 wall01_01"/></svg>
</div> -->
<!-- INITIAL PAGE -->
<div class="initial_page">
<svg id="slinky_logo" viewBox="0 0 304 177.3">
<path id="letter_s" d="M36,153.7H0V138h36c1.1,0,2-0.4,2.8-1.2s1.2-1.7,1.2-2.8c0-1.1-0.4-1.8-1.2-2.2c-0.8-0.3-1.8-0.4-2.8-0.4H19.6
c-2.7,0-5.3-0.5-7.7-1.6c-2.4-1-4.5-2.4-6.2-4.2c-1.8-1.8-3.2-3.9-4.2-6.3c-1-2.4-1.5-4.9-1.5-7.6c0-2.7,0.5-5.3,1.5-7.7
s2.4-4.5,4.2-6.2c1.8-1.8,3.8-3.2,6.2-4.2s4.9-1.5,7.7-1.5h31.9v15.6H19.6c-1.1,0-2,0.4-2.8,1.2c-0.8,0.8-1.2,1.7-1.2,2.8
s0.4,2.1,1.2,2.9s1.7,1.2,2.8,1.2H36c2.7,0,5.2,0.5,7.6,1.4c2.4,0.9,4.5,2.2,6.2,3.8c1.8,1.6,3.2,3.6,4.2,5.8
c1,2.3,1.6,4.7,1.6,7.4s-0.5,5.3-1.6,7.6c-1,2.4-2.4,4.4-4.2,6.2s-3.8,3.2-6.2,4.2C41.2,153.2,38.6,153.7,36,153.7z" />
<path id="letter_l" d="M79.8,153.7H63.9V67.4h15.8L79.8,153.7L79.8,153.7z" />
<path id="letter_i" d="M107.6,153.7H91.7V92h15.8L107.6,153.7L107.6,153.7z" />
<path id="letter_n" d="M135.3,153.7h-15.7V92h3.8l5.2,6c2.5-2.3,5.4-4.1,8.6-5.3c3.2-1.2,6.6-1.9,10.1-1.9c3.8,0,7.3,0.7,10.7,2.2
s6.3,3.4,8.8,5.9s4.5,5.5,5.9,8.8c1.4,3.4,2.2,6.9,2.2,10.7v35.3H159v-35.3c0-1.6-0.3-3.1-0.9-4.6c-0.6-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-1.4,0.3-2.8,0.8-4.1
c0.6-1.3,1.3-2.4,2.2-3.3c0.9-0.9,2.1-1.7,3.3-2.2c1.3-0.6,2.6-0.9,4.1-0.9s2.8,0.3,4.1,0.8c1.3,0.6,2.4,1.3,3.4,2.2
s1.7,2.1,2.3,3.3C110,72.4,110.3,73.8,110.3,75.2z" />
</svg>
<button id="startButton" class="">start</button>
</div>
<!-- MODALS -->
<!-- <button class="open-modal">Open modal</button> -->
<div class="modal-shade"></div>
<!-- START -->
<div class="modal-container modalStart">
<div class="modal">
<h1>start game</h1>
<div class="instr">
<div class="scene">
<p>you are this little guy <span class="user_pic"></span> with the arrow keys, you have to move through the
screen and you will gonna grow and shrink: <span class="user_pic u_grow"></span></p>
<p>to win you have to reach the goal <span class="goal"></span></p>
<p>you can rest in the walls around the board, but be careful, some of them could hurt you!</p>
<img class="walls_inst" src="img/wallss.svg">
<p class="m_top">there also are bad guys <img class="bGuy_inst" src="img/badGuy.svg"> that will hurt you
and bonuses <img class="bonus_inst" src="img/bonus.svg"> that can make your life easier or harder!</p>
<p class="touchControls">to control slinky you only have to swipe in a direction and touch the screen to pause and resume the game</p>
</div>
<div class="controls">
<p>this are your controls:</p>
<p><span class="arrow arrow_a">⇧</span> grow up</p>
<p><span class="arrow arrow_a">⇩</span> grow down</p>
<p><span class="arrow arrow_a">⇨</span> grow right</p>
<p><span class="arrow arrow_a">⇦</span> grow left</p>
<p><span class="arrow">P</span> pause game</p>
<p><span class="arrow">I</span> show instructions</p>
</div>
</div>
<p class="thanks">thanks for playing and have fun!</p>
<div class="modal-actions">
<button type="button" class="modal-play" autofocus>play!</button>
</div>
</div>
</div>
<!-- SETTINGS -->
<div class="modal-container modalSettings">
<div class="modal">
<span class="cross-close fa fa-times"></span>
<h1>settings</h1>
<p>you can change the parameters of the game.</p>
<p>here are some options:</p>
<div class="settings">
<form action="">
<div class="options"><span class="option">cols</span> <input type="number" name="cols" min="0" value="76"></div>
<div class="options"><span class="option">walls</span> <input type="number" name="walls" min="0" max="20" value="10"></div>
<div class="options"><span class="option">bonus</span> <input type="number" name="bonus" min="0" max="10" value="2"></div>
<div class="options"><span class="option">bad guys</span> <input type="number" name="badGuys" min="0" max="30" value="7"></div>
<!-- <input type="submit" class="modal-play" value="save and play!"> -->
</form>
</div>
<div class="modal-actions">
<button type="button" class="modal-save" autofocus>save and play!</button>
</div>
</div>
</div>
<!-- WIN -->
<div class="modal-container modalWin">
<div class="modal">
<h1>congrats! you win!</h1>
<p>you are awesome. would you like to play again?</p>
<div class="modal-actions">
<button class="modal-cancel">cancel</button>
<button class="modal-replay" autofocus>replay!</button>
</div>
</div>
</div>
<!-- LOSE -->
<div class="modal-container modalLose">
<div class="modal">
<h1>sorry bro! you lose!</h1>
<p>you are still awesome. would you like to play again?</p>
<div class="modal-actions">
<button class="modal-cancel">cancel</button>
<button class="modal-replay" autofocus>replay!</button>
</div>
</div>
</div>
<!-- INFO -->
<div id="modalInfo" class="modal-container modalInfo">
<div class="modal">
<h1>instructions</h1>
<div class="instr">
<div class="scene">
<p>you are this little guy <span class="user_pic"></span> with the arrow keys, you have to move through the
screen and you will gonna grow and shrink: <span class="user_pic u_grow"></span></p>
<p>to win you have to reach the goal <span class="goal"></span></p>
<p>you can rest in the walls around the board, but be careful, some of them could hurt you!</p>
<img class="walls_inst" src="img/wallss.svg">
<p class="m_top">there also are bad guys <img class="bGuy_inst" src="img/badGuy.svg"> that will hurt you
and bonuses <img class="bonus_inst" src="img/bonus.svg"> that can make your life easier or harder!</p>
<p class="touchControls">to control slinky you only have to swipe in a direction and touch the screen to pause and resume the game</p>
</div>
<div class="controls">
<p>this are your controls:</p>
<p><span class="arrow arrow_a">⇧</span> grow up</p>
<p><span class="arrow arrow_a">⇩</span> grow down</p>
<p><span class="arrow arrow_a">⇨</span> grow right</p>
<p><span class="arrow arrow_a">⇦</span> grow left</p>
<p><span class="arrow">P</span> pause game</p>
<p><span class="arrow">I</span> show instructions</p>
</div>
</div>
<p class="t_center iResume">press <span class="arrow">I</span> to resume the game</p>
<p class="t_center touchResume">touch the screen to resume the game</p>
</div>
</div>
<!-- PAUSE -->
<div class="modal-container modalPause">
<div class="modal">
<h1>the game is paused!</h1>
<p class="pauseText">press <span class="arrow">P</span> to resume the game</p>
<!-- <div class="modal-actions">
<button class="modal-cancel">cancel</button>
<button class="modal-pause">play!</button>
</div> -->
</div>
</div>
<!-- VISUAL ALERT -->
<div class="loseLife">lost life!</div>
<div class="loseWinPoints"><span class="winlose"></span> <span class="points"></span> points!</div>
<!-- SETTINGS BUTTON -->
<div class="conf-button settings-button"><span class="fa fa-cog"></span></div>
<!-- VOLUME BUTTON -->
<div class="conf-button volume-button"><span class="fa fa-volume-off"></span></div>
<!-- LIFES -->
<div class="counter">
<div class="time">00:00</div>
<div class="points"><span class="number"></span> pts</div>
<div class="lives">
<span class="life life01 fill"></span>
<span class="life life02 fill"></span>
<span class="life life03 fill"></span>
</div>
</div>
<svg id="gameBoard" class="" viewBox="0 0 76 38">
<!-- Filters -->
<defs>
<!-- NEON FILTER -->
<filter id="glow" x="-40" y="-20" width="100" height="200">
<feGaussianBlur stdDeviation=".2" result="coloredBlur" />
<feMerge>
<feMergeNode in="coloredBlur" />
<feMergeNode in="SourceGraphic" />
</feMerge>
</filter>
<!-- SILVER GRADIENT -->
<linearGradient id="silver-horizontal" x1="0%" y1="50%" x2="100%" y2="50%">
<stop offset="0%" stop-color="#808080"></stop>
<stop offset="100%" stop-color="#e0e0e0"></stop>
</linearGradient>
<!-- SILVER NOISE -->
<pattern id="silver-noise" width="1" height="1" patternContentUnits="objectBoundingBox">
<image src="img/metal.png" x="0" y="0" width="1" height="1" />
<rect width="1" height="1" fill="url(#silver-horizontal)" style="mix-blend-mode: multiply;" />
</pattern>
</defs>
<rect x="0" y="0" id="background" class="background" width="100%" height="100%" />
</svg>
<div id="screen"></div>
<input id="guides" type="checkbox">
</div>
<script src="js/vendor/popmotion.global.min.js"></script>
<script src="js/vendor/jquery-3.3.1.min.js"></script>
<script src="js/vendor/touchSwipe.js"></script>
<script src="js/vendor/requestAF.js"></script>
<script src="js/config.js"></script>
<script src="js/constructor.js"></script>
<script src="js/initialPage.js"></script>
<script src="js/modals.js"></script>
<script src="js/goal.js"></script>
<script src="js/wall.js"></script>
<script src="js/badGuy.js"></script>
<script src="js/bonus.js"></script>
<script src="js/gameBoard.js"></script>
<script src="js/slinky.js"></script>
<script src="js/main.js"></script>
</body>
</html>