Slashdot Mirror


JavaScript Comes To Minecraft

mikejuk writes "JavaScript is the language of the client and it is becoming the language of the server. Now it seems set to be the language of Minecraft. ScriptCraft is a Minecraft mod that can be added to the game to allow the player to use JavaScript commands. Walter Higgins ported the Rhino JVM implementation of JavaScript in a few spare weeks over Xmas. Some additional JavaScript classes allow the construction of blocks making it possible to automate construction. It also provides a 'turtle like' drone class that makes it easier to move in 3D. It makes use of a fluent API to create a domain specific language for movement. As its creator says: 'Ultimately I think the ScriptCraft mod could be used to take building in Minecraft to a whole new level. With a full-blown language at the Player's disposal, it should be possible to create not just castles and forts but entire road networks and cities.' Most importantly of all, it not only pushes the boundary of Minecraft, it also provides a way to get kids who are already hooked on Minecraft to start learning JavaScript."

14 of 149 comments (clear)

  1. Re:Java IS NOT JavaScript, you morons! by The+MAZZTer · · Score: 4, Informative

    RTFS. Just because Java and JavaScript appear in the same paragraph doesn't mean someone is equating the two. This is a JavaScript engine coded in Java, hooked up to Minecraft.

  2. Nerd antennae went up by iluvcapra · · Score: 5, Funny

    I saw the headline and half expected that someone had in fact implemented a Javascript interpreter with MineCraft.

    --
    Don't blame me, I voted for Baltar.
    1. Re:Nerd antennae went up by Fallingcow · · Score: 4, Funny

      Javascript running via a 3D world written in Java would have a Lovecraftian madness-inducing quality. You'd take one look at it and start bleeding from the eyes while producing an inhuman scream, before vomiting up most of your internal organs.

      I mean, either of those things (Javascript, or a 3D world written in Java) are capable of getting you half way there all on their own. Both cannot exist, yet they do. Even thinking of the two being combined is enough to PH'NGLUI MGLW'NAFH CTHULHU R'LYEH WGAH'NAGL FHTAGN **carrier lost**

    2. Re:Nerd antennae went up by vlm · · Score: 4, Funny

      I'd much rather see a java implementation using lots and lots of redstone. Then you could theoretically run minecraft on minecraft in infinite regression. This could cause the end of the world so I'd be careful.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    3. Re:Nerd antennae went up by Bigbutt · · Score: 4, Funny

      "How did he type **carrier lost**"

      "Perhaps he was dictating it."
      "Shut-up"

      [John]

      --
      Shit better not happen!
    4. Re:Nerd antennae went up by Fallingcow · · Score: 4, Insightful

      I didn't intend it that way but it kind of works, since Lovecraft did that kind of shit all the time.

      "The end is near. I hear a noise at the door, as of some immense slippery body lumbering against it. It shall not find me. God, that hand! The window! The window!"

      Maybe if he weren't taking the time to write "The window! The window!" his odds of escaping would improve.

  3. You can do this in Java already? by shaitand · · Score: 4, Interesting

    You can already do all this in Java. What is the benefit of exposing players to the wonder of javascript via minecraft vs exposing them to the wonders of java via minecraft? Either one is a POS.

    I wish someone would do a C rewrite. People make excuses about the fully manipulable world and such but the reality is that there is nothing going on in minecraft that would make it tax a Pentium 3 without no gpu offloading had it been authored well in a decent language.

    Don't get me wrong it's a great game and fun to play. The implementation just leaves a lot to be desired. Buggy as hell too but you can't blame that on the language!

    1. Re:You can do this in Java already? by timeOday · · Score: 4, Interesting
      I'm delighted that Minecraft is in Java because my son plays it all the time, it's more constructive than other games, and it also happens to be just about the ONLY game that will run on our computer, because it's Linux. (Well, flash web games work too, and Club Penguin had a healthy run at our place... but I doubt Flash is what you are advocating).

      OK, I realize there has been some variety of games over the years which were released for Linux like quake 3. But as for games on Linux that are actually currently popular, and which people playing on different OS can link up and talk to each other, there are extremely few.

    2. Re:You can do this in Java already? by Pieroxy · · Score: 5, Interesting

      There's nothing inherently special about Java that makes it able to run games on Windows/Linux any more than C/C++.

      Holy fucking Jesus Christ, you haven't learned much in all that time have you? There is a hell of a lot more in Java. I once saw a (server-side) project of about 100k classes go from Java 1.3 32bit on Windows to Java 1.4 64bit on Solaris without even needing a recompilation. The stuff just worked.

      This is miles and miles away from what it would have meant in C or C++, and you know it. Of course, C and/or C++ done properly can achieve something that is portable, but at least your most common data type doesn't change whenever you change the number of fucking bits in your CPU. Not mentioning the stability of the APIs whenever you want to do anything vaguely more complex than fopen.

    3. Re:You can do this in Java already? by Zmobie · · Score: 4, Informative

      No, not in this case. You must not be very familiar with java and its runtime. Java is DESIGNED to be extremely portable and is in fact one of the biggest reasons it was able to rise up and compete with C++ originally. I have ported many programs in java from a Windows Eclipse environment to a Linux native compiler and both of them produce virtually the same files, the compiled files actually ran on both environments without a recompile pretty much every time that I remember.

      C++ on the other had can be a BEAST to try and port even trivial programs between Windows and Linux, and in my early college days proved to be a pain in the ass because we standardized all of our programs compilations to the gcc and g++ Linux compilers while I was used to doing a lot of my coding using either Borland or Visual Studios on a Windows machine (Visual Studios has its own weird flavors as it is, but even more generic compilers had nasty results).

  4. Re:Why wont JS just go away by vlm · · Score: 3, Informative

    Does python still use whitespace as part of control flow structures? Ugh. I don't want to be the guy who posts the equivalent of "mysql doesn't have transactions" over and over in 2013, but I can't be bothered to keep up with a language I don't use, either.

    It is however a fact that Python at least USED TO BE in a really bad neighborhood, sandwiched in between COBOL and FORTRAN in the "compiler really cares a lot about whitespace" ghetto, even if they've fixed it since then. I'd rather write a million parenthesis in LISP.

    --
    "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
  5. I am amused by Windwraith · · Score: 5, Interesting

    I find it amusing that this is news but what about LuaForge? It allows you to do Minecraft stuff in Lua, a language that can't be easier to learn, and is also pretty fast out of the box.

  6. Re:Why wont JS just go away by larry+bagina · · Score: 4, Funny

    Haven't fixed it, won't fix it.

    >>> from __future__ import braces
    File "", line 1
    SyntaxError: not a chance

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  7. Hardly revolutionary by Mercano · · Score: 4, Informative

    Not sure how this is a groundbreaking achievement. ComputerCraft already provides a LUA interpreter and turtles, and has a lot more documentation. There's also RedPower's Control module, that gives you an emulated 6502-based 8 bit computer. A FORTH boot disk can be crafted in-game, or you can edit your save files to bring in either an BASIC boot disk or your own assembler code. (Previous /.coverage of the 6502 emulator blocks)

    --
    #include <signature.h>