Anyone want to see the network code for Minecraft worked on above anything else right now?

I run a small-time server and I'm amazed at the amount of bandwidth the game uses - about 100kpbs/player on average from what I've seen. And when you think about it, 90% of that data is block info of blocks deep underground that the player will never see.

I don't know how the >20 player servers do it. I know Minecraft is going to send more data than a typical game due to the map data, but it'd be way less prohibitive to run a server if it was doing some optimization.

A few things that come to mind are:

  • client-side map caching (I seem to recall hearing that this is on its way?)

  • split chunks vertically into 16x16x16 cubes, keep track of "visible" chunks and only push those out to the players

I'm not complaining, since obviously other things have been more important so far, but I know this would improve my experience a lot more than a new feature update.

Posted Feb 13, 2011, 12:31 AM UTC · edited

1523
loercase•

I agree with everything you just said.

But: I think mod support should be the Next Big Thing.

4
aaronbyard•

I disagree. As much as I'd like to see mod support, it should not be the focus for a game in beta status. The game needs to work before you can add mods to it. The modders would be in the same boat they're in now, having to update code with each new release of the game. I don't think mod support should be implemented just yet, especially with talk of changing the way maps are saved, etc...

2
switchcaseOP•

Ah, I hadn't thought of that. Though I hardly use mods, I think I agree; I guess I just get reminded of the network stuff a lot more often.

1
Drfuzzykins•

This, and also the network server code is of a fairly poor design (for programmers: it uses two threads per player and two threads for accepting sockets) leading to some very unnecessary CPU usage.

2
seydar•

Are we able to view the code without disassembling the class files?

1
nurta•

it's Java, it just needs a little reflection magic. There's plenty of decompilers out there. Of course Notch obfuscates it, so that gets fun. But no, you don't need a disassembler.

1
Sunergy•

I'm happy with their priorities lately: Fix the save system first, then mod support, all the while adding some small amount of new content to the game to keep the playerbase engaged. What you suggest would work well as the next thing for them to fix, but I think Mojang is going in the right direction.

2
benjick•

What's wrong with the saves?

2
Sunergy•

Minecraft currently saves game worlds as a large amount of rather tiny files. This makes it take longer to both load worlds and to copy them if your making a backup. Since these problems will only get worse as the game gets more complex, and are a major roadblock to further optimisation, it's worth fixing it now before it becomes even more serious.

2
Aries9•

Can you point me to where notch said he's working on this? Any ETA?

I was planning on trying MineCabinet or McRegion if this doesn't come out soon.

2
frymaster•

no, because notch isn't working on it. jeb_ is :P

http://twitter.com/#!/jeb_/status/33465975114305536

they also tried one monolithic large file, and some sort of sql-based save format (wasn't sqlite, but "similar to" apparently)

2
benjick•

Oh, okey. Thank you :) I have no insight in the game backend at all so thank you for explaining it. Have some upmines

2
frymaster•

especially since by default most distros of linux, and windows pre-vista, update "last access time" data on every file whenever it's read from. With many small files, the ratio of metadata updates to useful reads is insanely bad.

2
reseph•
2
Corosus•

Wow, 500GB a freakin month.

1
mailjozo•

My game lags all the time and sometimes the server just stops sending me updates so I'm stuck in a half visible world. It really sucks so I'd like to see some changes here too.

1
Airazz•

They should work on resource consumption in general. Even powerful machines lag sometimes. And it's not like MC has very great graphics or physics...

1
sazkion•

I agree as well. I usually play minecraft with 2 other people and when all 3 of us are on at the same time the games starts to get a little laggy. A fourth one time made it very annoying to play. This would be a nice update

1
robhol•

Just about anything would be less prohibitive with some optimization. Looks like there's plenty of "profit" to be had from optimization in just about anything you can point blindly at in the game.

1
switchcaseOP•

"point blindly at"? I'm a CS / Combinatorics and Optimization major, I know what gains can be made in the network code, and they're significant.

It's not like I'm just pointing at something and saying "make it better", which seems to be what you're implying.

1
robhol•

That's not what I meant - I mean that if you pick a random thing about MC, there's likely a lot of performance wasted in it.

1
switchcaseOP•

Oh, that makes a lot more sense. True enough.

1
bigboomer223•

Ditto

-1