536 points · by aw1621107 · 8y ago · 137 comments
[1] http://web.archive.org/web/20110920065648/http://www.minecra...
[1]: https://www.google.com/amp/s/wccftech.com/minecraft-sales-14...
I ended up buying the game on the 360, PC and Android over the years (though I think I only paid something like 10p for the Android version during a sale or Google Offer). Yeah it’s a pixel game, yes it’s Java, yes it can run like shit, yes it’s a sandbox game with no real objective. But it’s surprisingly relaxing. I’ve lost count of the amount of hours I’ve spend just building.
I bought it when it was $7, way back in the alpha days. I bought it because I was excited by the idea. I'd still pay $30 for it today, if I didn't already own it, because I still love the idea.
Maybe that's the thing.
Microsoft followed through where Notch couldn't. How about that...
But this isn't the full source code.
If I can indulge in some self-promotion, I have written mountains of code which implements many of Minecraft's behaviors down to the last detail, which may be a more interesting candidate for study:
https://github.com/sircmpwn/truecraft
Seeing Balze3D open-sourced might end up being pretty cool, though.
Sometimes I see people and wonder which of these two things is true:
1. They have no idea what the average developer actually is.
2. They are lying to make it sound like they were elite when they were a freshman in college.
> 1. They have no idea what the average developer actually is.
> 2. They are lying to make it sound like they were elite when they were a freshman in college.
Concerning 1: they might really be living in some kind of filter bubble of really smart people. Smart people often attract and are surrounded by smart people.
I went through a few repos and the result was a weirdly consistent 30-45 LOC(sans tests) daily for a 2-3 person team - at least on the front-end.
Since then I'm sceptical of opinions saying that a 1500 LOC+ project could be put together "within a weekend".
Not saying it doesn't happen, but good projects of this sort have to be rare.
By the way, excellent work on Sway. I've been meaning to jump to i3 forever, and decided to move to Wayland on my most recent install. I do have some bug reports to send your way, though, I should get on that.
An above average freshman at an above average university can probably make Sudoku, Tetris or Brick breaker.
Even the smartest students probably won't be able to make.minecraft in a weekend. Maybe as a semester long project. But not a weekend.
/endrant
https://github.com/Mojang/DataFixerUpper/blob/master/src/mai...
A reasonably large tested and complete library is not a project for a few weekends but I think profunctor optics in Java actually is. And much more suitable for a xs freshman than a typical Java programmer.
Looks like nobody properly understood it yet, if it's so hard to explain what it even is.
If they release their game engine, however, that's a different story...
It is an interesting case study. The code has failed to run for myself and the five other people i handed the project to with different configs. There are no tests that validate the project works. Its certainly work to be proud of, insofar as maybe its worked for some subset of people in the past.
Edit: I was excited to work on this code and spent a healthy amount of time reading through all of it to find great places to contribute. After writing a small pr, mostly a throwaway to test the waters, I was greeted with unmitigated assholery by the main devoper and their irc crew. I kept the logs from an irc conversation i had about the pr as a reminder of how not to act towards developers on projects i work on.
There are tests, though, but they only focus on the parts which are fragile or complicated:
https://github.com/SirCmpwn/TrueCraft/tree/master/TrueCraft....
Edit: oh, I think I remember you. If I'm right, here's your pull request and the corresponding IRC logs:
Blatant and rude sarcasm: you dont need to answer because a freshman cs student would know the answer.
So sad that it's like average second year in my school's curriculum.
I would be interested in the syllabus that building a 1:1 minecraft would teach.
So for example, "Minecraft creates the same world each time from a fixed X Byte salt, and uses these well known algorithms for generative landscape production"
No unit tests in sight? Sounds about right.
Apparently more libraries are in the pipeline to be open-sourced alone these two. One possibility is Blaze3D, which is a rewrite of the rendering engine that is planned on being included in Minecraft 1.14.
[0]: https://github.com/Mojang/brigadier
[1]: https://github.com/Mojang/DataFixerUpperhttps://github.com/Mojang/DataFixerUpper/tree/8b5f82ab78b30f...
Profunctors, lenses, prisms, traversals… all there :)
https://github.com/Mojang/DataFixerUpper/blob/8b5f82ab78b30f...
Is that understandable to you? And does this really make solving some problems easier?
I've dabbled a bit in Haskell, but never got further than functors, applicatives and monads, and I always wonder whether this kind of stuff really helps.
(It probably doesn't help that Java is very verbose, especially compared to Haskell...)
But yeah, you'd have to weigh that up against how ugly it turns out to be in Java. It's not just because of the verbosity, it's the lack of being able to abstract over type-level functions that makes it quite icky to implement these abstractions in Java.
Of course using lens in Java is going to have compromises and nothing is going to beat Haskell in readability for this kind of programs. As you pointed out, Java is verbose and that hurts the readability a lot.
> And does this really make solving some problems easier?
Whether this makes solving problems easier, I would say in Haskell, I routing compose half a dozen of optics to do a fold or update and it really makes things easier. I haven't read this Java version so I don't know whether the power-to-weight ratio here is similar.
The project was joined by more and more contributers and has become really impressive!
Minecraft-like games are not really my thing but I recommend it to most people mentioning Minecraft :)
Lots of things conspired to make that not happen, undoubtably including feature creep (because it was going to be the official mod api, it had to be correct not just good), but it finally looks like they're moving in that direction.
All of the mods were based on 1.7.10, which is pretty far back, looks like 1.13.1 is the latest.
There are still a lot of young people playing minecraft PvP, particularly outside the US. But you could tell even then that Fortnite was eating up younger players.
What I was implying is that a third party deobfuscation project by reverse engineering with minimal input from the original developers would presumably be different in terms of variable/function names, etc, comparing it to the original source.
Boggles my mind that someone would engineer something so sophisticated and not write even a high-level test script of some kind.
It going wrong can mean crippled data!
I am certain /some/ code must exist to allow the authors to verify it does what they want so my question is more: where is it?
(Which, as a teacher, I am finding a fantastic tool for both introductory programming and other topics)
Why would I use their game library when they ship such incredibly broken updates?