Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 6 commits
  • 14 files changed
  • 0 commit comments
  • 1 contributor
Showing with 891 additions and 64 deletions.
  1. +1 −64 README.md
  2. +20 −0 index.html
  3. +92 −0 resources/block.svg
  4. +75 −0 resources/empty.svg
  5. +93 −0 resources/grass.svg
  6. +105 −0 resources/grass2.svg
  7. +98 −0 resources/octocat.svg
  8. +46 −0 script/game.js
  9. +25 −0 script/keyboard.js
  10. +77 −0 script/map.js
  11. +78 −0 script/monster.js
  12. +86 −0 script/player.js
  13. +44 −0 script/utils.js
  14. +51 −0 style/style.css
View
65 README.md
@@ -1,64 +1 @@
-Here at GitHub, we're no strangers to hosting or sponsoring hackathons. With the growing number of games and game development resources on GitHub, we thought it was about time to throw our very own game jam!
-
-## The Challenge
-
-You have the entire month of November to create a **web-based** game *loosely* built around one or more of the following themes:
-
-* forking (or forks)
-* branching (or branches)
-* cloning (or clones)
-* pushing
-* pulling
-
-What do we mean by **loosely** based on these concepts? We literally mean, *loosely* based. Some examples might be a FPS where you throw forks at water balloons, an educational game about DNA cloning, or perhaps a platformer where you push and pull objects.
-
-Your game. Your rules. You can participate as an individual or as a team. You're encouraged to use open source libraries, frameworks, graphics, and sounds.
-
-## Prizes
-
-We have 5 shiny new iPads with Retina displays (64GB wifi models) to give to our winners (or Apple Store Credit equivalent). Runners up will receive GitHub swag of their choice ($100 credit for the [GitHub Shop](http://shop.github.com/)). If you have a team submission, we'll give you Apple Store credit equal to the value of the iPad. You can split it with your teammates as appropriate.
-
-All of the winners and runners up will be showcased on our blog.
-
-<img src="http://i.imgur.com/lxZrD.png" style="border:0;">
-
-### Everyone's a winner!
-
-All participants will receive a limited edition [Coderwall](http://www.coderwall.com) badge as shown above. Winners and runners up will also get their own special version of it.
-
-## Judging
-
-We have a number of awesome judges who graciously volunteered to take a look at all the entries!
-
-* [David Czarnecki](http://twitter.com/CzarneckiD), Lead Engineer at Agora Games
-* [Eric Preisz](https://twitter.com/epreisz), CEO of GarageGames
-* [Matt Hackett](https://twitter.com/#!/richtaur), Co-founder of Lost Decade Games
-* [Lee Reilly](http://twitter.com/leereilly), Gamer Dad and Software Developer at GitHub
-* [Romana Ramzan](https://twitter.com/Manak/), Denki's Player Champion. PhD Researcher. Organiser of Scottish Game Jam.
-
-## Rules
-
-* To qualify for entry as an **individual** you must fork the [github/game-off-2012](https://github.com/github/game-off-2012) repository to your individual account
-* To qualify for entry as a **team** you must fork the [github/game-off-2012](https://github.com/github/game-off-2012) to a [free organization account](https://github.com/settings/organizations)
-* All entries must be web-based i.e. playable in a browser. HTML5, WebGL, Unity, Torque 3D, Node JS, Flash is all possible - just be sure the source is made available on your fork.
-* You must be over the age of 13
-
-## Instructions
-
-* If you don't already have a GitHub account, [sign up now](https://github.com/signup/free) - it's free!
-* Fork the [github/game-off-2012](https://github.com/github/game-off-2012) repository to your individual account (or to a free organization account)
-* Be sure to follow @github on Twitter for updates
-* Make sure your code is pushed to the master branch of before Dec 1st!
-* Make sure you have a README file with a brief description, what open source projects (if any) you used, and a screenshot.
-* Your repo should have a brief description and a URL where the game is playable entered into the fields shown below (this will make our judging process easier):
-
-![](https://img.skitch.com/20121010-x2ecpu95fi91us6hbfehg2dgit.png)
-
-Winners will be announced before Christmas :santa:
-
-# Comments / Questions / Help
-
-* New to Git, GitHub, and/or version control? Check out our [help documentation](https://help.github.com/) to get started!
-* Questions about Git/GitHub? Please email support@github.com and be sure to include 'GitHub Game Off' in the subject.
-* Questions specific to the GitHub Game Off? Please [create an issue](https://github.com/github/game-off-2012/issues/new). That will be the offical FAQ.
-* The official Twitter hashtag is [#ggo12](https://twitter.com/search/realtime?q=%23ggo12).
+# Don't Go Home With Your Game Off
View
20 index.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <title>Github Game Off</title>
+ <link href="style/style.css" rel="stylesheet" />
+ </head>
+ <body>
+ <div class="metrics">
+ <div class="fps"></div>
+ </div>
+ <div class="game"></div>
+ <script src="script/utils.js"></script>
+ <script src="script/keyboard.js"></script>
+ <script src="script/map.js"></script>
+ <script src="script/player.js"></script>
+ <script src="script/monster.js"></script>
+ <script src="script/game.js"></script>
+ </body>
+</html>
View
92 resources/block.svg
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64px"
+ height="64px"
+ id="svg3834"
+ version="1.1"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="New document 4">
+ <title
+ id="title4364">Block</title>
+ <defs
+ id="defs3836" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.5"
+ inkscape:cx="2.3636364"
+ inkscape:cy="32"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:document-units="px"
+ inkscape:grid-bbox="true"
+ inkscape:window-width="1440"
+ inkscape:window-height="837"
+ inkscape:window-x="-4"
+ inkscape:window-y="-4"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata3839">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title>Block</dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <rect
+ style="fill:#b3b3b3;fill-opacity:1;stroke:#4d4d4d;stroke-width:1.12640011;stroke-opacity:1"
+ id="rect3842"
+ width="62.8736"
+ height="62.873615"
+ x="0.56320077"
+ y="0.56310314" />
+ <rect
+ style="fill:#b3b3b3;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.99376577;stroke-opacity:1"
+ id="rect4352"
+ width="37.683201"
+ height="35.229382"
+ x="13.875201"
+ y="14.284708" />
+ <path
+ style="fill:#4d4d4d;stroke:#4d4d4d;stroke-width:1.12640011px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 51.558401,14.284707 63.232001,0.56310286"
+ id="path4356"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#4d4d4d;stroke-width:1.12640011px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 13.875199,14.079907 0.76800078,0.56310286"
+ id="path4358"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#4d4d4d;stroke-width:1.12640011px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 13.875199,49.305519 0.9728008,62.822324"
+ id="path4360"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#4d4d4d;stroke-width:1.12640011px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 51.353601,49.305519 11.8784,13.721605"
+ id="path4362"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
View
75 resources/empty.svg
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64"
+ height="64"
+ id="svg2987"
+ version="1.1"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="grass.svg">
+ <title
+ id="title3765">Empty</title>
+ <defs
+ id="defs2989">
+ <linearGradient
+ id="linearGradient5295"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#35eb0f;stop-opacity:1;"
+ offset="0"
+ id="stop5297" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2.8"
+ inkscape:cx="-87.571429"
+ inkscape:cy="44.415613"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1440"
+ inkscape:window-height="837"
+ inkscape:window-x="-4"
+ inkscape:window-y="-4"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata2992">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title>Empty</dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-988.36218)">
+ <rect
+ style="fill:#35eb0f;fill-opacity:1;stroke:#35eb0f;stroke-width:0.98299885;stroke-opacity:1"
+ id="rect2995"
+ width="64"
+ height="64"
+ x="0.49149942"
+ y="988.8537" />
+ </g>
+</svg>
View
93 resources/grass.svg
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64"
+ height="64"
+ id="svg2987"
+ version="1.1"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="grass.svg">
+ <title
+ id="title3765">Grass</title>
+ <defs
+ id="defs2989">
+ <linearGradient
+ id="linearGradient5295"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#35eb0f;stop-opacity:1;"
+ offset="0"
+ id="stop5297" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2.8"
+ inkscape:cx="-87.571429"
+ inkscape:cy="44.415613"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1440"
+ inkscape:window-height="837"
+ inkscape:window-x="-4"
+ inkscape:window-y="-4"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata2992">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title>Grass</dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-988.36218)">
+ <rect
+ style="fill:#35eb0f;fill-opacity:1;stroke:#35eb0f;stroke-width:0.98299885;stroke-opacity:1"
+ id="rect2995"
+ width="64"
+ height="64"
+ x="0.49149942"
+ y="988.8537" />
+ <path
+ style="fill:#008000;fill-opacity:1;stroke:#00800f;stroke-opacity:1"
+ id="path3779"
+ d="m 7.6727237,16.126558 c 0.018766,-1.107811 0.019225,-2.215969 0.016235,-3.323932 C 7.643937,12.082707 7.4270465,11.347336 7.0182383,10.748058 6.4366412,10.320029 5.8909222,9.8904237 5.4439468,9.314393 5.0523099,8.7565116 4.505083,8.5521983 3.8598099,8.4479368 c 0,0 2.309012,-1.6110561 2.309012,-1.6110561 l 0,0 c 0.6906012,0.1546087 1.2711999,0.441959 1.6886325,1.0385423 0.4566221,0.5783669 1.0458009,0.9671889 1.5901661,1.4484989 0.4311909,0.6550564 0.6772245,1.4331141 0.7205635,2.2154761 -0.003,1.102446 -0.0027,2.205095 0.01624,3.307387 0,0 -2.5116953,1.279773 -2.5116953,1.279773 z"
+ inkscape:connector-curvature="0"
+ transform="translate(0,988.36218)" />
+ <path
+ style="fill:#008000;fill-opacity:1;stroke:#00800f;stroke-opacity:1"
+ id="path3781"
+ d="m 51.537258,58.047172 c -0.415326,-0.917267 -1.01425,-1.717252 -1.692787,-2.454381 -0.909731,-0.718125 -1.732398,-1.52065 -2.490038,-2.396522 -0.712935,-0.789899 -0.922654,-1.758151 -1.047858,-2.78056 -0.08169,-0.978784 -0.06868,-1.961792 -0.06662,-2.942983 0.02047,-0.742243 -0.120063,-1.516714 0.267055,-2.183308 1.031815,-0.968315 2.695094,-2.338864 4.042803,-1.404007 0.592977,0.47366 0.8229,1.155092 0.963616,1.872593 0.128346,0.917384 0.09439,1.848577 0.09674,2.77258 -0.0087,0.843763 0.05097,1.687863 -0.08715,2.523205 -0.04594,0.468917 -0.290108,0.87964 -0.386546,1.334376 0,0 -2.537336,1.24571 -2.537336,1.24571 l 0,0 c 0.0479,-0.481523 0.313177,-0.874731 0.392671,-1.3482 0.169143,-0.822096 0.128765,-1.651478 0.132641,-2.488371 0.0012,-0.905678 0.01417,-1.815945 -0.09255,-2.716807 -0.113132,-0.644234 -0.292131,-1.267963 -0.852699,-1.666611 -0.24743,-0.132656 -0.442562,-0.200469 -0.728467,-0.143625 -0.09574,0.01904 -0.362909,0.136234 -0.28063,0.08371 1.645207,-1.050303 2.983588,-1.672818 1.932064,-1.176651 -0.555817,0.516622 -0.325197,1.341072 -0.369207,2.026694 -0.0074,0.97144 -0.02014,1.944754 0.04964,2.914394 0.102825,0.970903 0.285461,1.88627 0.957048,2.64027 0.754531,0.877425 1.596526,1.649196 2.481212,2.39332 0.691454,0.769416 1.323511,1.586169 1.78528,2.516486 0,0 -2.468888,1.378691 -2.468888,1.378691 z"
+ inkscape:connector-curvature="0"
+ transform="translate(0,988.36218)" />
+ <path
+ style="fill:#008000;fill-opacity:1;stroke:#00800f;stroke-opacity:1"
+ id="path3783"
+ d="m 43.267079,57.06748 c -0.384146,-0.422185 -0.646925,-0.920514 -0.88012,-1.435807 0,0 2.441292,-1.376395 2.441292,-1.376395 l 0,0 c 0.216233,0.487461 0.460068,0.959103 0.848621,1.335479 0,0 -2.409793,1.476723 -2.409793,1.476723 z"
+ inkscape:connector-curvature="0"
+ transform="translate(0,988.36218)" />
+ </g>
+</svg>
View
105 resources/grass2.svg
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64"
+ height="64"
+ id="svg2987"
+ version="1.1"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="empty.svg">
+ <title
+ id="title3765">Grass 2</title>
+ <defs
+ id="defs2989">
+ <linearGradient
+ id="linearGradient5295"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#35eb0f;stop-opacity:1;"
+ offset="0"
+ id="stop5297" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2.8"
+ inkscape:cx="-87.571429"
+ inkscape:cy="44.415613"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1440"
+ inkscape:window-height="837"
+ inkscape:window-x="-4"
+ inkscape:window-y="-4"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata2992">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title>Grass 2</dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-988.36218)">
+ <rect
+ style="fill:#35eb0f;fill-opacity:1;stroke:#35eb0f;stroke-width:0.98299885;stroke-opacity:1"
+ id="rect2995"
+ width="64"
+ height="64"
+ x="0.49149942"
+ y="988.8537" />
+ <path
+ style="fill:#008000;fill-opacity:1;stroke:#00800f;stroke-opacity:1"
+ id="path3812"
+ d="M 56.802102,14.411097 C 55.709665,14.289874 54.669621,13.987694 53.809886,13.290401 53.348129,12.687688 52.973571,12.020394 52.54517,11.388715 52.032869,10.60714 51.876581,9.6754275 51.405951,8.8720027 50.885204,8.2337055 50.376734,7.6236018 50.071878,6.8506823 49.895946,6.1474158 49.728319,5.4386184 49.604981,4.7233318 c -0.02629,-0.1969414 -0.08045,-0.4899362 -0.05138,-0.6937577 0.15897,-1.1145496 2.330357,-1.9629716 3.269269,-2.1900083 0.737807,-0.058516 1.025116,0.4945096 1.18702,1.119369 0.123346,0.6949987 0.111798,1.4045944 0.112072,2.1078609 0.02095,0.6982968 -0.05574,1.4024071 0.02631,2.0972263 0.04938,0.5607129 0.272226,1.0313818 0.563137,1.4995311 0.15911,0.5185464 0.506744,0.9051064 0.788475,1.3526429 0,0 -2.439923,1.42204 -2.439923,1.42204 l 0,0 C 52.775868,10.992603 52.430236,10.599829 52.270318,10.083457 51.958951,9.5821692 51.717337,9.0729439 51.655745,8.4754361 51.554271,7.7703522 51.637283,7.0533857 51.617132,6.3428476 51.618373,5.6612514 51.63181,4.9746514 51.529938,4.2988044 51.408142,3.7710351 51.207219,3.3965293 50.597228,3.5647456 49.547383,3.9936527 50.132406,3.7717409 52.441931,2.406398 c 0.07754,-0.045842 -0.160406,0.086405 -0.22605,0.1480922 -0.250791,0.2356764 -0.169231,0.5487139 -0.127727,0.8512591 0.113549,0.6994485 0.288588,1.3865601 0.439703,2.0777475 0.286335,0.7657125 0.807646,1.3497288 1.30425,1.9876228 0.458169,0.8027778 0.632517,1.7156486 1.129231,2.4961488 0.425625,0.6027136 0.781948,1.2461306 1.218625,1.8339506 0.847528,0.663552 1.874921,0.893794 2.933861,0.987958 0,0 -2.311722,1.62192 -2.311722,1.62192 z"
+ inkscape:connector-curvature="0"
+ transform="translate(0,988.36218)" />
+ <path
+ style="fill:#008000;fill-opacity:1;stroke:#00800f;stroke-opacity:1"
+ id="path3818"
+ d="m 49.829708,12.186626 c 0.0047,1.020634 0.992451,1.274447 1.816581,1.499035 0.45057,0.05268 0.866825,0.182895 1.278346,0.364686 0,0 -2.336774,1.559859 -2.336774,1.559859 l 0,0 c -0.403858,-0.159617 -0.816682,-0.26998 -1.244684,-0.349465 -0.935788,-0.29243 -1.946517,-0.671849 -2.030027,-1.791865 0,0 2.516558,-1.28225 2.516558,-1.28225 z"
+ inkscape:connector-curvature="0"
+ transform="translate(0,988.36218)" />
+ <path
+ style="fill:#008000;fill-opacity:1;stroke:#00800f;stroke-opacity:1"
+ id="path3820"
+ d="m 30.85259,55.524822 c -0.289013,-1.235024 -1.171777,-2.168806 -1.982215,-3.093613 -0.938656,-1.083955 -1.977478,-2.074652 -2.936932,-3.138908 -0.802638,-0.941358 -1.551901,-1.917944 -2.226622,-2.95495 -0.561402,-1.001144 -1.020029,-2.053692 -1.554584,-3.068049 -0.408253,-0.893003 -0.788554,-1.803482 -1.043314,-2.753164 -0.178599,-0.735439 -0.20678,-1.4929 -0.222564,-2.245875 0.02307,-0.629378 -0.07474,-1.274854 0.06803,-1.894035 1.461484,-2.665851 2.764312,-2.082246 3.059792,-0.5347 0.01959,0.636567 0.174826,1.227103 0.394421,1.819518 0.213439,0.693629 0.536761,1.344789 0.785866,2.02492 0.204964,0.710753 0.357633,1.436175 0.57291,2.144267 0.161429,0.662822 0.458934,1.276825 0.644565,1.931474 0.264799,0.618085 0.520743,1.226942 0.687482,1.880288 0.09328,0.69467 0.394235,1.328186 0.623539,1.982427 0.12752,0.451298 0.07093,0.223598 0.169672,0.683125 0,0 -2.479926,1.32815 -2.479926,1.32815 l 0,0 c -0.08739,-0.437906 -0.03652,-0.220912 -0.152521,-0.651006 -0.227831,-0.663807 -0.545324,-1.301373 -0.630303,-2.007117 -0.160454,-0.654234 -0.431154,-1.251762 -0.692407,-1.869838 -0.175998,-0.654961 -0.475145,-1.266212 -0.633622,-1.927219 -0.22282,-0.701384 -0.37342,-1.423528 -0.566783,-2.132979 -0.243459,-0.681178 -0.576212,-1.326952 -0.789621,-2.019464 -0.228191,-0.605372 -0.414851,-1.205553 -0.423268,-1.860417 -0.03043,-0.173941 -0.04489,-0.30848 -0.10492,-0.472862 -0.01681,-0.04604 -0.0355,-0.09294 -0.06572,-0.131531 -0.01248,-0.01593 -0.07324,-0.01336 -0.05587,-0.02374 2.306401,-1.378959 3.282456,-1.379424 2.230181,-1.355306 -0.319201,0.517244 -0.06706,1.231262 -0.138798,1.805269 0.01059,0.733297 0.02694,1.471406 0.185041,2.190865 0.233003,0.934632 0.6001,1.829327 0.997806,2.704841 0.527665,1.008189 0.980512,2.053748 1.536982,3.047737 0.669775,1.022531 1.401033,1.9927 2.192138,2.924854 0.963304,1.062364 1.995971,2.060605 2.932808,3.147809 0.834389,0.968942 1.73958,1.930129 2.113855,3.18524 0,0 -2.495094,1.333991 -2.495094,1.333991 z"
+ inkscape:connector-curvature="0"
+ transform="translate(0,988.36218)" />
+ <path
+ style="fill:#008000;fill-opacity:1;stroke:#00800f;stroke-opacity:1"
+ id="path3822"
+ d="m 37.329708,45.758055 c -0.02797,1.146461 -0.02272,2.293502 -0.01825,3.440214 0.004,0.760012 0.0078,1.520025 0.01022,2.280043 0,0 -2.500489,1.274063 -2.500489,1.274063 l 0,0 c 0.0024,-0.763489 0.0062,-1.526971 0.01022,-2.290454 0.0044,-1.14051 0.01,-2.281364 -0.01825,-3.421616 0,0 2.516558,-1.28225 2.516558,-1.28225 z"
+ inkscape:connector-curvature="0"
+ transform="translate(0,988.36218)" />
+ <path
+ style="fill:#008000;fill-opacity:1;stroke:#00800f;stroke-opacity:1"
+ id="path3824"
+ d="m 62.658752,56.810651 c -0.175215,0.799541 -0.244638,1.616463 -0.294206,2.431837 -0.0315,0.766734 -0.01712,1.528814 -0.134999,2.28841 -0.07862,0.473035 -0.02931,0.242597 -0.145904,0.691744 0,0 -2.54474,1.203496 -2.54474,1.203496 l 0,0 c 0.146225,-0.415242 0.08821,-0.195728 0.166282,-0.660544 0.131443,-0.751843 0.134457,-1.502502 0.153488,-2.264885 0.04725,-0.822039 0.119677,-1.64265 0.254277,-2.455584 0,0 2.545802,-1.234474 2.545802,-1.234474 z"
+ inkscape:connector-curvature="0"
+ transform="translate(0,988.36218)" />
+ </g>
+</svg>
View
98 resources/octocat.svg
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ viewBox="-0.2 -1 379 334"
+ id="svg3965"
+ version="1.1"
+ inkscape:version="0.48.2 r9819"
+ width="100%"
+ height="100%"
+ sodipodi:docname="octocat_g.svg">
+ <metadata
+ id="metadata3987">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs3985" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="640"
+ inkscape:window-height="480"
+ id="namedview3983"
+ showgrid="false"
+ inkscape:zoom="0.70658683"
+ inkscape:cx="189.5"
+ inkscape:cy="167"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg3965" />
+ <path
+ id="cat"
+ d="m 378.18,182.36237 0.28,-1.389 c -31.162,-6.231 -63.141,-6.294 -82.487,-5.49 3.178,-11.451 4.134,-24.627 4.134,-39.32 0,-21.073 -7.917,-37.930997 -20.77,-50.758997 2.246,-7.25 5.246,-23.351 -2.996,-43.963 0,0 -14.541,-4.617 -47.431,17.396 -12.884,-3.22 -26.596,-4.81 -40.328,-4.81 -15.109,0 -30.376,1.924 -44.615,5.83 -33.94,-23.154 -48.923,-18.411 -48.923,-18.411 -9.78,24.457 -3.733,42.566 -1.896,47.063 -11.495,12.405997 -18.513,28.242997 -18.513,47.658997 0,14.658 1.669,27.808 5.745,39.237 -19.511,-0.71 -50.323,-0.437 -80.373,5.572 l 0.276,1.389 c 30.231,-6.046 61.237,-6.256 80.629,-5.522 0.898,2.366 1.899,4.661 3.021,6.879 -19.177,0.618 -51.922,3.062 -83.303,11.915 l 0.387,1.36 c 31.629,-8.918 64.658,-11.301 83.649,-11.882 11.458,21.358 34.048,35.152 74.236,39.484 -5.704,3.833 -11.523,10.349 -13.881,21.374 -7.773,3.718 -32.379,12.793 -47.142,-12.599 0,0 -8.264,-15.109 -24.082,-16.292 0,0 -15.344,-0.235 -1.059,9.562 0,0 10.267,4.838 17.351,23.019 0,0 9.241,31.01 53.835,21.061 v 32.032 c 0,0 -0.943,11.33 -11.33,15.105 0,0 -6.137,4.249 0.475,6.606 0,0 28.792,2.361 28.792,-21.238 v -34.929 c 0,0 -1.142,-13.852 5.663,-18.667 v 57.371 c 0,0 -0.47,13.688 -7.551,18.881 0,0 -4.723,8.494 5.663,6.137 0,0 19.824,-2.832 20.769,-25.961 l 0.449,-58.06 h 4.765 l 0.453,58.06 c 0.943,23.129 20.768,25.961 20.768,25.961 10.383,2.357 5.663,-6.137 5.663,-6.137 -7.08,-5.193 -7.551,-18.881 -7.551,-18.881 v -56.876 c 6.801,5.296 5.663,18.171 5.663,18.171 v 34.929 c 0,23.6 28.793,21.238 28.793,21.238 6.606,-2.357 0.474,-6.606 0.474,-6.606 -10.386,-3.775 -11.33,-15.105 -11.33,-15.105 v -45.786 c 0,-17.854 -7.518,-27.309 -14.87,-32.3 42.859,-4.25 63.426,-18.089 72.903,-39.591 18.773,0.516 52.557,2.803 84.873,11.919 l 0.384,-1.36 c -32.131,-9.063 -65.692,-11.408 -84.655,-11.96 0.898,-2.172 1.682,-4.431 2.378,-6.755 19.25,-0.8 51.38,-0.79 82.66,5.46 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="face"
+ d="m 258.19,135.17437 c 9.231,8.363 14.631,18.462 14.631,29.343 0,50.804 -37.872,52.181 -84.585,52.181 -46.721,0 -84.589,-7.035 -84.589,-52.181 0,-10.809 5.324,-20.845 14.441,-29.174 15.208,-13.881 40.946,-6.531 70.147,-6.531 29.07,-0.004 54.72,-7.429 69.95,6.357 z"
+ inkscape:connector-curvature="0"
+ style="fill:#f4cbb2" />
+ <path
+ id="eyes"
+ d="m 160.1,167.10237 c 0,13.994 -7.88,25.336 -17.6,25.336 -9.72,0 -17.6,-11.342 -17.6,-25.336 0,-13.992 7.88,-25.33 17.6,-25.33 9.72,0.01 17.6,11.34 17.6,25.33 z m 94.43,0 c 0,13.994 -7.88,25.336 -17.6,25.336 -9.72,0 -17.6,-11.342 -17.6,-25.336 0,-13.992 7.88,-25.33 17.6,-25.33 9.72,0.01 17.6,11.34 17.6,25.33 z"
+ inkscape:connector-curvature="0"
+ style="fill:#ffffff" />
+ <g
+ id="g3976"
+ transform="translate(0,41.042373)"
+ style="fill:#ad5c51">
+ <path
+ id="pupils"
+ d="m 154.46,126.38 c 0,9.328 -5.26,16.887 -11.734,16.887 -6.474,0 -11.733,-7.559 -11.733,-16.887 0,-9.331 5.255,-16.894 11.733,-16.894 6.47,0 11.73,7.56 11.73,16.89 z m 94.42,0 c 0,9.328 -5.26,16.887 -11.734,16.887 -6.474,0 -11.733,-7.559 -11.733,-16.887 0,-9.331 5.255,-16.894 11.733,-16.894 6.47,0 11.73,7.56 11.73,16.89 z"
+ inkscape:connector-curvature="0" />
+ <circle
+ id="nose"
+ cx="188.5"
+ cy="148.56"
+ r="4.401"
+ d="m 192.901,148.56 c 0,2.4306 -1.97039,4.401 -4.401,4.401 -2.43061,0 -4.401,-1.9704 -4.401,-4.401 0,-2.43061 1.97039,-4.401 4.401,-4.401 2.43061,0 4.401,1.97039 4.401,4.401 z"
+ sodipodi:cx="188.5"
+ sodipodi:cy="148.56"
+ sodipodi:rx="4.401"
+ sodipodi:ry="4.401" />
+ <path
+ id="mouth"
+ d="m 178.23,159.69 c -0.26,-0.738 0.128,-1.545 0.861,-1.805 0.737,-0.26 1.546,0.128 1.805,0.861 1.134,3.198 4.167,5.346 7.551,5.346 3.384,0 6.417,-2.147 7.551,-5.346 0.26,-0.738 1.067,-1.121 1.805,-0.861 0.738,0.26 1.121,1.067 0.862,1.805 -1.529,4.324 -5.639,7.229 -10.218,7.229 -4.579,0 -8.68,-2.89 -10.21,-7.22 z"
+ inkscape:connector-curvature="0" />
+ </g>
+ <path
+ id="octo"
+ d="m 80.641,220.86237 c 0,1.174 -1.376,2.122 -3.07,2.122 -1.693,0 -3.07,-0.948 -3.07,-2.122 0,-1.175 1.377,-2.127 3.07,-2.127 1.694,0 3.07,0.95 3.07,2.13 z m 8.5,4.72 c 0,1.174 -1.376,2.122 -3.07,2.122 -1.693,0 -3.07,-0.948 -3.07,-2.122 0,-1.175 1.377,-2.127 3.07,-2.127 1.694,0 3.07,0.95 3.07,2.13 z m 5.193,6.14 c 0,1.174 -1.376,2.122 -3.07,2.122 -1.693,0 -3.07,-0.948 -3.07,-2.122 0,-1.175 1.377,-2.127 3.07,-2.127 1.694,0 3.07,0.95 3.07,2.13 z m 4.72,7.08 c 0,1.174 -1.376,2.122 -3.07,2.122 -1.693,0 -3.07,-0.948 -3.07,-2.122 0,-1.175 1.377,-2.127 3.07,-2.127 1.694,0 3.07,0.95 3.07,2.13 z m 5.188,6.61 c 0,1.174 -1.376,2.122 -3.07,2.122 -1.693,0 -3.07,-0.948 -3.07,-2.122 0,-1.175 1.377,-2.127 3.07,-2.127 1.694,0 3.07,0.95 3.07,2.13 z m 7.09,5.66 c 0,1.174 -1.376,2.122 -3.07,2.122 -1.693,0 -3.07,-0.948 -3.07,-2.122 0,-1.175 1.377,-2.127 3.07,-2.127 1.694,0 3.07,0.95 3.07,2.13 z m 9.91,3.78 c 0,1.174 -1.376,2.122 -3.07,2.122 -1.693,0 -3.07,-0.948 -3.07,-2.122 0,-1.175 1.377,-2.127 3.07,-2.127 1.694,0 3.07,0.95 3.07,2.13 z m 9.87,0 c 0,1.174 -1.376,2.122 -3.07,2.122 -1.693,0 -3.07,-0.948 -3.07,-2.122 0,-1.175 1.377,-2.127 3.07,-2.127 1.694,0 3.07,0.95 3.07,2.13 z m 10.01,-1.64 c 0,1.174 -1.376,2.122 -3.07,2.122 -1.693,0 -3.07,-0.948 -3.07,-2.122 0,-1.175 1.377,-2.127 3.07,-2.127 1.694,0 3.07,0.95 3.07,2.13 z"
+ inkscape:connector-curvature="0"
+ style="fill:#c3e4d8" />
+ <path
+ id="drop"
+ d="m 69.369,227.16237 -3.066,10.683 c 0,0 -0.8,3.861 2.84,4.546 3.8,-0.074 3.486,-3.627 3.223,-4.781 z"
+ inkscape:connector-curvature="0"
+ style="fill:#9cdaf1" />
+</svg>
View
46 script/game.js
@@ -0,0 +1,46 @@
+(function() {
+ var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
+ window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
+ window.requestAnimationFrame = requestAnimationFrame;
+})();
+
+(function () {
+
+ "use strict";
+
+ function game(e) {
+ var st, lt, t = 0;
+ st = lt = now();
+ requestAnimationFrame(function step(ft) {
+ var dt = ft - lt;
+ lt = ft;
+ e.forEach(function (i) {
+ i.update(dt, t);
+ });
+ e.forEach(function (i) {
+ i.draw();
+ });
+ requestAnimationFrame(step);
+ });
+ return st;
+ }
+
+ var st,
+ monsters = [],
+ m = map(16, ["empty", "grass", "grass2", "block", "monster"], [3.25, 1.25, 1, 2, 0.5], function (t, r, c) {
+ if(initPosition[1] == r && initPosition[0] == c) {
+ return "";
+ } else {
+ if (t == "monster") {
+ monsters.push(spawn(3.5, [c, r]));
+ }
+ return t;
+ }
+ });
+
+ drawMap(elem(".game"), m);
+
+ tile(initPosition[0], initPosition[1]).innerHTML = '<div class="player"></div>';
+
+ st = game([player].concat(monsters));
+} ());
View
25 script/keyboard.js
@@ -0,0 +1,25 @@
+var Keyboard = (function (el) {
+
+ var k = {};
+
+ function listen(el, e, l) {
+ return el.addEventListener(e, l, false);
+ }
+
+ listen(el, "keydown", function (e) {
+ k[e.keyCode] = true;
+ });
+
+ listen(el, "keyup", function (e) {
+ delete k[e.keyCode];
+ });
+
+ return function () {
+ return k;
+ };
+
+} (window));
+
+function isKeyDown(keyboard, key) {
+ return keyboard.hasOwnProperty(key);
+}
View
77 script/map.js
@@ -0,0 +1,77 @@
+var map;
+
+(function () {
+
+ "use strict";
+
+ function normalize(w) {
+ var s = 0;
+ return w.map(function (i) {
+ return s += i;
+ }).map(function (i) {
+ return i / s;
+ });
+ }
+
+ function rand(w, n) {
+ var v, p = 0, r = random();
+ w.some(function (e, i) {
+ if (p < r && n[i] > r) {
+ v = i;
+ return false;
+ }
+ p = n[i];
+ return true;
+ });
+ return v;
+ }
+
+ function fast(w, n) {
+ var p, r = random(), l = 0, h = n.length - 1;
+ while (l < h) {
+ p = ceiling((h + l / 2));
+ if (n[p] < r) {
+ l = p + 1;
+ } else if (n[p] > r) {
+ h = p - 1;
+ } else {
+ return p;
+ }
+ }
+ return (n[l] >= r) ? l : ((l != h) ? p : l + 1);
+ }
+
+ map = function (t, l, w, g) {
+ var i, j, m = new Array(t), n = normalize(w);
+ g == null && (g = id);
+ for (i = 0; i < t; i++) {
+ m[i] = new Array(t);
+ for (j = 0; j < t; j++) {
+ m[i][j] = g(l[fast(w, n)], i, j);
+ }
+ }
+ return m;
+ }
+
+} ());
+
+function drawMap(el, m) {
+ var h = ['<div class="map">'];
+ m.forEach(function (r, i) {
+ h.push('<div class="row" row="' + i + '">');
+ r.forEach(function (c, j) {
+ h.push('<div class="tile ' + c + '" column="' + j + '"></div>');
+ });
+ h.push("</div>");
+ });
+ write(el, h.concat("</div>").join(""));
+}
+
+function tile(x, y) {
+ return elem('div[row="' + ceiling(y) + '"] div[column="' + ceiling(x) + '"]');
+}
+
+function occupied(x, y) {
+ var t = tile(x, y);
+ return t ? t.classList.contains("block") || t.classList.contains("monster") || t.childNodes.length : false;
+}
View
78 script/monster.js
@@ -0,0 +1,78 @@
+function spawn(s, p) {
+ return (function (s, p) {
+ var l,
+ speed = s,
+ position = (initPosition = p);
+
+ function update(dt) {
+ var velocity,
+ orientation,
+ last = position.slice(0);
+
+ orientation = [(function (s) {
+ if (s < 0.25) {
+ return -1;
+ } else if (s < 0.5) {
+ return 1;
+ }
+ return 0;
+ } (random())), (function (s) {
+ if (s < 0.25) {
+ return -1;
+ } else if (s < 0.5) {
+ return 1;
+ }
+ return 0;
+ } (random()))];
+
+ velocity = orientation.map(function (o) {
+ return o * speed * (dt / 1000);
+ });
+
+ position = vect2dAdd(velocity, position);
+
+ dx = floor(position[0]);
+ dy = floor(position[1]);
+ sx = floor(last[0]);
+ sy = floor(last[1]);
+
+ if (dx != sx || dy != sy) {
+ if (!(inbounds(dx, dy) && !occupied(dx, dy))) {
+ position = last;
+ } else {
+ l = last;
+ }
+ }
+ }
+
+ function draw() {
+ var st,
+ hasMoved,
+ el = elem(".player"),
+ dx = floor(position[0]),
+ dy = floor(position[1]),
+ sx = dx,
+ sy = dy,
+ dt = tile(dx, dy);
+
+ if (dt) {
+ if (l) {
+ sx = floor(l[0]);
+ sy = floor(l[1]);
+ }
+
+ st = tile(sx, sy);
+ if (st && st.classList.contains("monster")) {
+ st.classList.remove("monster");
+ }
+ dt.classList.add("monster");
+ }
+ }
+
+ return {
+ update: update,
+ draw: draw
+ };
+
+ } (s, p));
+}
View
86 script/player.js
@@ -0,0 +1,86 @@
+var player = (function (s, p) {
+ var l,
+ speed = s,
+ position = (initPosition = p);
+
+ function update(dt) {
+ var sx,
+ sy,
+ dx,
+ dy,
+ doMove,
+ orientation,
+ velocity,
+ kb = Keyboard(),
+ last = position.slice(0);
+
+ orientation = [(function () {
+ if (isKeyDown(kb, 37)) {
+ return -1;
+ } else if (isKeyDown(kb, 39)) {
+ return 1;
+ }
+ return 0;
+ } ()), (function () {
+ if (isKeyDown(kb, 38)) {
+ return -1;
+ } else if (isKeyDown(kb, 40)) {
+ return 1;
+ }
+ return 0;
+ } ())];
+
+ velocity = orientation.map(function (o) {
+ return o * speed * (dt / 1000);
+ });
+
+ position = vect2dAdd(velocity, position);
+
+ dx = floor(position[0]);
+ dy = floor(position[1]);
+ sx = floor(last[0]);
+ sy = floor(last[1]);
+
+ if (dx != sx || dy != sy) {
+ doMove = true;
+ }
+
+ if (doMove) {
+ if (!(inbounds(dx, dy) && !occupied(dx, dy))) {
+ position = last;
+ } else {
+ l = last;
+ }
+ }
+ }
+
+ function draw() {
+ var st,
+ hasMoved,
+ el = elem(".player"),
+ dx = floor(position[0]),
+ dy = floor(position[1]),
+ sx = dx,
+ sy = dy,
+ dt = tile(dx, dy);
+
+ if (dt) {
+ if (l) {
+ sx = floor(l[0]);
+ sy = floor(l[1]);
+ }
+
+ st = tile(sx, sy);
+ if (st && st.childNodes.length) {
+ st.removeChild(el);
+ }
+ dt.appendChild(el);
+ }
+ }
+
+ return {
+ update: update,
+ draw: draw
+ };
+
+} (2, [0, 0]));
View
44 script/utils.js
@@ -0,0 +1,44 @@
+"use strict";
+
+function id(x) {
+ return x;
+}
+
+function elem(id) {
+ return document.querySelector(id);
+}
+
+function write(el, txt) {
+ el.innerHTML = txt;
+}
+
+var now = Date.now;
+var random = Math.random;
+var ceiling = Math.ceil;
+var floor = Math.floor;
+
+function fixed(n, p) {
+ return n.toFixed(p);
+}
+
+function defer(f, t) {
+ t == null && (t = 0);
+ return setTimeout(f, t);
+}
+
+function fps(f, s, e) {
+ e == null && (e = now());
+ return f / ((e - s) / 1000);
+}
+
+function vect2dScale(v, s) {
+ return [v[0] * s, v[1] * s];
+}
+
+function vect2dAdd(a, b) {
+ return [a[0] + b[0], a[1] + b[1]];
+}
+
+function inbounds(x, y) {
+ return x < 16 && x >= 0 && y < 16 && y >= 0;
+}
View
51 style/style.css
@@ -0,0 +1,51 @@
+body {
+ margin: 0;
+ padding: 0;
+}
+
+.metrics {
+ position: absolute;
+ right: 0;
+}
+
+.row {
+ clear: both;
+ height: 32px;
+}
+
+.tile {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ background: url('../resources/empty.svg');
+ background-size: 32px 32px;
+ float: left;
+ height: inherit;
+ width: 32px;
+}
+
+.player {
+ background: url('../resources/octocat.svg');
+ height: 100%;
+ width: 100%;
+}
+
+.tile.grass {
+ background: url('../resources/grass.svg');
+ background-size: 32px 32px;
+}
+
+.tile.grass2 {
+ background: url('../resources/grass2.svg');
+ background-size: 32px 32px;
+}
+
+.tile.block {
+ background: url('../resources/block.svg');
+ background-size: 32px 32px;
+}
+
+.tile.monster {
+ background: none;
+ background-color: red;
+}

No commit comments for this range

Something went wrong with that request. Please try again.