-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
118 lines (106 loc) · 5.14 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
<!doctype html>
<html ng-app="app">
<head>
<title>Submarine</title>
<link rel="stylesheet" href="css/main.css">
</head>
<body ng-controller="ChatCtrl">
<div class="center" ng-show="!rtc.connected">
<p>Give this game URL to your friend!</p>
<input type="text" id="url" value="" readonly select-on-click >
</div>
<div id="youwin">You have won</div>
<div id="youlose">You have lost</div>
<div id="theirturn">Opponent's Turn</div>
<div id="myturn">Your Turn</div>
<div id="wait">Waiting...</div>
<div id="disconnected">OPPONENT DISCONNECTED</div>
<div id="controls" ng-cloak>
<h1>Submarine</h1>
<div>
<h2 ng-if="rtc.connected" class="uplink">Uplink Established</h2>
<h2 ng-if="!rtc.connected" class="waiting">Waiting for opponent...</h2>
<div id="chat-box">
<article ng-repeat="msg in messages"><b ng-class="{localuser:msg.local}">{{msg.who}}</b>: {{msg.txt}}</article>
</div>
<div id="chat-controls">
<input id="chat_input" ng-disabled="!rtc.connected" type="text" ng-model="message" ng-keypress="$event.keyCode === 13 && sendMessage()">
<button ng-disabled="!rtc.connected" ng-click="sendMessage()">SEND</button>
</div>
</div>
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://ss14-team-194.divshot.io" data-text="Check out Submarine by flamescape" data-via="staticshowdown">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<div id="info">
<h3>How To Play</h3>
<p><strong><em>Please use Chrome!</em></strong></p>
<p>Find an opponent to battle and give them your game url. The game begins when the uplink is established.</p>
<p>When it is your turn, fire a torpedo into enemy territory. Select the depth first by clicking on the enemy's arena, then choose the X and Z coordinates with another click.</p>
<p>Each player has five submarines of lengths 5, 4, 3, 3, and 2. The game ends when a player's submarines have all been sunk!</p>
<hr>
<h3>Team Info</h3>
<h4>Contributors</h4>
<ul>
<li><strong>Gareth</strong> - Arbitrary Team Captain
<li><strong>John</strong> - Did all the work
<li><strong>Kipke</strong> - Support Specialist / Jester
</ul>
<h4>Libraries Used</h4>
<ul>
<li><strong>AngularJS v1.2.10</strong> - HTML enhanced for web apps!
<li><strong>BabylonJS</strong> - A 3D engine based on WebGL and JavaScript
<li><strong>Bluebird v1.0.3</strong> - Full featured Promises/A+ implementation with exceptionally good performance
<li><strong>Hand v1.3.5</strong> - A polyfill for supporting pointer events on every browser
<li><strong>PeerJS v0.3.7</strong> - Simple peer-to-peer with WebRTC
<li><strong>Underscore.js v1.5.2</strong> - A utility-belt library for JavaScript
</ul>
<h4>Image Sources</h4>
<ul>
<li><strong>Speaker icons</strong> designed by Thomas Le Bas from the Noun Project
</ul>
<h4>Audio Sources</h4>
<ul>
<li><strong>"Shadows under dark water"</strong> (by Bluedark)
<li><strong>"Sonar sound"</strong> (by infobandit)
<li><strong>"Depth bomb variation"</strong> (by ZeSoundResearchInc.)
</ul>
<h4>Software Used</h4>
<ul>
<li><strong>Audacity</strong> - Audio editing
<li><strong>Adobe Illustrator</strong> - Vector graphics manipulation
<li><strong>vim</strong> - All advanced programming by the smartest guy on the team
<li><strong>Notepad++</strong> - For the other scripting
<li><strong>Notepad</strong> - It's time for an upgrade, Kipke...
</ul>
<h4>Special Thanks</h4>
<ul>
<li><strong>Pepsi Max</strong>
<li><strong>Monster Energy Drinks</strong>
<li><strong>Basically Burgers</strong>
<li><strong>Croquettes</strong>
<li><strong>Dutch Chinese food</strong>
<li><strong>Pizzeria Bella Italia</strong>
<li><strong>Wawa</strong>
<li><strong>Naps</strong>
</ul>
</div>
</div>
<canvas id="canvas"></canvas>
<div ng-controller="AudioCtrl" ng-click="muteAudio()" id="audio_controls">
<img ng-src="{{muteIcon}}">
</div>
<audio autoplay loop>
<source src="audio/ambient.ogg" type="audio/ogg">
<source src="audio/ambient.mp3" type="audio/mp3">
</audio>
<script src="js/lib/underscore-min.js"></script>
<script src="js/lib/bluebird.js"></script>
<script src="js/lib/angular.min.js"></script>
<script src="js/lib/peer.min.js"></script>
<script src="js/lib/babylon.min.js"></script>
<script src="js/lib/hand-1.3.5.js"></script>
<script src="js/rtc.js"></script>
<script src="js/chat.js"></script>
<script src="js/gameboard.js"></script>
<script src="js/game.js"></script>
</body>
</html>