-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dubrowgn
committed
Sep 15, 2014
1 parent
8be0c31
commit 39e81c6
Showing
16 changed files
with
210 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,5 @@ Thumbs.db | |
############################ | ||
.* | ||
|
||
# sublime project files | ||
*.sublime-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
.layer { position:absolute; } | ||
html { | ||
height: 100%; | ||
} | ||
body { | ||
color:#fff; | ||
text-shadow: 1px 1px 4px #000; | ||
font-family: helvetica; | ||
background-color: #333; | ||
margin: 0; | ||
height: 100%; | ||
} | ||
a:link, a:active, a:visited { | ||
color: #0080ff; | ||
text-decoration: none; | ||
} | ||
a:hover { | ||
color: #fff; | ||
} | ||
.hidden { | ||
display: none; | ||
} | ||
.ui { | ||
padding:2px; | ||
color:#fff; | ||
text-shadow: 1px 1px 4px #000; | ||
box-sizing: border-box; | ||
background-color: rgba(0, 0, 0, 0.4); | ||
font-weight: bold; | ||
position: absolute; | ||
width: 100%; | ||
text-align: center; | ||
} | ||
.lg, h1 { | ||
font-size:48pt; | ||
} | ||
.sm, h2 { | ||
font-size:18pt; | ||
} | ||
.xsm, h3 { | ||
font-size:14pt; | ||
} | ||
.left { | ||
text-align: left; | ||
} | ||
.right { | ||
text-align: right; | ||
} | ||
.top { | ||
top: 0; | ||
} | ||
.bottom { | ||
bottom: 0; | ||
} | ||
.menu-container { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
text-align: center; | ||
z-index: 1; | ||
background-color: #333; | ||
} | ||
.ui-2nd { | ||
background: none; | ||
padding: 4px; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Snake!</title> | ||
<link rel="shortcut icon" type="image/x-icon" href="assets/optimize/icon.png" /> | ||
<link rel="stylesheet" type="text/css" href="css/global.css"> | ||
<script type="text/javascript" src="lib/require.min.js" data-main="src/main" charset="utf-8"></script> | ||
</head> | ||
<body> | ||
<!-- GAME MENU - table was the fastest/easiest way to center content --> | ||
<table id="ui_menu" class="menu-container"> | ||
<tr> | ||
<td class="bg"> | ||
<h1>Snake!</h1> | ||
<p> | ||
<h2>In-Game Keys:</h2> | ||
<div>space: pause/unpause</div> | ||
<div>f: toggle fullscreen</div> | ||
<div>left mouse: reset game</div> | ||
<div>arrow keys: change direction</div> | ||
</p> | ||
<p> | ||
<h2>Difficulty:</h2> | ||
<label><input type="radio" name="difficulty" value="0.5" />slow</label> | ||
<label><input type="radio" name="difficulty" value="1.0" checked />normal</label> | ||
<label><input type="radio" name="difficulty" value="2.0" />fast</label> | ||
</p> | ||
<p> | ||
<h2>Map Size:</h2> | ||
<label><input type="radio" name="size" value="14,10" />tiny</label> | ||
<label><input type="radio" name="size" value="21,15" checked />normal</label> | ||
<label><input type="radio" name="size" value="28,20" />large</label> | ||
</p> | ||
<p><input id="btn_play" type="button" value="Play!"/></p> | ||
</td> | ||
</tr> | ||
<table> | ||
|
||
<!-- RENDER TARGET - canvas for the game to use as 2D render target --> | ||
<canvas id="layer1" class="layer"></canvas> | ||
|
||
<!-- GAME UI - use HTML to describe game UI, and update it by listening to game event delegates --> | ||
<div id="ui_paused" class="ui top lg">PAUSED<div class="xsm">Press space to unpause</div></div> | ||
<div id="ui_lost" class="ui top lg hidden">YOU LOSE!<div class="xsm">Click the board to reset</div></div> | ||
<div id="ui_score" class="ui bottom sm">Score: <span id="ui_score_value">—</span></div> | ||
<div class="ui ui-2nd bottom right xsm">High Score: <span id="ui_highScore_value">—</span></div> | ||
<div class="ui ui-2nd bottom left xsm"><a id="quit" href="#">Exit</a></div> | ||
</body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.