Currently working on an open source implementation of Minecraft [1] - a server, client, and various related things. The new Minecraft update released this week and radically changed how networking works, so it's a bit tough to get it all working again.
It's cool because it's a totally open source recreation of everything. It's got a server, a client, terrain generation, physics simulation, level editing, classic support... this is one of two really big projects I've undertaken. I'm also still working on MediaCrush [2][3], at least when my other half decides to show up and write some backend code. [1] https://github.com/SirCmpwn/Craft.Net [2] https://mediacru.sh [3] https://github.com/MediaCrush/MediaCrush
> Currently working on an open source implementation of Minecraft
Nice. Are you aiming to implement a thread-safe plugin API, perchance? The current problem with bukkit (and with vanilla minecraft server, of course) afaik is that whenever a plugin needs access to global state, it uses an API that does not do any locks of any sort; which means that usually, whenever one needs to e.g. write to global state, one dumps these critical parts onto the main thread. Solving this is nontrivial but rather important, I think.
It's just a library, so it doesn't handle plugins. However, the library is thread-safe, and the server [1] I wrote on top of the library supports plugins and is also thread safe. For anything dependent on a specific thread, there's generally a queue to push things into.
That sounds like a very nice and thought-through architecture/design.
What's your current status / how far away are you from a more or less complete beta (e.g. in regards to the minecraft client) (if you don't mind me asking)?
Well, the design has been through a few revisions. I'm not afraid to make breaking changes before version 1.0.0 (for example, I completely rewrote the level handling system to improve level editing performance by an order of magnitude).
The current status of the server is: * Full support for Minecraft 1.6.4 networking (1.7.x networking is a WIP) * Full support for editing Minecraft levels * Implementations of all Minecraft data types (i.e. slots, metadata dictionaries, NBT, etc) * Slightly buggy emulation of Minecraft physics * Simple procedural terrain generation Here's an incomplete list of things that aren't done: * Lots of block interactions (like water emulation, or falling sand) were done, but were lost during the refactoring I mentioned above * Redstone and all related logic * Mob AI (work in progress, not very far along) * More detailed world generation (missing ores, caves, biomes, villages) Aside from the server, there's also a mature classic networking library, and a fairly complete client library (no rendering). The project is more than a year old now and is built on top of code that's about three years old. It's a pretty big undertaking, and it's going to take a while to finish. It'll be done faster if I get more third party help, though!
Thanks for your detailed response. I see quite a few people are involved, and the project is a truly active one; I wish you luck. :)
One last inquiry: have you done any benchmarking / performance tests on your code? I imagine that since the library is thread-safe, it should in theory be able to handle significantly larger numbers of online users, etc.?
It's been a while since I've formally tested it, but it performs very well. I don't have hard numbers handy, but CPU usage and memory usage is both well-tuned (and better than vanilla/bukkit). I've tested with a few dozen concurrent players and it didn't have any trouble. All players reported smooth gameplay, far better than vanilla or bukkit.
Comments (761) 320 threads
Show all comments
Showing thread 10 of 320
It's cool because it's a totally open source recreation of everything. It's got a server, a client, terrain generation, physics simulation, level editing, classic support... this is one of two really big projects I've undertaken.
I'm also still working on MediaCrush [2][3], at least when my other half decides to show up and write some backend code.
[1] https://github.com/SirCmpwn/Craft.Net
[2] https://mediacru.sh
[3] https://github.com/MediaCrush/MediaCrush
Sweet! Looking forward to playing with this. :-)
Nice.
Are you aiming to implement a thread-safe plugin API, perchance? The current problem with bukkit (and with vanilla minecraft server, of course) afaik is that whenever a plugin needs access to global state, it uses an API that does not do any locks of any sort; which means that usually, whenever one needs to e.g. write to global state, one dumps these critical parts onto the main thread. Solving this is nontrivial but rather important, I think.
[1] https://github.com/SirCmpwn/PartyCraft
What's your current status / how far away are you from a more or less complete beta (e.g. in regards to the minecraft client) (if you don't mind me asking)?
The current status of the server is:
* Full support for Minecraft 1.6.4 networking (1.7.x networking is a WIP)
* Full support for editing Minecraft levels
* Implementations of all Minecraft data types (i.e. slots, metadata dictionaries, NBT, etc)
* Slightly buggy emulation of Minecraft physics
* Simple procedural terrain generation
Here's an incomplete list of things that aren't done:
* Lots of block interactions (like water emulation, or falling sand) were done, but were lost during the refactoring I mentioned above
* Redstone and all related logic
* Mob AI (work in progress, not very far along)
* More detailed world generation (missing ores, caves, biomes, villages)
Aside from the server, there's also a mature classic networking library, and a fairly complete client library (no rendering).
The project is more than a year old now and is built on top of code that's about three years old. It's a pretty big undertaking, and it's going to take a while to finish. It'll be done faster if I get more third party help, though!
One last inquiry: have you done any benchmarking / performance tests on your code? I imagine that since the library is thread-safe, it should in theory be able to handle significantly larger numbers of online users, etc.?