Source

robots / robots.html

Full commit
<!DOCTYPE html>
<!--
Robots!
Copyright © 2012 Martin Tournoij
MIT license applies. http://opensource.org/licenses/MIT
http://arp242.net/robots/
-->
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Robots!</title>
		<link type="text/css" rel="stylesheet" href="robots.css">
	</head>

	<body>
		<canvas id="grid" width="826" height="308"></canvas>

		<div id="menu">
			<div class="box">
				Score: <span id="score">0</span><br>
				<a id="options" href="#">Options</a><br>
				<a id="help" href="#">Help</a><br>
				<a id="about" href="#">About</a>
			</div>

			<div class="box" id="keybinds0">
				Keys:<br>
				7 8 9<br>
				&nbsp;\|/<br>
				4- -6<br>
				&nbsp;/|\<br>
				1 2 3<br>
				<br>
				5: Do nothing<br>
				w: Wait for end<br>
				t: Teleport
			</div>

			<div class="box" id="keybinds1">
				Keys:<br>
				y k u<br>
				&nbsp;\|/<br>
				h- -l<br>
				&nbsp;/|\<br>
				b j n<br>
				<br>
				.: Do nothing<br>
				w: Wait for end<br>
				t: Teleport
			</div>

			<div class="box">
				Legend:<br>
				+: robot<br>
				*: junk heap<br>
				@: you
			</div>
		</div>

		<div id="helpwindow" class="window">
				<p>
					The robots game pits you against evil robots, who are trying to kill you
					(which is why they are evil). Fortunately for you, even though they are
					evil, they are not very bright and have a habit of bumping into each
					other, thus destroying themselves. In order to survive, you must get
					them to kill each other off, since you have no offensive weaponry.
				</p>

				<p>
					Since you are stuck without offensive weaponry, you are endowed with one
					piece of defensive weaponry: a teleportation device.  When two robots run
					into each other or a junk pile, they die.  If a robot runs into you, you
					die.  When a robot dies, you get 10 points, and when all the robots die,
					you start on the next field.  This keeps up until they finally get you.
				</p>

				<p>
					Robots are represented on the screen by a ‘+’, the junk heaps from their
					collisions by a ‘*’, and you (the good guy) by a ‘@’.
				</p>
				<p>
					You can move around with the numpad. You can also choose the classic hjkl keys (if you
					don’t know what they are, you don’t want them).<br>
					Unlike the original robots, you can *not* precede the commands with a count or “run” with
					shift.
				</p>

				<p>
					If you use the ‘w’ command and survive to the next level, you will get a
					bonus of 10% for each robot which died after you decided to wait. If you
					die, however, you get nothing.  For all other commands, the program will
					save you from typos by stopping short of being eaten. However, with ‘w’
					you take the risk of dying by miscalculation.
				</p>


			<div class="toolbar">
				<a href="#" class="close">Close</a>
			</div>
		</div>

		<div id="optionswindow" class="window">
			<p>
				<label for="keyset">Keyset</label>
				<select id="keyset">
					<option>Keyset 1 (Numpad)</option>
					<option>Keyset 2 (Classic hjkl keys)</option>
				</select><br>

				<label for="graphics">Graphics</label>
				<select id="graphics">
					<!--<option name="0">Random for each level</option>-->
					<option>Classic "ASCII Art"</option>
					<option>Daleks</option>
					<option>Cybermen</option>
				</select><br>

				<label for="showgrid">Show grid</label>
				<input type="checkbox" id="showgrid"><br>

				<label for="autoteleport">Auto-teleport</label>
				<input type="checkbox" id="autoteleport"><br>
				<span class="help">Automatically teleport if there is no other option remaining.</span>

				<label for="hardcore">Hardcode mode</label>
				<input type="checkbox" id="hardcore"><br>
				<span class="help">With this option enabled, the game will *not* prevent you from making a move that would mean
					certain death. This significantly increases the difficulty.</span>

				<!--
				<label for="gridsizex">Grid size X</label>
				<input type="text" id="gridsizex" class="small" value="59"><br>
				
				<label for="gridsizey">Grid size Y</label>
				<input type="text" id="gridsizey" class="small" value="59">
				-->
			</p>

			<div class="toolbar">
				<a href="#" class="save">Save</a>
				<a href="#" class="close">Close</a>
			</div>
		</div>

		<div id="aboutwindow" class="window">
			<p>
				Robots is a reproduction of the 1980
				<a href="http://en.wikipedia.org/wiki/Robots_(computer_game)">“classic” robots game for BSD UNIX</a>.
			</p>

			<p>
				Copyright © 2012 Martin Tournoij &lt;<a href="mailto:martin@arp242.net">martin@arp242.net</a>&gt;<br>
				Robots is free software licenced under the terms of the
				<a href="http://opensource.org/licenses/MIT">MIT license</a>.<br>
				<br>
				The original robots was created by Ken Arnold.
			</p>

			<p>
				<a href="https://bitbucket.org/Carpetsmoker/robots">Source code at bitbucket</a><br>
			</p>

			<div class="toolbar">
				<a href="#" class="close">Close</a>
			</div>
		</div>

		<script src="robots.js"></script>
	</body>
</html>