Live data from Hacker News

ScriptCraft: Building cool things using Javascript in Minecraft

walterhiggins.net

11–20 of 34 posts

Re: ScriptCraft: Building cool things using Javascript in Minecraft

#11

Considering how much of Minecraft can be about grinding for resources or MCMMO levels... imagine being able to script the player, or even being allowed "bot teammates" you can script! Since that part of it could run on just the client (minus small interface stuff on the server for clients to request basic info and send player input), you could go all out with as much advanced AI as you can muster, without draining th…

Mechanisation seems to be available via the collection of plugins with "Feed the Beast". I don't know much about it but several YouTubers are now using it, alongside vanilla.

Re: ScriptCraft: Building cool things using Javascript in Minecraft

#12

Considering how much of Minecraft can be about grinding for resources or MCMMO levels... imagine being able to script the player, or even being allowed "bot teammates" you can script! Since that part of it could run on just the client (minus small interface stuff on the server for clients to request basic info and send player input), you could go all out with as much advanced AI as you can muster, without draining th…

From the server's standpoint, running n players has optimistically the same cost whether those players are client-side bots or not (although, bots can be more abusive). In the MUD days (20+ years ago) this was called "multiplaying" and was usually forbidden, partly on grounds of this resource use, but some games did allow it. MMOs 10+ years ago saw an influx of people using GUI scripting tools to implement bots. It's fairly obvious when it's happening and people really don't like it for the same reasons that they often don't like server-side bots in multiplayer games.

So realistically I believe this is a niche idea which might be hard to make commercially viable. But it could be an interesting thing for private minecraft servers.

Re: ScriptCraft: Building cool things using Javascript in Minecraft

#13
This is a great gateway drug for getting kids into coding.

The JS language also allows a transition to html5/web stuff (cool web pages they and their friends can see with some simple-to-setup hosting) and perhaps ultimately server side (nodejs).

And a child walking that path would then be exposed to enough ideas/different environments that learning a different language would be a natural next step.

This is a pretty exciting idea. I wonder how easy it can be made. i.e. I wonder how much of the distracting tool-based detail can be swept to one side.

Re: ScriptCraft: Building cool things using Javascript in Minecraft

#14
post #13

This is a great gateway drug for getting kids into coding. The JS language also allows a transition to html5/web stuff (cool web pages they and their friends can see with some simple-to-setup hosting) and perhaps ultimately server side (nodejs). And a child walking that path would then be exposed to enough ideas/different environments that learning a different language would be a natural next step. This is a pretty e…

Plus no one is going to get a god complex on with all the people who cry how shit javascript is.

Re: ScriptCraft: Building cool things using Javascript in Minecraft

#15
post #10

This is cool, but for the server it is already possible to use a number of scripting languages. By using the Bukkit server mod, which provides a stable plugin API, it is relatively easy to add a wrapper around a scripting engine [0]. For example, a plugin providing Rhino support [2] and one providing python support [2]. I would recommend either porting your work to the Bukkit framework, or working with one of the exi…

Computer craft, which uses Lua for scripting, is by far the most popular. There's a ton of tutorials available for it on YouTube.

Re: ScriptCraft: Building cool things using Javascript in Minecraft

#16
post #10

This is cool, but for the server it is already possible to use a number of scripting languages. By using the Bukkit server mod, which provides a stable plugin API, it is relatively easy to add a wrapper around a scripting engine [0]. For example, a plugin providing Rhino support [2] and one providing python support [2]. I would recommend either porting your work to the Bukkit framework, or working with one of the exi…

I'd like to second this. You just can't ignore the multiplayer aspect of Minecraft. It's huge. Imagine if you put all the young developers on the same server and gave them access to this. They could write scripts to coordinate builds and cooperate with one another. You would need to make some adjustments to it though. You can't just place blocks without the player being in range. It would need an entire toolset to move the player. Imagine writing a script to harvest and replant a field of wheat. Or maybe a script to navigate a cave safely, killing mobs as they appear. This would really open up a world of potential. Look into Bukkit.

Re: ScriptCraft: Building cool things using Javascript in Minecraft

#17
Cool. As a matter of fact, about a week ago I tried to do something similar by trying to integrate Python with Minecraft. I actually did expose the full Bukkit API to Python (easy enough to do), so all its commands are available.

I didn't really like the "type your code in Minecraft chat"-approach many similar projects were/are taking (i.e. "/js myCodeHere()" in chat) and wanted a proper interpreter window. To integrate the Java-based Bukkit API with Python, I used Jython. The result is something similar as shown here: http://www.minecraftwiki.net/wiki/Pi_Edition

I've yet to put up a blog post or something, but I've thrown together a quick video of me playing with it (it's a bit slow so feel free to forward) here: http://www.youtube.com/watch?v=rI3PfgCSI7Y

I think something like this could really help in getting kids excited about programming. Back in the day, I started learning programming with LOGO http://en.wikipedia.org/wiki/Logo_(programming_language) , a quirky adaptation of LISP, but where you could immediately see your results drawn on screen. It's cool to see Minecraft as some sort of modern "canvas" for programming.

Re: ScriptCraft: Building cool things using Javascript in Minecraft

#18
We experimented with this kind of scripting in Manic Digger: http://manicdigger.sourceforge.net/forum/viewtopic.php?f=7&#...

It would be better if it had exposed all the commands from the server modding api: http://manicdigger.sourceforge.net/news/wp-content/uploads/2... . (note: old version)

I think JS would be useful for making Adventure game mode where blocks (script-boxes) contain javascript code that spawns NPCs, defines dialog trees, quests, items.

Another example: Spleef arena control room http://mdgallery.strangebutfunny.net/View?id=103

Re: ScriptCraft: Building cool things using Javascript in Minecraft

#19
post #13

This is a great gateway drug for getting kids into coding. The JS language also allows a transition to html5/web stuff (cool web pages they and their friends can see with some simple-to-setup hosting) and perhaps ultimately server side (nodejs). And a child walking that path would then be exposed to enough ideas/different environments that learning a different language would be a natural next step. This is a pretty e…

I'm currently introducing my 10 year old niece to programming using ComputerCraft, a single player mod that introduces several programmable objects in to the Minecraft world. Installing is a bit of an exercise, because it requires Forge, but it is otherwise worth it. I recommend using MCPatcher to load Forge, then just drop the ComputerCraft zip in to the /mods folder inside your Minecraft data folder.

http://www.computercraft.info

Re: ScriptCraft: Building cool things using Javascript in Minecraft

#20
post #13

This is a great gateway drug for getting kids into coding. The JS language also allows a transition to html5/web stuff (cool web pages they and their friends can see with some simple-to-setup hosting) and perhaps ultimately server side (nodejs). And a child walking that path would then be exposed to enough ideas/different environments that learning a different language would be a natural next step. This is a pretty e…

I'm currently introducing my 10 year old niece to programming using ComputerCraft, a single player mod that introduces several programmable objects in to the Minecraft world. Installing is a bit of an exercise, because it requires Forge, but it is otherwise worth it. I recommend using MCPatcher to load Forge, then just drop the ComputerCraft zip in to the /mods folder inside your Minecraft data folder. http://www.com…

Using MagicLauncher[1] makes it much easier.

1: http://www.minecraftforum.net/topic/939149-launcher-magic-la...

Post reply on HN