Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Redstone, a distributed Minecraft server that runs on Node.js (redstone.io)
125 points by mappum on March 28, 2013 | hide | past | favorite | 56 comments


Seriuosly interested, why is Node.js better suited as a gameserver than say C or Java ?

What exactly are you doing on the serverside? Is it an authorative setup or are you just passing position messages around (in which cases huge amounts of players wouldnt be suprising) ?

Did you reverse engineer minecrafts multiplayer protocol or is this an alternate implementation?

EDIT just looked it up and it seems like the minecraft network protocol is public, so no reverse engineering needed. It also looks like its not an authorative setup which could cause cheating problems in PvP enviroments down the line


Sure, Java or C will be much faster at any computational work. And I am no node.js fan-boi. But doing actual asynchronous local-file IO in C is non-trivial, and if their server is not CPU bound, there doesn't seem to be anything wrong with using node.js. Could you also use libuv from C? Sure.


"Java or C will be much faster at any computational work"

That is far from clear. I've been using nodejs for some computational work using https://github.com/substack/gamma.js and https://github.com/niggler/bessel and found that the JS version is faster than the straightforward Java implementation.


The OP made too general of a statement because there are certain cases where V8 can preform better than the JVM; however, generally Java does seem to perform better (ignoring startup time).

http://benchmarksgame.alioth.debian.org/u64/benchmark.php?te...

In the linked benchmarks, V8 only has a decided advantage executing regexes.


Heh. Last time I checked v8 regexes were really fast, except their string builder was a disaster... it wrapped every piece of string as a js object (gc and everything).


Sounds familiar to Java's own string concatenation. In Java you use StringBuilder / Buffer to create larger strings from smaller ones; in Node you'd use Buffers, although I never dived too deep into those.


Well, C will be faster anyways... and the JVM is probably faster than v8 more times than not.


im not an expert but arent UDP Socket connections more like an fire and forget scenario which doesnt create alot of waiting ? Id think that game servers have to compute heavier stuff per tick and have to process all the incoming packets anyway so that waiting for IO isnt really an issue ? It might make sense to have the game world updating and sending/recieving packets in different threads though, so is that were nodejs makes sense?


The network stuff is, yeah. But presumably you want your minecraft world to be durable, which means hitting disk. And you don't want your network stuff blocked behind that.


ok makes sense but i wouldnt write every change to the disk anyway. The server state can well be kept inside memory and only be saved once in a while, but nevertheless doing that in a different thread would make sense.


The protocol isn't public and Mojang has always refused to say anything about it. The protocol is RE'd by http://mcdevs.org/ which runs http://wiki.vg. There is no technical or otherwise limitation on authorization, they just haven't implemented it yet.


Cool, a distributed minecraft server. But where's the source, or something more technically meaty? "I made a distributed X and here's some screenshots" isn't that interesting alone.


I plan on open sourcing it and trying to foster a community of modding/contributions, but first I would like to clean up the code. Also, we want to figure out our business strategy.


Well, I'm logged in right now and there's no lag with many players. Try it.


I am at work, and don't have minecraft on any machine nearby =).


Interesting that you guys are applying to YC 13. Note that YCombinator already have invested in a very similar company: Minefold[1].

TC had some info on that too[2].

[1] https://minefold.com/

[2] http://techcrunch.com/2012/03/12/minefold-launch/


The Minefold guys were just on our demo server! They're the best.


This might have come up on HN when it was released, but here it is anyway.

A minecraft server written in php.

edit: updated repo https://github.com/shoghicp/PocketMine-MP


Actual repo is https://github.com/shoghicp/PocketMine-MP, not sure why you linked to an outdated fork?


I like the line... "building penises out of dirt right now". Someone should put that on a T-shirt.


And wear it to PyCon...

(sorry, couldn't resist)


I was going to buy redstone.io for pretty much the same project. I was only late by 15 days. Oh well, such is life. Wish you luck!


Haha, I almost waited to buy it. So how is your project the same?


It was going to use node.js; So far I have written my prototypes in CoffeeScript, but if I end up going through with my project it will likely be with vanilla JS. The premise of it wasn't for it to be a MMO.

You can imagine my surprise when I found out who purchased the domain and what projects you are working on, knowing that redstone.io was pretty much destined to be node.js and minecraft related.


Do you have any sort of permission or support from Mojang? It might not be a good idea to invest a substantial amount of time in "A Minecraft MMO" without this...


Mojang has no issue with custom servers so long as you use their authentication, hasn't since the classic days.

Legally, they *have no say in the matter, as the server uses no assets from Minecraft and the protocol has been Chinese Wall'd (http://en.wikipedia.org/wiki/Chinese_wall#Computer_science) via http://wiki.vg


We emailed them for permission to make a custom server a while back, and they said it was ok. We haven't contacted them specifically about the MMO yet though.


http://minecraft.net/brand

Just follow these and you'll be fine :-)


Ah, thank you! This is really useful. :)

Also, the statue you "erected" has unfortunately been destroyed. :(


How can it be on the front page of HN without any players in it? Or is that a bug as well? I'm flying around in a near-pristine and empty world.

[edit] I dug a hole, fell through, respawned, fell through my own hole. I'm sorry. I'm afraid everyone will fall through it now.


When you made that comment, it was the middle of the night here. Everyone was online at USA after-work hours.

The reason the world was near-pristine was because I messed up the storage for this deployment, which made so every once in a while it would regenerate the chunks.


Move around (horizontally) and you should get a notice that you've changed servers, at which point other players may be found (if not, keep going.)


A Minecraft MMO? Would Mojang allow you to do that? Would Redstone still be categorized within the scope of a mod at that point?

Either way, I logged on for a bit, and there was no lag whatsoever with a ton of players online. Fascinating stuff.


Thanks for checking it out! I don't think we'd violate Mojang's brand policy, but we're waiting on a response from them to confirm that.


Interesting. Great work guys!


Mojang is already working on a Minecraft MMO [1] - how would this be different?

[1] http://help.mojang.com/customer/portal/articles/1018151-mine...


That isn't an MMO, it is just a server hosting service. However, if they wanted to add MMOs to Realms, they could acquire us. ;)


I don't think that's an MMO -- it's just a way to easily set up a server and play on it with your friends.


Please tell me you are going to opensource / release this, this would be so awesome for some Minecraft Related projects i'm doing ( Gigantic PVP & RPG Servers ) I just can't go >600 Players w/o lag on a decent E3 Series.


I am leaning towards opensourcing it, but we don't want to do it too soon unless we realize we want to do a PaaS sort of thing.


I've seen lots of work on alternate Minecraft servers; has anyone worked on an open Minecraft client (obviously not named "Minecraft" for trademark reasons, but compatible with the network protocol)?


Spout is working on a client as well as an open server, both are designed to be general purpose for voxel based games but have minecraft compatibility plugins: https://github.com/SpoutDev/Spout


Manic Digger (http://manicdigger.sourceforge.net/) used to connect to Minecraft Classic servers. And a client for full Minecraft was planned.

But Notch didn't like seeing alternative clients, so I removed it from the game.

Also, see http://wiki.vg/Client_List


That's one of the reasons I don't like Notch. This game is literally perfect for WebGL. The rendering done is minimal, the CPU work done is minimal, the textures are (or could be) tiny, and the code required would be tiny.

But no, it's STILL in Java. Why?


You don't like notch, who is one of the nicest and modest people in the world, because of a programming decision he made on his game and his product? You may disagree with a business decision, but saying you dislike someone personally because of it is a bit much.


Possibly because that's what Notch was comfortable with, it's a valid choice, and he built it and made big stacks of money instead of agonizing about what language to use on the grounds of whether people would think he was cool.


There are a couple projects in this direction (I looked into trying to make a bot at one point). Unfortunately, any names have slipped my memory at this point. But be assured, they exist.


Voxel.js is one: http://voxeljs.com/


In what way is this a minecraft client?


Well it's not technically Minecraft, but obviously heavily inspired. I'm pretty sure I heard about someone hooking it up to the real protocol.


is there a mailing list or something that I can join, besides the mlist for their far-from-now MMO release so that I can keep up on development?

Even more internets for open sourced on github perhaps?


We'll use this mailing list for anything interesting on the project, like open-sourcing it, even if it's not directly related to the MMO.


Nice.

How are people doing this? Are they reverse engineering Minecraft or is the server side fairly straightforward?


A buggy server for a buggy game. Sounds like an adventure.


How does this differ from spout except for being in Node?


This is super neat!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: