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

Yes? It seems like a good choice. Maybe 6 months ago I would have said it's foolish, but with C# being an actual open language now, I'd say it's a rock solid choice.

What would you have done it in? C, and never get any contributor? Or Java, and do as bad as the original?



Take a loot at some open source projects. The Battle For Wesnoth (c++) has many more contributors than FreeCol (Java). I'm sure that number of C# developers in the world who develop open source stuff is even smaller.

If your main goal is to get as many contributors as possible, perhaps JavaScript would be the best choice.

And I'm still not convinced that Java is the main cause the original Minecraft was bad.

Although I write all my games in C++ (native) and JavaScript (web) I did some Java games for Android and the language is rarely the bottleneck if you are careful about object life-cycles. The main bottleneck is usually the graphics hardware.

I'm not saying that C# is bad choice. Actually I think it is a good choice, just not for the reasons you state.


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.


I'm not looking for a bunch of contributors, for what it's worth. I specifically alienate a large group of potential contributors by forbidding anyone who's read decompiled source from contributing.


>> I'm sure that number of C# developers in the world who develop open source stuff is even smaller.

We aren't god damn unicorns.


I don't know man; all those ninja cats on unicorns seem to say otherwise.


> If your main goal is to get as many contributors as possible, perhaps JavaScript would be the best choice.

Hi, I just wanted to mention I have started such a project: https://github.com/deathcap/voxel-clientmc - a Minecraft-compatible client written in JavaScript.

It sure could use more contributors =) help welcome if anyone is interested. Currently not many features are implemented, but you can connect to a Minecraft server (works with the official Minecraft server and its modifications, but I usually test with Glowstone or Glowstone++ for a 100% open source stack) in your web browser via the WebSocket/Minecraft proxy https://github.com/deathcap/wsmc. The protocol decoding is implemented by PrismarineJS https://github.com/PrismarineJS/node-minecraft-protocol, much of the client logic by mineflayer, and the WebGL voxel rendering using http://voxeljs.com.

JavaScript has some interesting benefits for game development, I enjoy its dynamicism; plugin loading is a breeze. Since it is already a "scripting" language, it is easily modifiable by third-parties. Some game engines have taken to implementing a second language runtime, for example Minetest and MC-Server are written in C++ but allow addon development in Lua. The Minecraft modifications ComputerCraft and OpenComputers also allow in-game programming using Lua. ScriptCraft, a CanaryMod plugin for Minecraft, allows writing plugins in JavaScript. etc. But when everything is written in JavaScript, there is no platform/addon dichotomy. In voxel.js (especially https://github.com/deathcap/voxel-engine-stackgl), much of the core functionality is even implemented in "plugins".


Yeah, I'm a little let down this isn't in C++. Also, I'm not sure how open .Net actually is but it is cross platformish so not a bad choice. Though I imagine that .Net and Java would have share the same sort of performance issues.

But if its your preferred language and framework then I say have at it. It's your project you should be able to enjoy working on it.


I chose C# for the cross platform nature of it, the strong OO model, the pluggability, and my large established base of Minecraft code in C# to draw from. All of these things make it a strong candidate for a project like TrueCraft.


> and do as bad as the original?

You mean the third best-selling game of all time? Yeah, they could've done much better if they used C++.


You're clearly quite unaware of how difficult and expensive it is to host a minecraft server.


Actually, I don't really care what language. I was mostly making a comment on the lack of detail of the post. I had to click all the way down to the source code to see what language it was in, which to me seemed like the most important aspect of this entire project.


Why would that be the most important detail?


It seems to be a wrong choice to me, here's why. There is a lot of mods for Minecraft that use unofficial Forge API. If this project reimplemented Minecraft and made a similar API, many of the mods could be ported to it.




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

Search: