I Remade Minecraft But It's Optimized

714,674
560
Published 2023-08-19
In this devlog, I made a minecraft clone voxel game that runs fast in Java, that manages to get the same render distance that's available on the bedrock edition of minecraft (equivalent to a render distance of 96!).

Music used:
Minecraft Volume Alpha - 11 - Mice on Venus
Minecraft Volume Alpha - 14 - Clark

Useful resources:
LibGDX: libgdx.com/
Minecraft cave culling algorithm: https:// tomcc.github.io/2014/08/31/visibility-1.html

All Comments (21)
  • @suluntulu
    i would love to see what an optimized minecraft would look like, pair it with awesome terrain generation and the game could look beautiful since you could see so far
  • @TomahawkUnleashed
    i remember back in early minecraft, each block was an id from 0-255, 0 was air, 1 was grass, 42 was iron blocks etc... when you mentioned the byte array only having 256 blocks it reminded me. of that so maybe Notch used something like that originally? or maybe the block id was just a byte
  • @musikSkool
    It was originally optimized for computers made in 2010. My single core Athlon 3800+ was giving me 85 fps, back in 2011 Minecraft Java Edition. Since then it has gotten bloated. Today my 6 core, much faster computer, struggles to even give me 60 fps most of the time. Edit: Looking through all the tests done with the PassMark benchmark, I would estimate that each core in my new computer is around 6 times as fast as my single core Athlon 3800+, which gives it somewhere between 30 to 40 times the raw power of my older computer. But Minecraft Java lost quite a lot of performance as the years went by so I can't even maintain the same framerate I had before. Software optimization people, we need more of it.
  • @chewico3d133
    I think minecraft could have added a system to make far chunks render in lower datail, or voxel sizes bigger. It is dificult but could have added larger render distances.
  • @asfissiato6097
    opening this video I expected milions of wiews... Then i noticed, you deserve more buddy
  • @_m1ckey
    This is very impressive on its own, but Minecraft is a VERY complex game, with thousands of game mechanics. Blocks can have many different states than direction or water logging. Some like command blocks store much more information (up to 32767 chars) than provided by integers, or block entities like chests or barrels which contain tons of data. Other things like entities, collisions, physics, dynamic textures, particles, and game features drastically decrease performance. This is why the game doesn’t run very well without optimization mods like Optifine or Sodium.
  • @warfox
    I wish you did a series “Minecraft recreation but better” you seem like a great teacher I would love to see it from start to end
  • Sodium, Lithium, Phosphor and Ferrite Core, all Fabric mods, greatly optimize Minecraft, but what you did here is crazy! Good job!
  • @Jake28
    1:58 - In minecraft, chunks are generally stored as flat arrays like described, but rather than storing block ids directly, they store indexes into a 'palette' of blocks which is stored per chunk. This means that the limit for how many unique blocks you can store in a chunk isn't tied to the amount of blocks in the game, but rather the amount of unique block types in that chunk. The length of each index is the amount of bits required to store the largest index in the palette, with a minimum of four bits. That means that chunks with small amounts of unique blocks only have to use four bits per index, but it's also still possible to have every block in a chunk as a unique block if needed. You should check the minecraft wiki's article on the 'Chunk Format' for more details. 5:10 - The palette system also handles blockstates!
  • Very technical! I thought at first the mountains were glitching out and it took me a moment to realize that it's rendering everything from that far away! Liked!
  • @caleron6945
    I love what you're doing with this project so far! I very much agree that Minecraft lost much of its charm post-Beta. I've honestly thought about this a lot over the past decade. I've come to the conclusion that the loss of charm is from 3 main sources: 1 - the world generation is simply less engaging 2 - the old glitchy quirks that once defined the game for me have been removed 3 - the game has become increasingly less focused around survival The biggest loss of charm for me is the terrain generation. Sure, biomes are larger, more various, and better defined, but they're super same-y. You see one mushroom island, you've seen them all. Every forest is the same. Every swamp is the same ugly scourge on the landscape. I really can't put it into words, but the beta terrain generation had this quality that made the world feel warmer, more inviting, more interesting, and consequently more inspiring. Beta caves were manageable. You'd pop in and out in 10 minutes normally. Rarely you'd find a few caves that collided and you'd be there for a day or two at most. Today's caves just literally never end. It's such a chore to try to explore all of them. I've had friends that never played back in the beta days who watched videos of beta-terrain worlds or who played with mod packs that reintroduced beta generation as biomes and pretty much all of them have preferred those worlds to the worlds we have now. Today's Minecraft feels cold and barren to me the majority of the time, and I'm not quite sure if it's the color palettes, the shapes of the topography, or something else, but it's definitely less inviting and makes me want to stick around less. Glitchy quirks like minecart boosters and boat-avators used to define the game for me. They were clever, unintended uses of intended mechanics that were very rewarding and gave the game this significant charm for me. Boats always rise to be at the top of the water? Then just create a waterfall in a place where you want to go up and drive a boat into it to reach super speed. Minecarts don't like colliding with each other and repel one another? Then use gravity and track placement to force 2 carts together and make the one you're riding in rocket off into the horizon. There were so many unintended possibilities from simple rulesets. Exploring the possibilities felt rewarding. Today, it feels like every element of the game is thoroughly tested and sterilized to prevent unintended behavior, and whenever unintended behavior crops up, it gets promptly removed in the next update. We're forced to play the way Mojang/Microsoft wants us to, rather than to play in the sandbox that the game used to be. There are whole video essays talking about the loss of Minecraft's survival elements, but my major gripe is that everything the game had added in the past decade has diminished the challenge of the survival experience, consequently making it not feel like "survival" at all for me. Without challenge, you're just existing, and that's not engaging. If I wanted to just exist and build infinitely, I'd play in creative mode. Some of today's mechanics, like phantoms spawning if you don't sleep, actively push you away from the challenges of the game. You have to sleep through the night and miss all the fights you might've had so that you don't get endlessly harassed the next day. Villages have made survival basically free. Sure they can get attacked occasionally, but generally that's not a huge threat especially if there are a lot of golems around. One "recent" element that actually made survival harder was the addition of snow you could fall into and freeze from, but it can only happen in specific, out-of-the-way areas so if you know you're going to those places, you'll probably grab the boots that makes you immune to it before you leave. If it was quicksand that could happen anywhere, at any time, then you'd actually have to be prepared for it, but the mechanic has been relegated to such a specific uncommon place that it's very unthreatening. Minecraft used to be my favorite game, but that definitely changed when Microsoft bought them in 2014. It's just never quite had the same vibe since then, but even then it still didn't have the same vibe it did before the 1.0 release. Thanks for giving me a chance to reminisce.
  • @alecstobbs2523
    I appreciate how quickly you cover so many very useful techniques. I look forward to these videos being great introductions to optimization methods that I can further research myself.
  • @federicoumilio878
    This has the potential of becoming a very informative and fun project! Please, keep uploading this type of content.
  • @ultimus616
    Will be following along, as someone who works a lot with mods some of MC's limitations become... quite clear. Further on, I would be interested in seeing how you can make this not only a better vanilla MC, but also better for implementation of mods from the community!
  • @Enphixo
    Would love to see this project grown into something big. I want to support this as much as I can. Good luck dude >:)
  • @johnpaulcross424
    Love how you broke everything down so logically and concisely, I’d love to see what else you plan on making!
  • @toblobs
    This video was somehow very informative even for not-so-technical people, amazing work!
  • @lukenerdy
    Java Mc has had such a big performance issue for so many years that I think a lot of people would gladly lose out on new items and etc if It meant better performance for the base game. For me its crazy how to run modern java well you have to modded it before even loading into a singleplayer world. Great video though very nice to get idea on how things could be different given good performance
  • @NobodyCentral
    I think it would be awesome for a game like that to have an officially supported way to mod the game, as well as making the game itself open source (with or without a license) to understand the inner workings of it more. Cool project man, keep it up!
  • @nan0wav
    this is awesome!! one thing i wish minecraft has done is lean more into the fear of the unknown and the uneasy loneliness present in the earlier versions of the game. i would love to see some elements that play into these feelings