Live data from Hacker News

Spaceplan

jhollands.co.uk

21–30 of 70 posts

Re: Spaceplan

#22
I love it! Found myself doing mental calculations for the most effective thing to buy next, and the next thing I knew I'd written a script to automatically buy it:

    var clickBestThing = function(){
       var things = [...document.querySelectorAll("#manufacture__container > div")].map(function(e){
        var res = {e};
        [...e.getElementsByTagName("span")].map(function(s){
          res[s.id] = +s.innerText.replace(/[^0-9]/g, '')
        })
        if(e.id === "item__spudGun" || e.id === "item__potatoLauncher") res.powerGain *= 1000;
        res.score = res.cost / res.powerGain;
        // res.score = res.cost / res.spudGain;
        res.name = e.getElementsByClassName("manufacture__name")[0].innerText;
        return res
      }).sort(function(a,b){return a.score - b.score})

      window.things = things;

      var bestThing = things[0];
      if(!things[things.length-1].score) bestThing = things[things.length-1]
      console.info("clicking " + bestThing.name)
      things[0].e.click();
    }
    var timer = setInterval(clickBestThing, 5000)
Of course it's much easier to `power = 999...`, but this feels more like automation and less like cheating.

Re: Spaceplan

#25

Why do we accumulate watts? That's stupid.

Check Tipler. We won't need them now, we would be even much better off to save more, but we would need them to save the world on the galactic scale.

Re: Spaceplan

#26
I might just be tired and dense. But does watts per second make sense here? Shouldn't the accumulated power be in joules (or Watt hours?) and the per second value just be watts?

Re: Spaceplan

#28
post #26

I might just be tired and dense. But does watts per second make sense here? Shouldn't the accumulated power be in joules (or Watt hours?) and the per second value just be watts?

In our universe, energy would be accumulated (measured in joules or watt-seconds), and each upgrade bought would produce more power (measured in watts or joules per second). But the game might be taking place in an alternate timeline where James Joule and James Watt were switched at birth (also born at the same time).

Re: Spaceplan

#30
post #26

I might just be tired and dense. But does watts per second make sense here? Shouldn't the accumulated power be in joules (or Watt hours?) and the per second value just be watts?

Yes. Yes it should.

...I'd complain but I'm too busy micromanaging space potatoes.

Post reply on HN