Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Fair enough, though I didn't mean to imply those were the only good reasons.

I didn't mean to say C++ would have been a bad choice, I was mocking the recurring mentality that a project is only good if it's in C (or even lower-level languages). It's quite tiresome to deal with it, I'm sorry it didn't quite get through.

Java was definitely one of the reasons the original Minecraft was bad though. It (along with bad architecture) was the reason behind the massive server footprint and why hosting minecraft servers is extremely expensive and completely unscalable.

Hey, remember when Notch said he'd open source Minecraft once he was done with it? I remember...



>Java was definitely one of the reasons the original Minecraft was bad though. It (along with bad architecture) was the reason behind the massive server footprint and why hosting minecraft servers is extremely expensive and completely unscalable.

No. It wasn't Java.

The reasons are many, but here's some: All world logic happens in a single thread (fixed in Minecraft 1.8, now there's a thread per world). Entity lookups are very badly coded (mitigated, but not fixed by CoFHCore which explicitly excludes dropped items from the lookups). There are many bad coding decisions made throughout Minecraft (a nice amount of them is fixed by FastCraft, which optimizes Minecraft and reduces its RAM usage by ~300MB; OptiFine used to be good for the GPU but 1.7/1.8 integrated most of its fixes). Every neighboring block/tile entity access loads that neighboring chunk, then marks it as unused, then unloads it every 30 seconds (not a huge issue in MC itself unless you use a lot of pistons, but a massive issue for modded servers)

Etc, etc, etc. It is possible to scale Minecraft, however nowadays it is not possible to scale Minecraft without mods and at least a basic knowledge of how the engine works.

There was an experimental mod made by nallar in 2013 which dynamically ASM-patched Minecraft and every mod to make all world logic fully threaded in multiple worker threads, as well as a separate thread for chat; however, that was really hard to maintain in practice, especially as mods grew more and more complex.

A commonly used method is to run multiple instances of Minecraft servers and use a proxy glue server like BungeeCord to treat them as separate world on one server.


And guns don't kill people, they just make it very easy to do so.

I'm well aware of all those efforts. I'm also well aware of the insanity behind them and just how much effort was required for it all. Java really didn't help the entire matter.


So, you think that if Minecraft had been coded in C++, threading and memory use and modding would have been so much easier?

Interesting.


You're mistaking "easier" and "more likely".


Oh YEAH. Java's absolutely NO good at all for server architectures. Good thing no-uses it for that purpose now.

Jesus on a bike.




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

Search: