3 ms·
It's probably worth noting that Minecraft has an incredibly lackadaisical approach to Java and Java upgrades in general. They're still on Java 8 and thinking ma
by thu2111 6y ago
It's probably worth noting that Minecraft has an incredibly lackadaisical approach to Java and Java upgrades in general. They're still on Java 8 and thinking maybe about upgrading to Java 11 at some point, although the performance benefits of going to the latest versions are really quite enormous in almost any benchmark.
There's an additional problem: when Notch first wrote it, he had some experience of doing games on the JVM and wrote the code in a performance sensitive style. But it wasn't a fully OOP style that people associate with clean, well designed codebases, so when Notch moved on, they immediately went and introduced tons of tiny classes for things like points or vectors where the prior code simply passed the components as parameters. That trashed performance. Again, newer JVMs are better at gobbling this stuff up, but it didn't help. Valhalla will eventually remove this tradeoff.
At any rate, Minecraft is a very good example of why more people should target the JVM for video games: modding is real, it can create communities that propel your game further than ever. It's not a great example of how to get the best possible game performance from the JVM. At all.