-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
52 lines (49 loc) · 2.51 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" />
<title>Scala.js Games (Scala 3)</title>
</head>
<body>
<div class="container">
<h1>Scala.js Games (Scala 3)</h1>
<p>
This is a collection of games ported from Scala 2 to Scala.js (Scala 3): the
<a href="https://github.com/wiringbits/scala-js-games">
source</a> for each game is written in Scala, and <a href="http://lampwww.epfl.ch/~doeraene/scala-js/">
cross compiled</a> to run in the browser targeting the <a href="https://developer.mozilla.org/en-US/docs/HTML/Canvas">
HTML5 Canvas</a>. The original games can be found <a href="https://github.com/lihaoyi/scala-js-games">
here</a> and targeting Scala 2
</p>
<p>
The games are, in order:
</p>
<ul>
<li><b>Asteroids</b>: shoot down the asteroid swarms and avoid getting hit!</li>
<li><b>Astrolander</b>: bring your lander to a a gentle landing on flat ground before you run out of fuel.</li>
<li><b>Snake</b>: eat apples to grow long and don't crash into walls!</li>
<li><b>Pong</b>: outsmart your AI opponent to get the ball past his paddle (right) to score points!</li>
<li><b>Brick</b>: use your paddle to bounce the ball up, destroying all the bricks before you run out of balls.</li>
<li><b>Tetris</b>: collect points by clearing rows and don't let the screen fill with blocks.</li>
</ul>
<p>
The controls are generally up-down-left-right and spacebar; they
aren't very complex games. Click on a game to start playing and click
somewhere else to pause it.
</p>
</div>
<div id="app"></div>
<div style="min-width: 1610px">
<canvas id="asteroids" width="800" height="600" tabindex="1"></canvas>
<canvas id="astrolander" width="800" height="600" tabindex="1"></canvas>
<canvas id="snake" width="800" height="600" tabindex="1"></canvas>
<canvas id="pong" width="800" height="600" tabindex="1"></canvas>
<canvas id="bricks" width="800" height="600" tabindex="1"></canvas>
<canvas id="tetris" width="800" height="600" tabindex="1"></canvas>
</div>
<script type="module" src="/main.js"></script>
</body>
</html>