13 ms·
What are the odds that a language known for its use in boring enterprise software is the language used to create the most popular video game in history (Minecra
by jmartrican 6y ago
What are the odds that a language known for its use in boring enterprise software is the language used to create the most popular video game in history (Minecraft). If C++ was a person it would be mad/salty at this fact.
- guardian5x 6y agoYea probably, I doubt that Minecraft would've been any less succesful written in C++ or any other language though.
- akavi 6y agoI've heard that the relative ease of decompiling Java might have contributed significantly, since it made mods much easier than they would've been with C/C++.
- Eldt 6y agoI'm confident the community driven modding contributed to Minecraft's success in a massive way.
- hoseja 6y agoYeah, the game is almost source-available, thus almost infinitely moddable. Games that provide neat modding APIs (thinking Factorio, Rimworld) are, while commendable, inherently limited. If Minecraft were C++ you'd have to be able to recompile it yourself for equivalent moddability.
- blackrock 6y agoCould Minecraft have succeeded if it had a sub-level scripting language, like Lisp? The way that AutoCad uses it for its sub programming. Or the way Emacs uses Lisp for macro programming. Or did it need the full Java source code to re-mod the program?
- smabie 6y agoAutoCad and Emacs aren't really comparable in their use of Lisp. Emacs is essentially an Elisp interpreter with some features for buffer management, while AutoCad just uses Lisp as a traditional scripting toolkit. Emacs is built with Elisp, AutoCad is not.
- lispm 6y agoThe C code in GNU Emacs does a bit more than implementing a 'Lisp interpreter'. https://github.com/emacs-mirror/emacs/tree/master/src https://github.com/emacs-mirror/emacs/tree/master/src Quite a bit of the actual GNU Emacs application is using libraries written in C. See for example the font code. https://github.com/emacs-mirror/emacs/blob/master/src/font.c https://github.com/emacs-mirror/emacs/blob/master/src/font.c This is different from some other Lisp systems, where only the base language runtime contains some C and/or assembler, and the actual application is mostly written in Lisp using an FFI (foreign function interface) for library calls. For example the GUI of Clozure CL is written in Lisp using an Objective C bridge, and not directly in Objective C and then called from Lisp. Thus Emacs Lisp is also somewhere in a continuum of implementation and extension language - using C not only for the Emacs Lisp language runtime, but also for basic application implementation...
- 7786655 6y agoMinecraft isn't source available, it's just that people in the community have put a ton of effort into decompiling and deobfuscating it. Granted, this probably wouldn't have been possible if it were written in C++. (At least, this was how it was pre-Microsoft. I haven't followed it since then.)
- the_af 6y agoDepends. Success measured how? For the end user -- the players, that is -- it would likely make little difference. For the developer, it's very different. A game that doesn't get made at all is infinitely less successful than one that exists.
- Waterluvian 6y agoIt's a great reminder that the customer doesn't care about the code. What matters is the experience and overall fidelity of the product shipped. The language you pick, the quality of code you write, the comments and documentation, are all products (gifts) targeting your future self, future peers, and employer when it comes time to make changes to the software.
- nonbirithm 6y ago> the customer doesn't care about the code I'm not sure this applies as strongly in Minecraft's case specifically, because of the critical importance of its modding community to its wild success. Normally it wouldn't matter what language you pick in terms of how popular the game is going to become, except it just so happened that by choosing the JVM they gave the ability to the community to decompile the game and add the content they want. Maybe this wasn't intended and Notch chose Java because it was what he happened to know, but it's my belief that if Minecraft had been written in C++ instead then Mojang would not have the brand recognition it does today. Anecdotally one of my friends tried the RTX version of the game which was rewritten in C++, and his reaction amounted to "it's fine, but there's no mods, so it's irrelevant." And that's in spite of the fact that modded Minecraft is a minefield of incompatibilities between years old versions and can easily consume 10 gigabytes of RAM and millions of extraneous CPU cycles. Nobody cares, because at the end of the day modded Minecraft is the only way they can get the specific experience they want out of a video game, and the only reason this is possible at all, even if it will never be performant, is the JVM. But that's only because Minecraft is one of the most popular video games in history, and not the kind of thing that a developers for a game nowhere near as successful would worry about before gaining a sizeable audience. What good is a modding system if not many people want to use it? And depending on the game a mod system might not be as warranted, so in those cases the choice of language doesn't matter as much.
- deleted 6y ago[deleted]
- haecceity 6y agoC++ minecraft should have an SDK for mods
- the_af 6y agoAnd yet people here on HN have told me in recent threads, when discussing Java, that: - Java is not suitable for enterprise software (yes! Some people here actually believe that). - Java is not a good general purpose language (but Minecraft was written in Java. Or even better, the list of very varied apps from this article shows it's indeed a good general purpose language). What these people actually mean is "I don't like Java". Because Java hasn't been "hip" for years, this makes people claim all sorts of absurd things about it. Things that directly contradict known history.
- mumblemumble 6y agoI work in Java every day, and I agree it's been a huge success. But I also don't think it's a good general purpose language. It's absolutely full of warts and gotchas and ergonomic problems and questionable design decisions that even the people who made them have come to regret. But known history tells us that there is very little correlation between a language's success and how well-designed it is. Outside of software, too - I think the archetype for this phenomenon is probably VHS and Betamax.
- the_af 6y ago> It's absolutely full of warts and gotchas and ergonomic problems and questionable design decisions that even the people who made them have come to regret. And which general purpose language isn't?
- apta 6y ago> questionable design decisions that even the people who made them have come to regret. Such as?
- akhilcacharya 6y agoOf course, all of the new advancements have come in the Microsoft-built C++ version that runs an order of magnitude better (including like ray tracing and VR)
- pjmlp 6y agoAlthough C++ allows for better code optimizations, it isn't as if the team that took over later Java versions was doing anything great. Using classes to represent points and vertices instead of arrays, and allocating in hot paths, really?
- pjmlp 6y agoThe proven example that instead of spending endless hours discussing what languages are good for creating games, one should focus in creating them in first place. Incidentally C++ also had to fight against Assembly, C and Pascal for adoption among game developers, and the Playstation SDK was one of the contributors to change this.
- rH61W3epxeHMjg4 6y agoThe concurrently developed Minecraft Bedrock edition is written in c++. That is code base for Widnows 10 Edition, Pocket Edition, and current console versions of the game.
- geodel 6y agoWell that assumes lot of boring enterprise software is not written in C++.
- suyash 6y agoTensorFlow is written on top of C++, how boring is that, I think it's one of the coolest tech.
- mumblemumble 6y agoI'm pretty sure the most popular video game in history was implemented in TTL. (Though Java versions certainly exist, too.) It's also worth noting that Minecraft was originally implemented in Java, but, in order to get it running on consoles and mobile, they had to port it to C++. Which doesn't discount how much Java contributed to its early success. (Most importantly, I'm guessing, by making it even feasible in the first place for a single person to implement it in so little time.) But still, the big picture version of the Minecraft story does more to support than challenge the main reason why C++ is considered the language of choice for games development. Because, yes, Java got it off the ground, but it was only a couple years later that they had to port it to C++ in order to access a mass market.
- andonisus 6y agoThe Java version is still very popular due to its support for mods.
- mumblemumble 6y agoIt absolutely is, and it's my preferred version. But I think I remember seeing somewhere that the vast majority of unit sales were of versions that were written in C++. My guess is that, if it had stayed Java only, it would have still been extremely popular, especially by indie game standards, but would not have become quite such a global phenomenon.
- itronitron 6y agoThe C++ versions may drive new sales on additional consoles but measured by hours played I would expect that the Java version of Minecraft still dominates.
- fulafel 6y agoWhat's the game implemented in TTL?
- mumblemumble 6y ago
- deleted 6y ago[deleted]
- nyc640 6y ago> most popular video game in history * citation needed The most popular game by player count is CrossFire [1]. All I see is that Minecraft has the highest unit sales for a video game across all platforms, but Minecraft for consoles and mobile (which make up a majority of sales [2]) are written in C++. I would argue that Java would have been a limiting factor for Minecraft reaching its current levels of success given the fact that the PC gaming market is relatively small compared to the console and mobile gaming markets, and it would've been nearly impossible to port the Java edition to so many different platforms. [1] https://en.wikipedia.org/wiki/List_of_most-played_video_games_by_player_count https://en.wikipedia.org/wiki/List_of_most-played_video_game... [2] https://minecraft.gamepedia.com/Bedrock_Edition#Sales https://minecraft.gamepedia.com/Bedrock_Edition#Sales
- pjmlp 6y agoAnd to this day people keep complaining about the modding capabilities of Bedrock.
- nineteen999 6y ago> If C++ was a person it would be mad/salty at this fact. Are you serious? Wake us up when somebody implements something as complex and performant as UE4 in Java. Or even UE3 for that matter.