4 ms·
I'm not a programmer so forgive my armchair ignorance, but as a player I've found Minetest to run exceptionally smoothly even on 10+ year old hardware with crap
by morganvachon 10y ago
I'm not a programmer so forgive my armchair ignorance, but as a player I've found Minetest to run exceptionally smoothly even on 10+ year old hardware with crappy integrated video. On the other hand, Minecraft on a modernish Haswell based PC with a GTX 960 requires Optifine to run as smoothly as Minetest does on that ancient machine.
"(B)ig hairy ball of C++" or not, somehow it's optimized to the point that it feels more modern and advanced than Minecraft, if not as visually polished. My question is, is this purely a C++ vs Java thing? I've played some Java games that look and play awesome on older hardware so I have to wonder what the deal is with Minecraft.
- exception_e 10y agoThe poster was commenting on the maintainability of the C++ code. Unfortunately, poorly written/structured code can still be as performant as well designed code. As for your C++ vs Java question... put very simply, C++ will be faster than languages like Java when it comes to graphics and any software that is close to the hardware.
- morganvachon 10y agoThat's what I figured on both accounts. I guess I'm just bothered by the obvious inefficiency of Minecraft versus practically any other Java game I've played. Even other Java-based voxel games have far better performance.
- exception_e 10y agoInteresting aside: I just installed/ran Minetest and then compared it to Minecraft and Minecraft feels/looks a lot smoother on my basic HP laptop.
- fail2fail2ban 10y agoYou had better back that claim up. I've seen slow Assembly programs; operating close to the hardware is not a guarantee of better performance.
- exception_e 10y agoI was keeping it high level because the person asking the question is a non-programmer. To your point though, I should have prefixed "correctly written" in front of C++.
- morganvachon 10y ago> I was keeping it high level because the person asking the question is a non-programmer. Well, I should have been more accurate: I'm not a programmer by trade, but I do understand the basic concepts of computer programming, and I've dabbled with both high level and low level languages. I've even done some assembly programming in the distant past, about 20 years ago, just to learn it, as well as a stint with SQL/400 on the AS/400 about 14 years ago. But these days the closest I come is bash scripting or dabbling in Python or Lua. I've never messed with C/C++ or Java though, hence my questions directed at those languages. All that said, I do appreciate your response!
- RandyRanderson 10y agoSomeone said "technology1 is faster than technology2" everyone drinks!
- zigzigzag 10y agoThe original Minecraft versions had reasonable performance for a one-man app that was more about experimentation, because Notch wrote his code in a way that didn't put too much pressure on the GC. For instance block coordinates were passed as individual x,y,z arguments to each function. When Notch passed on maintainership of the code, he apparently didn't pass on his knowledge of how far you can push the JVM, and the new developers proceeded to "modernise" the code, by, for example, introducing a Point class. The amount of garbage Minecraft made went up very quickly as a result and it got slower. There were a bunch of other glaring problems ... the fact that Optifine is able to improve it so much shows, I think, that the developers didn't fully understand Java performance.
- fail2fail2ban 10y agoYou're comparing today's Minecraft with all the bells and whistles to Minetest. The original comment about trying to extend it in C++ compared to Java is perfectly valid. It's why Java rose to power and remains. It's why it takes so long to roll out new features in the Windows 10 Minecraft client (which is basically the PE client).
- Sylos 10y agoIt's not purely a C++ vs. Java thing. Minecraft was simply never intended to be this big of a game. It was initially designed to be really just a game where you place blocks on other blocks. The Survival-mode, fighting against monsters etc., that was all gradually glued onto an architecture which wasn't intended for it. One example that I happen to know, is that they never intended to have all these effects like smoke, water drops, the swirls from drinking a potion. All of this was pretty much just a hack for the longest time with no real place for it in the architecture. Eventually they fixed that and added it to the architecture, and could improve effects-performance massively with that, but there's probably still loads of things like that in the game. Another big part of this is that Minecraft generates and loads its map in 2-dimensional chunks, or pillars if you will. So, when you move through the world, it always has to load in and keep loaded the entire height of the map, no matter if you're scraping along the clouds or if you're deep underground. If you're traveling into new terrain, it has to generate the entire height all at once, as well. Minetest instead uses 3-dimensional chunks, i.e. cubes, and can just load/generate those freely how it needs them. So, if you're standing on a mountain and look down, it loads all visible chunks, but can just leave out those which are underground. Or if you're underground yourself, it can leave out really pretty much just all chunks altogether, except for the few which are directly around you. This also has the effect that Minetest-maps can be unlimited in height, whereas Minecraft-maps need to be limited (currently 256 blocks; it started out at 128 blocks), as otherwise Minecraft would really just need infinite RAM and never get done with generating the map.