Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
In Soviet Minecraft, server op you (manxome.org)
196 points by Mithaldu on Nov 30, 2014 | hide | past | favorite | 63 comments


I'm certain this is an unpopular opinion I see Minecraft as an incredibly buggy mess. Not for it being unfun, because it is, a lot of fun but for years this game has been plagued with a litany of problems.

[Edit: Maybe it isn't an incredibly unpopular opinion I'm just used to people who play games try to cut you when you critique.]

Shortly before horses were added I thought something was going to be done to help the finer OCD-minded fans in the community like me. After horses were added I realised that was not going to happen.

For example a bug cropped up that would lose a 'tick' of redstone power once per transfer down a circuit. Only if the pulse was shorter than three 'ticks' long. Making anything requiring use of a precision circuit impossible. That as far as I know was never actually fixed.

Microsoft own the property I'd like to see them have a go at remaking it. I'm absolutely positive there will always be holdouts over the original. But Minecraft by itself doesn't seem like it would be all that complicated a game to remake.

I'd play it.


From what I have seen, that is not at all an unpopular opinion. Minecraft is widely considered, even by its own player base, to be a resource-hogging, poorly-built mess.

It is really fun, though.


"Son, have you been playing Minecraft on my iMac again?"

"No way, Dad"

<feels white-hot top of unit>

"Go to your room."

(This is an actual transcript from last week)


I can use the same technique with MS Word on the Macs in our house. They feel broken if someone has used Word recently. Restart required. 2013 MacBook Airs.


Apple laptops have, and have had for some time, absolutely terrible heat dispersion. I had a 2007 silver Macbook Pro that overheated constantly under any kind of load. It was a huge pain.


I can only speak about the 2012 MBP and the 2013 rMBP, neither of which demonstrate any issues at all with dissipating heat.

You example is from 7 years ago. The entire MacBook line has been completely changed, inside and out, since then.


What sort of work do you do on them? The issues I had, and that I've seen others have on MBPs of varying years, occurred mostly in games, video editing, etc. Things that might not be the primary purpose of the product, but nevertheless shoudln't cause it to overheat and shut down.


2012 rMBP (they completely reengineered the heat distribution in the retinas). I've had all CPU cores at maximum load and the GPU churning for extended periods doing heavy video encoding on multiple occasions, it gets pretty hot, and the fans scream, but it's never had actual running issues due to the heat.

Apple addressed these issues, very publicly, giving an anecdote from 7 year old hardware is still not a great data point for the current state of their hardware.


I have no issues with anything except Word. Video encoding and other fairly intensive things run just fine, Word bring the computer to its knees to the point where I can tell if it has been open. A restart is always required.


I mostly do iOS development, which produces very little heat.

I do use it for gaming, however. I've played through Portal 2 on max settings. The aluminum definitely gets hot right above the keyboard near the left top corner, but it has never shut down due to heat.


I run several VM's, Photoshop, and games. Never had overheating result in a mandatory shutdown/reboot.


You'd be very unlikely to with modern CPUs. They generally just throttle back to a tiny fraction of normal performance, unless the heatsink literally falls off (and maybe even then).


> unless the heatsink literally falls off

Or if the laptop was shipped without the screws which hold the heatsink in place (happened to me). The thermal throttling can hold for some time, but it'll reach 100 degrees and turn off, even if you aren't doing anything CPU-intensive.


I'd recommend checking to see that the heatsinks are clear. I was having horrible slowdown on a 2010 MBP that I realized after a lot of hair pulling was due to thermal issues. Pulled the fans/heatsinks, there was a solid mat of dust between the fans and heatsinks. Cleaned those up, and suddenly the fans never even spun up to audible levels.


I have a macbook pro from 2011, a macbook air from 2013 and a retina macbook pro 2014. I had issues with heat dispersion with the macbook air but not with the macbook pro and the retina macbook pro.


There are things to help. Unfortunately the settings panel is pretty much opaque about what effect all thedifferent things actually do.

But reducing render distance helps.


Thanks, I'll check that out.


Dwarf Fortress and Minecraft are both incredible, complex games made by one mediocre programmer (not commenting on the Mojang team, just Notch himself). It's frustrating, but it should also serve as an inspiration to any small, talented team that wants to go even further.


You should be commenting on "the Mojang team", not Notch. Minecraft was way more performant when Notch was working on it. There were a number of blogposts in the recent past about how Minecraft maintainers rewriting Minecraft to be more object-oriented and idiomatic have trashed what little performance there was.


It was only more performant because it did less back then. And Notch had to incorporate fan mods to the lighting and chunk rendering code to even achieve that.

There have been recent issues but lets not pretend they aren't the sort of mistakes Notch liked to make.


Go look it up - recent patches have had massive increases in CPU and RAM usage not because of new features, but because of making the code prettier. Notch may not be an expert on lighting or chunk rendering, but he's pretty good at writing efficient game code.


Just goes to show that shipping matters more than perfect code...


Ever wonder how many projects fail to ship because the developers are concerned their code isn't good enough?


I imagine the shipping developers don't!


I'd like to be a mediocre programmer as Notch...


Mediocre may be the wrong word, but perhaps "unmeticulous".


Ships things that work.


Adequate practice beats out sublime theory every time.


It's another example of Worse is Better


I think that's a rather severe misinterpretation of Worse is Better. Worse is Better doesn't mean ship with silly bugs and never fix them; it means ship simple, understandable systems. The canonical example is that unix system calls sometimes need to be restarted instead of always succeeding. But that doesn't mean unix succeeded because its system calls would randomly return incorrect data.


Under the assumption that Minecraft could not have been delivered as quickly or seen a similar level of success if properly engineered. For Notch, this may be true. But that doesn't mean it is a golden rule for all developers. In fact, I don't think it is very closely related at all. More of a coincidence.


I always thought it was a better example of deciding if you should optimize code or just throw faster hardware at a system.


Mediocre or not, I'd sure love to have a look at Dwarf Fortress' code.


Part of Minecraft's popularity is it's history of bugs and hacks. It's what makes it all interesting isn't it? If everything worked perfectly from day 1 and every feature were part of the core there would be no sense of ownership, as people would understand the limits very quickly and would move on to Dwarf Fortress. Of course there are some actual bugs, but sometimes those bugs are a lot of fun! (of course i am just guessing, i am not a player)

Edit: It's fascinating how difficult it is to intentionally engineer something with the purpose of it being hacked on by people.


Like it or not, these bugs become integral parts of the game. The whole Block Update Debacle was a bug that came from events not being sent to diagonal blocks (or something like that) and now there are thousands of youtube videos about how to exploit it.


The phrase "like it or not" can be applied before anything and sounds unnecessarily dickish. Like it or not some of us think deliberate design goes a lot further than accidental design. Like it or not airplanes use a lot of fuel when they travel over the Pacific. Like it or not just isn't needed at the start of a sentence.


The massive bugginess is #1 what eventually killed my motivation for the game. (Plugin scene drama and Mojang EULA dickery being items 2 and 3).

It's very hard to enjoy the game when making builds over a certain size leads to all manner of graphical glitches and memory leaks and other weirdness that you need to be intimately familiar with the operation of the Java virtual machine in order to fix. A number of these bugs lead to world corruption - I remember back when 1.7 had its initial release, there was a certain configuration of redstone blocks and mine carts that would "corrupt the world state" and leave you with an unplayable world.


The only people who were negatively interacting with the EULA were the server operators abusing it, like charging the kids of rich parents $10,000.00 US for special privileges in game. Mojang put a stop to that abuse, good on them.


You will forgive me for thinking the game author coming in and telling me how I have to run my private server is just a little bit of a reach.


this thread feels eerily familiar...

oblig contribution: perfect code != worthwhile code


There is a much simpler reliable way to do this...

Run a bungeecord proxy server http://www.spigotmc.org/threads/1-7-2-1-8-bungeecord.392/

Then you can link the servers together with signs and customizable nether portals.

I have been running servers like this for a while now.

And Craftbukkit isn't dead, http://www.spigotmc.org/threads/bukkit-craftbukkit-spigot-1-...

You can get the latest code from the devs at spigot without the DMCAed code, everything was rewritten, patched for 1.8 and is now has a legal way to distribute the files. (You compile them yourself)


+1 for this. I actually just set up similar myself yesterday. Once you look at a few tutorials and figure out how to muck around with all the yaml config files, it's really pretty easy to configure bungeecord. The isolation you get from being in completely separate worlds is definitely an added bonus. You can do cool things like create worlds that are entirely devoted to a minigame, for instance, if you want to have that. It also makes it really easy to just create one hub world that players can teleport from, and return to easily. I used a really simple plugin called FancyPortals[0] to achieve that. There are a couple potential problems you may face, the biggest one being memory requirements (since you would actually be running n servers instead of just one). If that's the case, you could also check out MultiVerse[1], which is a bit easier on memory I believe.

If nothing else, you should at least consider switching over to Spigot[2] (A high performance fork of Bukkit). They've had some DMCA problems, so you have to compile the .jar yourself, but there's a script which automates the entire process, so that's really no big deal. Plus they just updated to 1.8 yesterday! Once you have Spigot, you can use any Bukkit plugin. Plugins exist that do everything you're trying to do, and more, but with the added bonus of actually being integrated into the game. The big one to check out would be Essentials[3], which contains dozen of simple commands for doing lots of common, neat things.

[0] http://dev.bukkit.org/bukkit-plugins/fancyportals/

[1] http://dev.bukkit.org/bukkit-plugins/multiverse-core/

[2] http://www.spigotmc.org/threads/bukkit-craftbukkit-spigot-1-...

[3] http://dev.bukkit.org/bukkit-plugins/essentials/


This is a really interesting hack. I have done a similar thing by runnig minecraft in tmux, tail -f | grep for something in the log file and then sending commands back to tmux.

However, all these problems in the article can be solved with a few essential bukkit Plugins. Bukkit has been DMCA'd by one oft their own developers, probably because it became clear that Mojang (the company developing Minecraft) owns the rights over Bukkit. A popular fork of Bukkit, "Spigot" [0] has continued development and published patches until they stripped all of the contributions of the DMCA issuer. They published Spigot for Minecraft 1.8 on Friday.

[0] http://www.spigotmc.org/

Edit: typos


  tail -f log | grep keyword | while read line; do tmux send-keys -t 1:1.0 "$line"; done
Really cool idea! But grep awaits EOF to pipe its result... (though it outputs line-by-line if result is not piped onward)

How are you getting it to work? I found a --line-buffered option for GNU grep, but I'm using busybox grep...

EDIT OK, in case anyone else wants to know, found I could solve it by putting the grep inside the while loop instead (line=`echo $line | grep keyword`), but I'd still like to hear how you did it... BTW: entering "-" causes send-keys interprets it as an option.. I pr need some data cleansing...


Can't remember exactly how I did it. However I found something similar that waits for a command to complete sed instead of grep. sed exists after the first match:

    send_to_mc "/wb SomeWorld trim 100 15 C-m"
    sleep 1
    send_to_mc "/wb trim confirm"
    tail -n 0 -F "logs/latest.log" | sed "/trimmed so far (100.0% done)/q"
    send_to_mc "/broadcast Chunk deletion done"

send_to_mc is simply sending $1 + return to tmux:

    tmux send -t "$tmux_session" "$1" C-m
/wb is a command from the WorldBorder [0] command that is (in this case) used to delete all chunks (which were generated for some reason) beyond the border.

using while read line is probably the best option if you want to continuously check the logs You could also use awk isntead of grep:

    awk "/pattern/{print $0}"

0: https://github.com/Brettflan/WorldBorder

EDIT: Completely misunderstood your problem. I thought grep wouldn't output to stdout until EOF. Seems like a loop is the only option


Maybe you can fix your '-' problem by putting '--' (like a blank option) in front of it. This tells send-keys not to interpret anything after the -- as an option.


Good idea, thanks, I know that idiom but didn't think of it. Interestingly, it's not in the tmux manpage, but I just tried it and it works. Cool!


Line-oriented text-based interfaces strike again!

I haven't used Perl in years, but I'd like to know why the POE approach is groty. I'd prefer writing the thing in Perl than Expect.

As a dad waiting eagerly for his son to be old enough to play Minecraft, I'd much rather run an unmodded server, so this approach is very appealing to me. I've been disappointed that almost every pre-release for 1.8 had nothing but server commands, but if it means I can drive a Minecraft server without mods I see more value to that effort.

I'm curious if the Dominus mentioned in the article is mjd. I saw him speak once on how git was a greater accomplishment for Linus than Linux. At 37 years old, I'm trying to find a path forward in my career that lets me keep growing as a programmer. It's encouraging to see these hackers who have stayed with their craft all these years and are still churning out cool solutions.


POE is (in my opinion) a bit grottier than some other solutions might have been, but certainly not on the "shrieking horror" level of Expect. ;) There are many different sugar layers built atop POE, but I'm now using MooseX::POE, which is nice. It's not a disgusting pile of hacks, unless you think that everything in Perl is that, in which case... y'know.

For example, IO::Async lets you do your work with futures, which are a very nice abstraction that people from many other languages are used to. You can do that in POE, but it's not the default way. POE also has, sometimes, weird choices of jargon for stuff. I know POE better, though, and my goal was to get it done, rather than learn a new framework or build something to last the ages. I mean, the kid might stop being interested in Minecraft at any second, right?

And yes, it was mjd.


I used to work on a Minecraft Server Tunnel which extended the idea of only using the console by also tunneling all network traffic. By inspecting packets it knew about things like player positions or block interactions which were used to allow players to have their own private chests or protected areas.

It is fairly outdated now but was a very interesting project. https://github.com/SimpleServer/SimpleServer/


I was hoping someone would post this. Too bad it hasn't been updated recently, but it had a good run.


I've been noodling around with Minecraft servers because it was the original idea behind what I'm now working on at StackMonkey. Messing around with the deployment for these servers[1] has helped me refine the business models a bit to make them more manageable. As a result, we'll have self-hosted managed-software-as-a-service deployments within a month or so.

The demo server for Minecraft on the site[2] launches a server with ScriptCraft installed, which allows you to run JavaScript executables that execute actions in game. For example, you can build a sphere of TNT boxes with a very short JS comman. The intent behind this is to be able to bring the Bitcoin payment addresses for the server(s) in game where they can be managed by others. I'm working on getting qrcode.js running in game so I can build payment codes out of blocks. I'll also need to figure out a way to show the time left on the server.

Now that I've read the post, I'm wondering how valuable adding the ability to op someone based on Bitcoin payments would be? It seems there needs to be a decent auth mechanism for this that can be quickly hooked up to the server. If the author's daughter wanted to 'op' herself, she simply sends in a very small amount of Bitcoin to the server. If the daughter's friend wanted to do it and was on with others, then they'd need to send in more to prove they weren't a bad actor. Maybe 10 cents or so.

This is all related to enabling managing you software remotely on someone's cloud as if it were a public cloud. Enabling permissions for lower level users for high level functionality will surely be something we have to tackle.

[1] https://gist.github.com/kordless/beba0a6fa8edcda3b15a [2] https://www.stackmonkey.com/demo/minecraft/


Yep along with Spigot, as mentioned by _jomo, there's also a new project called Sponge that is replacing CraftBukkit from the ground up, building on top of Minecraft Forge (a modloader) rather then as a standalone mod like CraftBukkit/Spigot. Its still in pre-alpha though, and there are a LOT of things unimplemented, compared to Spigot which is a fork of Bukkit.

Another popular option is Glowstone, which is an open source implementation of the entire minecraft server, rather then a mod. Glowstone already supports plugins written for the Bukkit API (separate from the CraftBukkit implementation that got DMCA'd) and there are plans to support the Sponge API when its more mature. I can't speak to its stability/completeness though. It looks like there isn't any redstone or physics yet? That shouldn't be a huge deal for most creative servers, but YMMV.


The things you do for your kids.


The bot part sounds quite similar to what I've done with my server: https://github.com/lifthrasiir/mcbot . It opens two 0MQ sockets corresponding to the stdin and stdout of the java process and operates an IRC bot using them. 0MQ did have an advantage of not having to stop the server to update the bot.


Huh, I used a similar approach several years ago running a Minecraft server for some friends on an old laptop as a child process of a nodejs monitor that had commands for changing time, getting certain items for free, etc. Eventually just migrated to craftbukkit because of demand for specific plugins. It turned out that the monitor process worked a lot better.


I want a dad like you.


Thanks! Can you promise to care for me in my old age?


I only posted the link, i'm not rjbs. :)

You can comment directly on the article though!


Being a Minecraft admin is super fun, like a D&D dungeon master.


>There's no command to get a player's location

You can see it on the debug overlay. One of the F keys.

Also, I'd recommend running the server inside screen so you can get back to it from ssh


It's F3, but that wouldn't have worked, because he needed a message to be logged (otherwise they'd have to type the coordinates in).


Slightly OT: That code makes me miss Perl. Working, nice looking, easily understandable, object oriented, async code.

https://github.com/rjbs/Soviet-Minecraft/blob/master/lib/Sov...




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

Search: