• kopi-pasted
      link
      fedilink
      274 months ago

      The code is for an incremental RPG programming game called Bitburner, which uses a version of JavaScript that has some additional game-specific APIs and restrictions (the game originally ran in a web browser)

      This code in particular is a (flawed) solution to the first problem the game throws at you, which is finding a way to hack as much in-game money as possible from in-game servers. (The problem is more complicated than it appears at first glance, and I’ll try to elaborate if you ask.)

      Urghh, now I must post before I leave…

        • kopi-pasted
          link
          fedilink
          44 months ago

          My bad, was wondering why it was called “recon”… HACK GROW HACK WEAKEN? What on earth is this madness? Did… did you… did you do this on purpose?

          Anyways, I think I’m going to write the essay despite no one asking.

        • @aldalire@lemmy.dbzer0.comOP
          link
          fedilink
          English
          14 months ago

          there’s documentation , but it’s a good way to learn javascript imo. It gives you an environment to interact with javascript and that’s a perfect place to go hands-on and learn programming :)

  • Love bitburner. I have a tiered hacking script I’ve written that distributes itself to all hacked servers and manages their cash whilst extracting the max amount. Great game 10/10

    • @aldalire@lemmy.dbzer0.comOP
      link
      fedilink
      English
      64 months ago

      I’ve been banging my head against the wall at making a continuous batching script. I finally got it to (kind of) work using the additionalMsec property of the hack, weak, and grow to time the batches. I’m getting a billion a second with it rn :)

      • Sounds like you’re on the right track! I have admittedly taken a break and haven’t used ns3 so it’s probably way more capable now. Great game though!

  • @ProgrammingSocks
    link
    84 months ago

    What the fuck kind of JavaScript fuckery is for (; ; i++)

    • Metype
      link
      fedilink
      English
      104 months ago

      i is already initiated so the first statement isn’t necessary so it’s empty.

      The loop is ended with a conditional break statement so the loop end criteria isn’t necessary so it’s empty.

      We want each iteration to increment i so it’s i++

      That’s how you end up with (;;i++)

  • @AVincentInSpace
    link
    English
    34 months ago

    Did you somehow convince KDE to be a tiling window manager? Is that what I’m seeing here?