Permalink
Browse files

Slightly Better Resources

  • Loading branch information...
1 parent 60ed016 commit 0edd2a25c26d5d6247c5a9f01d815435fa8997d9 @crteal crteal committed Oct 28, 2012
Showing with 303 additions and 6 deletions.
  1. +92 −0 resources/block.svg
  2. +75 −0 resources/empty.svg
  3. +19 −1 resources/grass.svg
  4. +105 −0 resources/grass2.svg
  5. +1 −1 script/game.js
  6. +1 −1 script/map.js
  7. +10 −3 style/style.css
View
@@ -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
@@ -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
@@ -37,7 +37,7 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8"
- inkscape:cx="-29.357143"
+ inkscape:cx="-87.571429"
inkscape:cy="44.415613"
inkscape:document-units="px"
inkscape:current-layer="layer1"
@@ -71,5 +71,23 @@
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
@@ -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
@@ -28,7 +28,7 @@
var st,
f = 0,
el = elem(".fps"),
- m = map(8, ["", "block", "monster"], [7.5, 2, 0.5], function (t, r, c) {
+ m = map(8, ["empty", "grass", "grass2", "block", "monster"], [3.25, 1.25, 1, 2, 0.5], function (t, r, c) {
return (initPosition[1] == r && initPosition[0] == c) ? "" : t;
});
View
@@ -73,5 +73,5 @@ function tile(x, y) {
function occupied(x, y) {
var t = tile(x, y);
- return t ? t.classList.length > 1 : false;
+ return t ? t.classList.contains("block") || t.classList.contains("monster") : false;
}
View
@@ -17,7 +17,7 @@ body {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
- background: url('../resources/grass.svg');
+ background: url('../resources/empty.svg');
float: left;
height: 100%;
width: 64px;
@@ -29,9 +29,16 @@ body {
width: 100%;
}
+.tile.grass {
+ background: url('../resources/grass.svg');
+}
+
+.tile.grass2 {
+ background: url('../resources/grass2.svg');
+}
+
.tile.block {
- background: none;
- background-color: gray;
+ background: url('../resources/block.svg');
}
.tile.monster {

0 comments on commit 0edd2a2

Please sign in to comment.