diff --git a/bla/muri.zip b/bla/muri.zip new file mode 100644 index 0000000..8d6f0ba Binary files /dev/null and b/bla/muri.zip differ diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..18d860f --- /dev/null +++ b/build.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +rm -f muri-src.zip muri.zip +uglifyjs --no-dead-code --output src/muri.min.js src/*.js +(cd src && zip -q -9 ../muri.zip index.html muri.min.js assets/**/* vendor/*.min.js) +(cd src && zip -q -9 ../muri-src.zip *) + +filesize=`stat --printf="%s" muri.zip` +echo $filesize "byte ->" $((100*$filesize/13000)) "%" diff --git a/muri-src.zip b/muri-src.zip new file mode 100644 index 0000000..66c84a9 Binary files /dev/null and b/muri-src.zip differ diff --git a/muri.zip b/muri.zip new file mode 100644 index 0000000..05fdda3 Binary files /dev/null and b/muri.zip differ diff --git a/src/index.html b/src/index.html index cc0b2e3..a707228 100644 --- a/src/index.html +++ b/src/index.html @@ -1,15 +1 @@ - - -
a js13kgame by Aaron Fischer (2017)
- -loading game ...
- - - +a js13kgame by Aaron Fischer (2017)
loading game ...
diff --git a/src/index_dev.html b/src/index_dev.html new file mode 100644 index 0000000..cc0b2e3 --- /dev/null +++ b/src/index_dev.html @@ -0,0 +1,15 @@ + + +a js13kgame by Aaron Fischer (2017)
+ +loading game ...
+ + + diff --git a/src/muri.min.js b/src/muri.min.js new file mode 100644 index 0000000..220d17a --- /dev/null +++ b/src/muri.min.js @@ -0,0 +1 @@ +"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start;"use strict";var muri=function(){kontra.init("js13k-2017");kontra.assets.imagePath="assets/images";var muri={};var bg=function(room){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+room]})};muri.modules=[];muri.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none";if(kontra.store.get("current-room")===null)kontra.store.set("current-room","stasis_dark");var rooms={stasis_dark:bg("stasis_dark"),stasis:bg("stasis")};kontra.gameLoop({update:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].update();for(m in muri.modules)m.update()},render:function(){var currentRoom=kontra.store.get("current-room");rooms[currentRoom].render();for(m in muri.modules)m.render()}}).start()})};return muri}();window.onload=muri.start; \ No newline at end of file diff --git a/src/vendor/kontra.min.js b/src/vendor/kontra.min.js new file mode 100644 index 0000000..365f92f --- /dev/null +++ b/src/vendor/kontra.min.js @@ -0,0 +1,12 @@ +/* + * Kontra.js v3.0.0 (Custom Build on 2017-08-21) | MIT + * Build: https://straker.github.io/kontra/download?files=gameLoop+keyboard+sprite+assets+pool+spriteSheet+store + */ +this.kontra={init:function(n){var t=this.canvas=document.getElementById(n)||n||document.querySelector("canvas");if(!this._isCanvas(t))throw Error("You must provide a canvas element for the game");this.context=t.getContext("2d")},_noop:new Function,_isString:function(n){return""+n===n},_isNumber:function(n){return+n===n},_isFunc:function(n){return"function"==typeof n},_isImage:function(n){return!!n&&"IMG"===n.nodeName||this._isCanvas(n)},_isCanvas:function(n){return!!n&&"CANVAS"===n.nodeName}}; +!function(e,n,t){e.gameLoop=function(o){function r(){if(i=n(r),c=t.now(),u=c-a,a=c,!(u>1e3)){for(s+=u;s>=d;)h.update(f),s-=d;m(),h.render()}}if(o=o||{},!e._isFunc(o.update)||!e._isFunc(o.render))throw Error("You must provide update() and render() functions");var a,i,c,u,p=o.fps||60,s=0,d=1e3/p,f=1/p,m=o.clearCanvas===!1?e._noop:function(){e.context.clearRect(0,0,e.canvas.width,e.canvas.height)},h={update:o.update,render:o.render,isStopped:!0,start:function(){a=t.now(),this.isStopped=!1,n(r)},stop:function(){this.isStopped=!0,cancelAnimationFrame(i)},_frame:r,set _last(e){a=e}};return h}}(kontra,requestAnimationFrame,performance); +!function(){function n(n){var r=i[n.which];t[r]=!0,o[r]&&o[r](n)}function r(n){var r=i[n.which];t[r]=!1}function e(n){t={}}for(var o={},t={},i={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"delete",91:"leftwindow",92:"rightwindow",93:"select",144:"numlock",145:"scrolllock",106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},a=0;a<26;a++)i[65+a]=(10+a).toString(36);for(a=0;a<10;a++)i[48+a]=""+a,i[96+a]="numpad"+a;for(a=1;a<20;a++)i[111+a]="f"+a;var c=window.addEventListener;c("keydown",n),c("keyup",r),c("blur",e),kontra.keys={bind:function(n,r){n=Array.isArray(n)?n:[n];for(var e,t=0;e=n[t];t++)o[e]=r},unbind:function(n){n=Array.isArray(n)?n:[n];for(var r,e=0;r=n[e];e++)o[r]=null},pressed:function(n){return!!t[n]}}}(); +!function(t,i,n){t.vector=function(i,n){var e=Object.create(t.vector.prototype);return e._init(i,n),e},t.vector.prototype={_init:function(t,i){this._x=t||0,this._y=i||0},add:function(t,i){this._x+=(t.x||0)*(i||1),this._y+=(t.y||0)*(i||1)},clamp:function(t,i,e,c){this._clamp=!0,this._xMin=void 0!==t?t:-n,this._yMin=void 0!==i?i:-n,this._xMax=void 0!==e?e:n,this._yMax=void 0!==c?c:n},get x(){return this._x},get y(){return this._y},set x(t){this._x=this._clamp?i.min(i.max(this._xMin,t),this._xMax):t},set y(t){this._y=this._clamp?i.min(i.max(this._yMin,t),this._yMax):t}},t.sprite=function(i){var n=Object.create(t.sprite.prototype);return n.init(i),n},t.sprite.prototype={init:function(i){var n,e,c,o=this;i=i||{},o.position=o.position||t.vector(),o.velocity=o.velocity||t.vector(),o.acceleration=o.acceleration||t.vector(),o.position._init(i.x,i.y),o.velocity._init(i.dx,i.dy),o.acceleration._init(i.ddx,i.ddy),o.width=o.height=0;for(var s in i)o[s]=i[s];if(o.ttl=i.ttl||0,o.context=i.context||t.context,o.advance=o._advance,o.draw=o._draw,t._isImage(n=i.image))o.image=n,o.width=n.width,o.height=n.height,o.draw=o._drawImg;else if(n=i.animations){o.animations={};for(var h in n)e=n[h],o.animations[h]=e.clone?e.clone():e,c||(c=o.animations[h]);o.currentAnimation=c,o.width=c.width,o.height=c.height,o.advance=o._advanceAnim,o.draw=o._drawAnim}},get x(){return this.position.x},get y(){return this.position.y},get dx(){return this.velocity.x},get dy(){return this.velocity.y},get ddx(){return this.acceleration.x},get ddy(){return this.acceleration.y},set x(t){this.position.x=t},set y(t){this.position.y=t},set dx(t){this.velocity.x=t},set dy(t){this.velocity.y=t},set ddx(t){this.acceleration.x=t},set ddy(t){this.acceleration.y=t},isAlive:function(){return this.ttl>0},collidesWith:function(t){return this.x