Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eviltester/7262f4d0e8226cd2fa57d750e3faff95 to your computer and use it in GitHub Desktop.
Save eviltester/7262f4d0e8226cd2fa57d750e3faff95 to your computer and use it in GitHub Desktop.
simple galaxian game hacks
Found this little Galaxians game which is quite nice and hackable:
http://michal.biniek.pl/games/galaxian.html
~~~~~~~~
var infiniteLivesBot = setInterval(function(){if(oLives.iLives<3){oLives.add();}},1000);
~~~~~~~~
~~~~~~~~
var autofireBot = setInterval(function(){MyShip.shoot();},200)
~~~~~~~~
~~~~~~~~
var machineGunner = setInterval(function(){new bullet({x: MyShip.x + aParams.width/2, y: MyShip.y - aParamsBullet.height, direction: -1});},200);
~~~~~~~~
And clear bost with clearInterval
~~~~~~~~
clearInterval(machineGunner)
~~~~~~~~
@eviltester
Copy link
Author

Found this little Galaxians game which is quite nice and hackable:

http://michal.biniek.pl/games/galaxian.html

var infiniteLivesBot = setInterval(function(){if(oLives.iLives<3){oLives.add();}},1000);
var autofireBot = setInterval(function(){MyShip.shoot();},200) 
var machineGunner = setInterval(function(){new bullet({x: MyShip.x + aParams.width/2, y: MyShip.y - aParamsBullet.height, direction: -1});},200);

And clear bost with clearInterval

clearInterval(machineGunner)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment