Making Minecraft 100x faster (by rewriting it in Rust)

  Рет қаралды 158,151

Theo - t3․gg

Theo - t3․gg

Күн бұрын

Пікірлер
@montytrollic
@montytrollic 2 ай бұрын
5:42 The reason why light gets recalculated on the server is due to logic tied to spawning mobs in dark places and so on.
@bruhrain
@bruhrain 2 ай бұрын
I was going to say this, but you beat me to it lol
@comradical
@comradical 2 ай бұрын
I was also going to say that saying "the way lighting works in Minecraft is server-side" is a bit misleading. While there are certainly lighting calculations done server-side, these are necessary for light-level mechanics, Minecraft Client does its own lighting, and yes, this can cause a difference between what server thinks the lighting level is and what client think lighting level is. And abusing this server-side lighting implementation is how we build, or at least used to build, machines to suppress lighting updates, at least prior to some recent versions, to build things that the server thinks are unlit, while we are using portal blocks that technically generate light, that are not covered, so should be affected by day/night, but aren't... In fact, server-side light queue is how the most efficient (or boring) generalized mob farms worked: perimeter, remove bedrock, place obsidian at the lowest level, build a roof, build up a massive light update queue, update suppress slice portals in the spawn radius (or usually smaller radius, because it spawns too many mobs to handle), remove the roof, do all that before light update queue catches up, crash the server to clear up light queue. Voila, most efficient mob spawning with near instant mob removal from the overworld. The actual difficult part was to not void the mobs immediately and build a killing and collection system capable of handling the ridiculous amount of mobs coming through.
@StephanieHallberg
@StephanieHallberg 2 ай бұрын
we cant BENCHMARK minecraft mods ... as we have NO Minecraft apart from the Java version. We have people adding minecraft-variants blocks in a very very small replica of the very very shell of minecraft. We don't know how anything works in minecraft. its magic, and probably not possible to replicate in rust at all ^.^
@bruhrain
@bruhrain 2 ай бұрын
@@StephanieHallberg Decompilers exist, you can decompile minecraft which will generate source code from Java Bytecode, although it isn‘t near perfect, you can still get a good understanding of how it works.
@__Brandon__
@__Brandon__ 2 ай бұрын
@@StephanieHallberg for versions a couple years old we have a pretty good understanding of what is going on
@nicolaska1761
@nicolaska1761 2 ай бұрын
Yes the benchmarks shows a 20x perf gap, but if the 3 most demanding tasks are not currently available this benchmark means nothing
@TOZA
@TOZA 2 ай бұрын
i agree with you, but even if server isnt doing anything and there is single afk player (on java edition; clean
@_-_o-o_-_
@_-_o-o_-_ 2 ай бұрын
My Rust Minecraft server is thousands of times more performant than the official implementation. Sure, it only outputs "Hello, World", but it's a start.
@drewgazelka
@drewgazelka 2 ай бұрын
I am the developer of Hyperion (one of the servers shown in this video), and I absolutely agree with you. I think the big advantage for Rust servers is having minigames/events that do not require a bunch of features but instead a bunch of performance. This is what I am trying to do to break the PvP world record.
@Kane0123
@Kane0123 2 ай бұрын
I still take the same time to build a square mud house...
@Aoredon
@Aoredon 2 ай бұрын
Who cares? You have to be dumb to not understand that Minecraft would be more efficient and performant in Rust.
@desLunes
@desLunes 2 ай бұрын
You know someone is a true minecraft player when he says "Bedrock is a completely different game". Couldn't be better phrased.
@rooodis456
@rooodis456 Ай бұрын
I guess my 2.5 year long covid world wasn't actually Minecraft then
@a.r.9689
@a.r.9689 Ай бұрын
@@rooodis456 i guess so too
@davidscann
@davidscann Ай бұрын
it depends on how you look at it the way I see it, it's like Microsoft's attempt of a remake for Minecraft, the original being the Java version ...which is kinda what it is, I guess
@desLunes
@desLunes Ай бұрын
@@davidscann Nah minecraft is a community-driven game. Around 2016 Mojang didn't update minecraft for a long time, we didn't have new updates which means no new content AND game optimization. The community filled that gap with texture pack (which minecraft later implemented in the game but was a community invention), mods and maps. When you play minecraft, you install either Optifine or Sodium to get better performance, texture packs or shaders for better graphics, and mods for additional content. When Bedrock came out, Microsoft didn't provide APIs for the community to make additional content. Later on, they opened the Marketplace which is basically selling open source mods' ideas, texture packs, and maps that are made on Java with Spigot plugins which are made by the community. Bedrock is just Microsoft's attempt to make money from the community's work.
@lmfao607
@lmfao607 Ай бұрын
​@@davidscannmicrosoft's attempt?? Nigga bedrock or formerly pocket had been around before microsoft bought it
@David-gj6dc
@David-gj6dc 2 ай бұрын
Lights are server side because it decides whether mobs can spawn there are not, so actually not that crazy.
@zperk13
@zperk13 2 ай бұрын
exactly! and it's not like it's fancy raytracing or anything that would be very expensive to run
@tigerboy4705
@tigerboy4705 2 ай бұрын
​@zperk13 I mean, its not raytracing .. but it still rather expensive iirc
@DotNetGuy-k9u
@DotNetGuy-k9u 2 ай бұрын
@@tigerboy4705 Minecraft lighting is computed via a flood-fill algorithm that propagates from the highest block point, down to the lowest block point unless stopped by an opaque block. This is a very expensive algorithm, hence why Pumpkin's performance is not very impressive considering they don't do this step.
@qualia765
@qualia765 2 ай бұрын
and plant growth
@tigerboy4705
@tigerboy4705 2 ай бұрын
@@DotNetGuy-k9u yeah exactly this! Forgot what exactly they used, tho I have seen some pretty impressive mods that cut down on this
@Meiallu
@Meiallu 2 ай бұрын
It's not actually that impressive, there is NOTHING hapenning, most of it is being used for world generation, and there is basically no world hapenning, no light (which is expensive as fuck, and also, theo, mobs depend on light so it does need to be calculated on the server) no saving, no nothing, it's just the player and a extremely basic world, for something like this i'd actually expect better performance, really, not really fair to compare that to paper, vanilla, etc.
@seannewell397
@seannewell397 2 ай бұрын
idk, that the vanilla client launcher can connect to it is insane imho. Iterating to add features now has a benchmark and floor/ceiling to aim for to be competitive.
@Meiallu
@Meiallu 2 ай бұрын
@seannewell397, I mean, it’s all done with packets and streams. If you know the data types, structure, and everything, you can do it. Minecraft is the most popular game in the world, and the whole protocol is available at wiki.vg. It’s still pretty impressive-the protocol is a pain, but if done right, it will be faster simply because it’s in Rust. However, I don’t think it’s fair to compare it to other things right now.
@tacokoneko
@tacokoneko 2 ай бұрын
as a minecraft veteran since 2010 who likes java, bedrock and minetest and is familiar with writing mods in java, data pack, c and c++, theo made a few missteps in this video, for example bedrock's client actually _is_ faster than java on slow embedded systems by a medium amount of frames, and most of the subtle behavior differences could definitely be considered "intentional differences" since in many cases it's difficult to argue that the java version's behavior isn't the "bug" rather than bedrock's, for example the Quasi-connectivity property of redstone in java is not present in bedrock, since in java it was originally an unintended edge case that was left in permanently to avoid breaking existing circuits.
@__Brandon__
@__Brandon__ 2 ай бұрын
@@Meiallu writing data to the disk and world Gen can both be done on another thread and aren't apart of the main event loop, I think it's fine. Same with lighting, it can be done on another thread just like it's done in the official server. The real question is will it scale when mobs are added, because all player and mob interactions are single threaded and that is why the official client hogs so many resources. Everything else isn't really that important when comparing servers except maybe redstone, but that's been shown to be fixable if you allow some breaking changes
@Meiallu
@Meiallu Ай бұрын
@Brandon The number of players on the server is crucial, and sometimes even more important than world generation. Even if you offload tasks like world generation, light calculation, and other processes to separate threads, it doesn’t change my point. While it may not lag like a single-threaded vanilla setup, it will still consume a lot of resources unnecessarily. Many people assume that just using Rust solves everything, but that’s not the case.
@StefanErwinBaumer
@StefanErwinBaumer 2 ай бұрын
I mean yea this isn't using many resources, but there's *so much* that this isn't doing, so while this is a neat project, it doesn't say much about the performance of any of the technologies involved also on RAM use: when you see the empty server RAM use, you need to account for the fact that the JVM preallocates a bunch of empty heap space, so it'll be vastly bigger on an empty server, but gain almost no RAM use when the first player joins
@Kitulous
@Kitulous 2 ай бұрын
yeah, it's like I made a programming language that was faster than any other programming language but it was only faster because it didn't have any features.
@Argosh
@Argosh Ай бұрын
​@@Kitulousmy programming language is faster than C! OK, it only consists of NOP, but it's compiled instantly and runs on any architecture!
@Adowrath
@Adowrath 2 ай бұрын
The reason Lighting is server-side is because it isn't just visual, it has gameplay effects - mob spawning and crops growing/breaking are the two major ones. You can't offload that to the client(s).
@partykid4
@partykid4 2 ай бұрын
The main problem for Minecraft servers isn't the RAM usage, it's actually CPU usage. The base game is still single-threaded, so the vanilla server and it's modded forms (Spigot/Paper/Sponge/Forge/Fabric) are all also still largely single-threaded. As Mojang has added stuff to the game, the demand on servers has outpaced the improvement in single-threaded performance of new CPUs, meaning servers can hold less and less people with every update. The solution to this of course, is to multi-thread it. However, as you pointed out in your video, with how much stuff actually runs on the server that's no small feat. Modding the base server to be multi-threaded is basically impossible (there is actually a project called Folia that is **kind of** doing this, and has had great success, but isn't ideal and causes a lot of issues), so the only real choice is a complete rewrite. I personally do not think we'll ever see a feature-complete rewrite of the server, at least not from the community. It's just too much work, and with the increasing frequency of updates maintaining it long term would be next to impossible.
@juxuanu
@juxuanu 2 ай бұрын
One can only hope all community efforts consolidate into one project, and at some point Microsoft starts contributing to it.
@callowaysutton
@callowaysutton 2 ай бұрын
MC servers haven't been primarily single threaded in years. Spin up a modern Paper instance and you're going to see it eat at 4-10 cores. Also check out MultiPaper which horizontally scales MC
@isaac10231
@isaac10231 2 ай бұрын
If there's one group of nerds I would not ever doubt it's the capability of Minecraft devs. They've done insane things over the years.
@cotneit
@cotneit 2 ай бұрын
Pretty sure that's not entirely the case because Minecraft had no issues using 100% of my 12700k. World gen (especially modded world gen) is basically a CPU stress test
@Varadiio
@Varadiio 2 ай бұрын
At what point do people just replicate Minecraft's features in a newer engine? Would it be more work to rebuild its systems for multi-threading, or replicate the outward appearance of Minecraft with a language intended for multi-threading?
@BrittonWinterrose
@BrittonWinterrose 2 ай бұрын
Dude, thank you for making this video. Buddy is going to love it. He loves anything Minecraft. he’s going to remember all these facts and take them to school to make friends because all the kids talk about is Minecraft. it’s the digital LEGO; parents see it as engineering expression. Kids love it because it’s a canvas of expression. But he’s also going to learn lighting is hard, and that he will appreciate that kind of stuff in video games. He’s going to want to dive deeper in computer science and build his own server. And the friends he makes with the things he’s learned… they’ll be smart friends. vids like these activate his interests x intelligence x desire to succeed socially all at the same time. and the red stone video idea sounds like a good one too
@samuelhulme8347
@samuelhulme8347 2 ай бұрын
There is a Java library for creating custom Minecraft servers without the features from the Vanilla Minecraft it has multithreading and gives you full control of the server. It’s called Minestom. Very useful for minigame servers that don’t want all the vanilla features. Edit: he did briefly show their website.
@magical_whale
@magical_whale 2 ай бұрын
BREAKING NEWS: vanilla Minecraft server outperformed by re implementation that does basically nothing Dont get me wrong, the re implementations (pumpkin and minestom) really help bring more efficient servers. But they can't and never will replace vanilla minecraft servers, solely because its just too difficult, you can get close, but it will never be exact. Minestom for example is being use more for minigames and specific things that do not rely on vanilla behaviour that much.
@ThylineTheGay
@ThylineTheGay 2 ай бұрын
yeah, even though minecraft's source code is pretty much public, it's a game with so many quirks and niche mechanics/bugs/features, and you'd have to port them all over without breaking things, but while still improving performance rust is sure cool, but it's not _magic,_ and i think people do underestimate how well languages like java can perform
@GabrielM01
@GabrielM01 2 ай бұрын
if its so hard why does papermc exists?
@magical_whale
@magical_whale 2 ай бұрын
@@GabrielM01 because papermc is based on spigot, which is based on bukkit, which is based on the vanilla minecraft server. They all try to extend the vanilla server (or improve performance) but they always had the base server already implemented for them
@GabrielM01
@GabrielM01 2 ай бұрын
@@magical_whale okay, then why is bukkit ever made? you can fork the vanilla server, they reverse engineered it, just like the rust guys can/will do
@magical_whale
@magical_whale 2 ай бұрын
@@GabrielM01 im not 100% on the mc server history, but bukkit (CraftBukkit) was made for more optimization and running bukkit plugins by decompiling the vanilla server, injecting their own code and recompiling it again. Allowing for more customization. The rust guys cant just take the vanilla server and build upon that, because a vanilla minecraft server in rust simply does not exist Bukkit had the ability to build upon the vanilla server, the rust guys cant
@BryanLu0
@BryanLu0 2 ай бұрын
6:40 Mojang has been releasing deobfuscation maps for 5 years now, although it's not everything (e.g. function arguments) it's definitely enough for deobfuscation
@BryanLu0
@BryanLu0 2 ай бұрын
11:29 ??? Even if the server code wasn't well understood, redstone and command blocks are very well understood
@Kitulous
@Kitulous 2 ай бұрын
why obfuscate the code at all if you're going to release deobfuscation maps anyways?
@BryanLu0
@BryanLu0 2 ай бұрын
@@Kitulous It's standard practice, and reduces the file size.
@BryanLu0
@BryanLu0 2 ай бұрын
@Testvvjnb-ci3zl I would think that Mojang tries to optimize their code the best they can
@nnnik3595
@nnnik3595 Ай бұрын
@@BryanLu0 No they aren't we still discover new features in pistons and hoppers for example. 2No2Name took 2 years to make optimized hopper mechanics in the lithium mod and it's 100k LoC iirc
@larko2933
@larko2933 2 ай бұрын
I mean there is literally nothing happening, no light calculation, no chunk generation, no chunk saving etc.. The benchmarks mean nothing and using pumpkin as a reference point for rust based implementation is kinda disrespectful for other implementations that actually got farther ahead..
@andrewk2756
@andrewk2756 2 ай бұрын
>9:58 I'm impressed, it's running and it's running well >% CPU: 105 >???
@belliel42
@belliel42 2 ай бұрын
100 = 1 core
@andrewk2756
@andrewk2756 2 ай бұрын
@@belliel42 okay, didn't know that, looks weird to me.
@lorenzo42p
@lorenzo42p Ай бұрын
it's funny how right you are
@andrewgazelka
@andrewgazelka 2 ай бұрын
I am the developer of Hyperion. Thank you for showing my hard work :)
@sebirocs
@sebirocs Ай бұрын
Thank you for your hard work
@Krzysiekoy
@Krzysiekoy 2 ай бұрын
5:43 - not sure what you are sigh-ing about . This makes perfect sense given how the game works.
@Varadiio
@Varadiio 2 ай бұрын
I think it's also just the state being updated (simplistic py mockup below): # Some function would measure distance from light source in blocks and if
@nnnik3595
@nnnik3595 Ай бұрын
@@Varadiio They do raycasts for most of the physics now but other than that it's a flood fill algorythm.
@HyperCodec
@HyperCodec Ай бұрын
The Minecraft in Minecraft thing is even more impressive when you realize they didn’t use a single command block to accomplish it
@untitledgoose5526
@untitledgoose5526 2 ай бұрын
another buggy minecraft version on the way
@gorak9000
@gorak9000 2 ай бұрын
It's like standards? The greatest thing is how many there are?
@panzerofthelake4460
@panzerofthelake4460 2 ай бұрын
if Bemis - > Benis then then Pemis - > ???
@jonnyso1
@jonnyso1 2 ай бұрын
Considering its Rust, likely its another slightly less buggy minecraft version.
@white_145
@white_145 2 ай бұрын
C++ version of minecraft is that way because of negligence. There are countless of problems that are so stupidly easy to fix and yet devs brush it off because "its happening 65k blocks away from spawn so no mobile player would go there". Pretty sure even with a small team *complete* version of the game will be easy to keep bugless
@NighttimeJuneau
@NighttimeJuneau 2 ай бұрын
From my experience profiling a Fabric server, the heaviest parts besides world generation is entity and block ticking and the spawn system. A server that only has to run an immutable world, no block placement, updates, breaking, no entities, no spawns, no pathfinding and mob AI, yup, I bet it's gonna run smoothly. More seriously, mod support is the beating heart of Minecraft. Trying to establish a whole new platform that *all* mods would have to be rewritten for *in Rust*, yeah. Funny that Sammyuri's Minecraft in Minecraft project actually has more features right now.
@teakivy
@teakivy Ай бұрын
It is difficult to establish a new standard, but definitely possible! Fabric itself is relatively new, and yet now it’s arguably more popular than forge. Granted it is a lot easier to port an existing mod to fabric than it would be to port it to rust
@lorenzo42p
@lorenzo42p Ай бұрын
@@teakivy it's a lot easier to do anything at all in java than it is in rust. don't get me wrong, I am a fan of rust, but we cannot expect modding communities to pick up rust as easily as they have java. minecraft brought a lot of people into java programming, who would otherwise never touch programming. I've been programming for 30 years, but minecraft still introduced me to java.
@BryanLu0
@BryanLu0 2 ай бұрын
The server basically runs all the game logic, so it's not surprising that main game mechanics like lighting would be server side. 6:25
@sirdespin
@sirdespin 2 ай бұрын
Specially when lightning determines what mobs spawn
@rokasbarasa1
@rokasbarasa1 2 ай бұрын
I like how we all in the Rust community gravitated to minecraft for coding challenges. I myself have remade a simple minecraft single player in Rust.
@skellious
@skellious 2 ай бұрын
Gotta make your redstone computer faster. Can't speed up the Redstone? Rewrite the universe!!
@Wilker_uwu
@Wilker_uwu 2 ай бұрын
i legit want a protocol-compatible free/open-source clone of the game, with artwork that isn't tied to Mojang, and every kind of stuff that it deserves to match with the mechanics of the original
@Ratstail91
@Ratstail91 2 ай бұрын
Minecraft isn't just slow because of Java, it's legitimately badly coded, IMO.
@xgui4-studios
@xgui4-studios 2 ай бұрын
true, it isnt the fault of java
@Kane0123
@Kane0123 2 ай бұрын
Java was the bottleneck preventing me from building stylish designs... right?
@wrongthinker843
@wrongthinker843 2 ай бұрын
Why not both.
@NetherFortress-vl5fo
@NetherFortress-vl5fo 2 ай бұрын
In future I think they might switch
@Ralzone
@Ralzone 2 ай бұрын
@@NetherFortress-vl5fo They did, it's called bedrock version lol
@zekiz774
@zekiz774 Ай бұрын
6:10 The lightling thing is very obvious when you consider that there are events like mob spawing are being influenced by the light level of the block. So the light calculation essentially has to be done on the server.
@tiranito3715
@tiranito3715 3 күн бұрын
Yep, and that is only the logical lighting level of the block btw... the light that you see on your screen has to pass through a shader, which in turn depends on your client side lighting settings and resolution, which means that the server is literally only performing a simple flood fill algorithm to calculate the lighting level, which is literally just an integer value for each block, nothing that should be handled by the client side tbh... because it is literally tied to gameplay logic, so it needs to be handled by the server... in short, this video is kinda bs and the guy doesn't know what he's talking about lol...
@fx-modding
@fx-modding 2 ай бұрын
I've seen much faster versions written in Java. The second that you implement all the features required, rust isn't actually faster.
@GodOfChaos_HeXa
@GodOfChaos_HeXa Ай бұрын
rust uses way less overhead then java, MC java source code is also really bad, rewriting the entire thing in rust would definetly result in much better performance, but even back in the early craftbuckit / spigot days the server had more then 100k lines of code, today it will be way more. so recreating a optimized 100% vanill server with API accespoints for mods/plugins while also doing documentation is most likely never going to happen
@blyxyas
@blyxyas 2 ай бұрын
0:30 Bedrock does indeed have much better performance, the main problem is that there are features that are not the same :/ But the performance increase is there, and is very noticeable
@nnnik3595
@nnnik3595 Ай бұрын
Yeah but that is because those are 2 different games. Redstone isnt even remotely similar
@WolfiiDog13
@WolfiiDog13 Ай бұрын
Used to be very noticeable, but ever since they changed to the Render Dragon engine, not only it got a lot more laggy, but it got a lot more buggy. It's a mess, and even though I like Bedrock, there's no doubt Java is a lot better
@nnnik3595
@nnnik3595 Ай бұрын
@WolfiiDog13 RenderDragon is a engine that's multiple times better than Blaze3d according to modders
@WolfiiDog13
@WolfiiDog13 Ай бұрын
@@nnnik3595 all I know is that the game feels a lot worse after the update that brought it
@GodOfChaos_HeXa
@GodOfChaos_HeXa Ай бұрын
bedrock is also lacking a lot, 99% of java farms and redstone dont even work. its like comparing paperMC to fabric/vanill, yeah the on the surface it looks like its the same but in reality paper removes and kills a lot of things they deem to be bad / wasting resources in order to make minecraft run more smoothely
@icxd8665
@icxd8665 2 ай бұрын
Hey Theo. As someone who has written my own server implementation, I'm gonna say that the most difficult part of the project was knowing which packets are server- and client-bound. Most of the packet on the wiki is incorrectly labels, so it's pure guess work.
@SammyForReal
@SammyForReal 2 ай бұрын
While this project is impressive, I don't think this has the right goals. Is this a Vanilla Server? The best vanilla experience is with mojangs vanilla servers because of its features. So... is this a lite server that can be used for minigame servers etc? Wait nope, that's not their goal! And modded servers are impossible anyway due to the way mods are written and what they expect. This is just a mess. An impressive mess, but still a mess.
@craemonmc
@craemonmc 2 ай бұрын
You are right though I believe that you can and should improve your vanilla server with fabric for example! And for Minestom specifically: They state on their Github readme, that it isn't made to replace vanilla based servers but used "when it takes less time to implement every missing vanilla feature you want than removing every vanilla feature that will slow you down." So basically, as you said, for minigames and such (which there are already small, fully playable Minigame servers based on Minestom btw).
@SammyForReal
@SammyForReal 2 ай бұрын
@@craemonmc Oh right, I should've specified that fabric servers are one of the best options too ^^ All vanilla features plus performance improvements through mods (and of course modded features as well).
@craemonmc
@craemonmc 2 ай бұрын
@@SammyForReal Vanilla macht im Vergleich zu Fabric sogar eigentlich gar keinen Sinn(jetzt so aus meiner Erfahrung mit diversen SMPs).
@Varadiio
@Varadiio 2 ай бұрын
Yea the missing features I understand take time and effort. The mission statements are what turn me away. I've played enough complete overhauls of various games that break other mod functionality, and nearly every time I wish for one little thing or another. I wouldn't play it due to what it breaks with no willingness to change.
@najawin8348
@najawin8348 2 ай бұрын
If you wanted to code this _specifically_ for neoforge or like a decent sized modpack with a dedicated fanbase (eg: GTNH), that _could_ work? But it would require working with the devs from the beginning of the project. But the GTNH devs, for instance, are absolute wizards, and this seems superfluous to what they're doing. And neoforge would be a massive, massive undertaking, as it would basically involve you inventing an entire new standard for server side mods / decently modifying an existing one.
@debugger4693
@debugger4693 2 ай бұрын
Lighting has to be server side because it affects gameplay, not only cosmetics.
@trustytrojan
@trustytrojan 2 ай бұрын
the BIGGEST DOWNSIDE is lack of modding. i wont move over to any-other-language-rewrite unless mods/modloaders will work
@NubeBuster
@NubeBuster 2 ай бұрын
I was working on a world generator and decided to profile the jvm to see what is making my generator take 8ms per chunk. I found that 6 or 7 ms was for light updates. I looked further into it and found a bug causing paper async lighting to submit hundreds of thousands of runnables to an executor service which was taking 80% of the cpu. I fixed that issue and now it's faster. This is in 1.8 though, so probably was already fixed in the newer versions. But the main takeaway is that lighting and chunk generation are the reason you see the 20x in cpu. I think you will probably get at best a 10x after these are implemented efficiently.
@Jakobg1215
@Jakobg1215 2 ай бұрын
Minecraft Java has deofiscation maps since around 1.14, so you have the entire source code but without comments or other stuff.
@pigeonprotagonist6357
@pigeonprotagonist6357 2 ай бұрын
World border has been added in the time it took to release this video
@klausburgersten
@klausburgersten 2 ай бұрын
why world border is even a thing if a man wants to go to x minus one billion let the man go to the x minus one billion
@zisumevoli96
@zisumevoli96 2 ай бұрын
A+ for content, i pray to the gaming gods we never have to deal with rusty games
@Blackilykat
@Blackilykat 2 ай бұрын
For playing with few friends, preformance is really only an issue when on free server hosts (like aternos or minehut) Most (if not all) big servers will need to be able to mod the server I don't think there's much of a use case for this. Also it barely does anything right now and it's way too incomplete to compare to vanilla Also, it didn't compare with vanilla + optimization mods. Not too familiar with how much improvement there is on the server side, but I know they exist. And launch args are *really* common in minecraft servers to optimize gc. Which I don't think the benchmarks mentioned either?
@aCrumbled
@aCrumbled 2 ай бұрын
As someone who works a lot with Minecraft plugins and server code, I wish there was a feature complete server rewrite. Because 1) Java can be a pain and just makes certain things harder than they need to be, and 2) The Minecraft server code is needlessly complex at times and lacks any documentation. 3) Sometimes things are obfuscated making getting simple tasks done way harder than they have to be. 4) Code, style, and naming lacks consistency so I always feel like I’m second guessing myself on how something should be done. Most of these things have improved in recent years, as Mojang has been reworking things on the server side but there is still a long way to go.
@milutinke
@milutinke 2 ай бұрын
As someone who is a maintainer of an open-source 3rd party headless Minecraft client, making a server is way harder than making a client, despite having all the protocol specs available. (If you're wondering, it's Minecraft Console Client).
@rasyasejati
@rasyasejati Ай бұрын
16:30 LMAOO EXACTLY, impressive it's gotten this far but annoying when you're looking for plugins minecraft mods and things are in the state of renaissance this past few years, and i love it, from graphic performance like sodium, and server side like pumpkin, im impressed with the community
@DearFox
@DearFox 2 ай бұрын
Alas, all these projects do not implement even 1% of the entire functionality of the vanilla server core. I would like someone to prove the opposite, but alas. I've tried quite a few similar projects. And usually their fate is the same: they are either abandoned, or they are libraries for creating servers where the vanilla behavior of the game does not make sense. What can I say, my boyfriend made a basic implementation of the minecraft protocol for fun using godot and gdscript. Yes, it only implemented displaying the server in the list of servers, but it was a kind of project for fun.
@Henry-sv3wv
@Henry-sv3wv Ай бұрын
>Making Minecraft 100x faster nobody cares if you don't port all mod packs to rust
@ray73864
@ray73864 2 ай бұрын
Why would you think that the light should not be calculated on the server when playing server side? The server needs to know where to spawn mobs, etc... Also, I don't know about the server side, but Mojang has been releasing an obfuscation map for Minecraft for about a decade now at least.
@jonnyso1
@jonnyso1 2 ай бұрын
Ask the client to send current state to the server to figure out where to spawn mobs ? Something like that. I have no idea how any of that works but calculating light on the serve would not be my first attempt at it.
@the_cheese_cultist
@the_cheese_cultist 2 ай бұрын
​@@jonnyso1 and how would you handle multiple clients? the server decides how to spawn mobs, so the server needs to make all relevant calculations for mob spawning, lighting included.
@jonnyso1
@jonnyso1 2 ай бұрын
​@@the_cheese_cultist Why would that be a problem for multiple clients ? The server tells where a mob should spawn, the client can handle the rest. I'm actually really curious why they didn't do it like that in the first place.
@jonnyso1
@jonnyso1 2 ай бұрын
@@the_cheese_cultist Yeah, and the client can send that information to the server so the server doesn't need to calculate lighting itself, it would only need to figure out where to spawn a mob based on the information clients provide.
@the_cheese_cultist
@the_cheese_cultist 2 ай бұрын
@@jonnyso1 and the server needs to know where the mob spawned. so it has to have the lighting data.
@StreetSurfersAlex
@StreetSurfersAlex 2 ай бұрын
This is not comparable to real minecraft. Yours is missing critical features which would affect your comparison
@chaws314
@chaws314 2 ай бұрын
yup. Lighting updates, Redstone, and Mob AI are the main killers of perf in every MC server I have run. Chunk generation is also a big perf killer, but most servers progenerate chunks.
@ramsey2155
@ramsey2155 2 ай бұрын
Now i can host a minecraft server on a cloudflare worker
@zack8247
@zack8247 2 ай бұрын
this is great, thanks for covering it theo
@salvehn
@salvehn 2 ай бұрын
for me it was Garry's mod with wiremod and Expression 2 programming language. definetly wouldn't become dev if didn't play them during school it was slow as well. can't wait for S&Box to add proper sandbox mode with similar stuff
@CrazyWinner357
@CrazyWinner357 Ай бұрын
Rust devs rewriting something for worse and claiming its faster volume 199....
@sky0kast0
@sky0kast0 Ай бұрын
I certainly hope this pumpkin becomes a wagon and we can go to the ball.
@sad_man_no_talent
@sad_man_no_talent 2 ай бұрын
100x performance but I got immediately turned off after no mod
@nnnik3595
@nnnik3595 Ай бұрын
No Rust server will ever allow java mods.
@milk-dog
@milk-dog 2 ай бұрын
While these are cool for monogame server hosts to get more concurrent players, I don't ever see these being viable on large smps because of their own custom chunk generation. You basically have to pre generate the world as far as you want, which can take a lot of storage. Bedrock custom server software has the same problem.
@timespeed1580
@timespeed1580 2 ай бұрын
I work with ferrumC, but I also know the pumpkin Devs, they have a branch working on live terrain generation atm
@henrycgs
@henrycgs Ай бұрын
people need to realize that a minecraft server IS minecraft. like. it's not a part of the game, it's essentially the entire game besides rendering. it needs to implement all physics calculations, world generation, every single mob AI, datapacks, commands, structures, inventory, particles, movement controls, boss battles, literally everything. writing a minecraft server in any language is the same as rewriting the game from scratch. all that is left is rendering, which honestly is one of the easiest parts. a full minecraft server rewrite has never been done and likely never will due to its sheer difficulty.
@abhemanyusarin8023
@abhemanyusarin8023 2 ай бұрын
The answer is not more Minecraft, but Minetest
@xypheli
@xypheli 2 ай бұрын
Considering the projects you showed, I'm kinda proud to be a human rn, but also kinda humiliated that I most certainly will never in a thousnad years be able to achive something as genious as this.
@infinitivez
@infinitivez 2 ай бұрын
I need a server that can translate java opcode to whatever server code they're using or even an LUA intermediary layer, or some standardized concept that isn't going to fallout each time a new server project comes into being. Vanilla is all well and good, but I dare say, the people who really commit to keeping Minecraft alive, play modded. Now if we can refactor the client into Rust... We be cooking!
@Kitulous
@Kitulous 2 ай бұрын
rewrite jvm in rust
@infinitivez
@infinitivez 2 ай бұрын
@@Kitulous You know what, I wonder just how viable an idea that might be.
@anhware
@anhware Ай бұрын
​@@Kitulouswhat do you mean by that lol. Java and the JVM is already written in C????
@happieplantnl
@happieplantnl 2 ай бұрын
This video was so interesting, please release more nerdy technical minecraft stuff :)
@codeChuck
@codeChuck 2 ай бұрын
You became a dev because you wanted to! I only played a little in this game and never hosted it :) I only watched some youtubers that played in team and created a world together, which was fun stream!
@dragons_advocate
@dragons_advocate 2 ай бұрын
To be fair: How little resources would an implementation in Java cost, if rewritten from scratch with the same feature set? I have the feeling all the "not done yet" parts are doing a lot of heavy lifting in this comparision; -- Making it entirely moot, except to score brownie points for Rust.
@Jarjarb1nkzz
@Jarjarb1nkzz Ай бұрын
I’m sold I never wanted to see what I was doing anyway
@kdborg
@kdborg 2 ай бұрын
Now they need to run Minecraft inside Minecraft inside Minecraft.
@sirjoot
@sirjoot Ай бұрын
"It's kinda nuts, it's kinda insane", my guy has clearly never seen the reverse engineering that goes into RuneScape Private Servers, we had to do that all with just the client packets.
@iEnis_
@iEnis_ Ай бұрын
the only thing missing now is someone needs to rewrite the client
@greenstonegecko
@greenstonegecko 3 күн бұрын
I remember 2017, setting our gamma to 1000 to not rely on serverside lighting. It was garbage back then.
@Kaptime
@Kaptime 2 ай бұрын
There is significant crossover between minecraft server hosting kids and twitch employees. One of the guys from my highschool computing class has worked at twitch pretty much since he left highshcool.
@MZZenyl
@MZZenyl 2 ай бұрын
6:33 Calling it "reverse engineered" is kinda inaccurate. The game's source code has largely been known for ages, as the game can be decompiled back to something that mostly resembles the input. One of the issues is that the game's code is obfuscated, however projects like MCP have done a lot of work to come up with good approximations of the original unobfuscated source code. For the most part, it is more just reading through semi-obfuscated code and trying to recreate it, rather than meticulously analyzing and recreating network packets (which is kinda the case for old Minecraft Classic versions, as deobfuscation of these mostly isn't a thing anyone has bothered doing).
@nnnik3595
@nnnik3595 Ай бұрын
Also Mojang releases official deobfuscation maps now.
@tiranito3715
@tiranito3715 3 күн бұрын
Yeah... this person has no idea what they are talking about. I myself have been involved in actual reverse engineering projects, both from compiled binaries and from crappy C# assemblies and such, and obviously the latter is orders of magnitude easier to decompile, to the point where you're basically seeing the actual source code but obfuscated. This is like "reverse engineering web pages" LMAO, literally reading JS, adding spaces and renaming functions... not to mention that in this case, the MC code had already been published before, for many many years, so what is there to reverse engineer? reading a info written by the people that actually reverse engineered the game (before the code was actually officially released LOL) is not reverse engineering... that's just... knowing how to read doc.
@nnnik3595
@nnnik3595 3 күн бұрын
@@tiranito3715 It's even worse since the maps are actually public and with the yarn mappings like 95% of stuff that is not in the mappings is actually already named. There is only some part of the code that actually isn't completely deobfuscated.
@codeChuck
@codeChuck 2 ай бұрын
You are so smart! I could not even imagine how to host it :)
@haable
@haable 2 ай бұрын
Not sure if ya talked about it in this video (I'm literally writing this after seeing like the first few minutes and the thumbnail) but there's this thing called MCHPRS (I think) which is a rewrite of the MC server in Rust for redstoners. MC High-Performance Redstone Server!
@evan_ry
@evan_ry 2 ай бұрын
Finally minecraft videos on Theo's channel!
@TopazTK
@TopazTK Ай бұрын
Hey, Minecraft has been my start in the development journey as well. If it wasn't for the mods I made for MC, I would not have stepped in KH.
@DearFox
@DearFox 2 ай бұрын
I'm looking forward to someone making a minecraft server implementation in assembler
@infernoplayzgames1684
@infernoplayzgames1684 2 ай бұрын
I for one am excited for these new servers. The only issue is that I typically play modded MC more than I actually play Vanilla mc so I'll be waiting until an modded open source server becomes available.
@4nyNoob
@4nyNoob 2 ай бұрын
as a professional minecraft player i would like to host my fabric world without slowdowns on my r9 5900x, it's almost embarassing to have lag on that CPU
@someguystudios23
@someguystudios23 Ай бұрын
No plugins makes sense (takes a lot of work) but no derivatives?? You're right in saying that would be a deal breaker for many. They may as well just not even provide a download at that point.
@maritaria
@maritaria 2 ай бұрын
I wish that for lighting they would set it globally to max instead of 0, while still not accurate at least you could see things.
@alskidan
@alskidan 2 ай бұрын
TBH when you don’t implement even a half of the features, it would be a shame to be on par or slower 😂
@MerkieAE
@MerkieAE 2 ай бұрын
Minecraft is my favorite open source project
@btarg1
@btarg1 Ай бұрын
This is going to become a major meme in the MC Modding community I can just feel it Check out Folia if you want a fast server btw
@gglobensky
@gglobensky Ай бұрын
You gain so much performance from mods that using a tweaked server that don't accept mods will probably always be slower IRL than a minecraft server with all performance mods
@andg93
@andg93 Ай бұрын
This seems interesting but from my experience the resource usage issue is not the biggest problem aside from Lower end computers trying to run MC. Minecraft on its own is nothing but it is when you add the engineering stuff, like electricity (RF, etc) pipes for liquid and item transports and Logic based components like gates, drones, etc for automation that things seem to go bad quick and it doesn't appear to be the mem and CPU holding it back. Playing with just myself and occasionally a friend over LAN on a local Server/desktop running MC server i am rarely breaking over 50% CPU and ram usage but once i add the mods in and start building things tend to fall apart quickly.The lag begins, rendering large quantities of items gets slow and the tick counts just cant keep up. If these issues could be fixed then the game would be so much better. Now with that said, my expectations may be unrealistic as i have always attempted to build out massive power infrastructure and automation pipelines to completely simulate cities, industrialist building and all that. But realistically the game is not fun without that ability as an adult anyway.
@bjoern_eberhardt
@bjoern_eberhardt 2 ай бұрын
I did rewrite an entire Minecraft client to Golang to make it faster. Especially it only consumed 10-20MB memory with 10MB binary size and 0.1-1% CPU. It wasn't 100% compatible with the packet formats, but mostly, so I had to ignore some packets. It was a great learning exercise.
@xusdom
@xusdom Ай бұрын
Hi. Nice idea. I thought about something like this. Is it hosted "somewhere"?
@foxxxy4963
@foxxxy4963 2 ай бұрын
Microsoft: wow thats a lotta code too bad im not readin em
@snaptiix3926
@snaptiix3926 8 күн бұрын
it sounded really interesting at first, but as soon as i heard mods and addons support won't be added i don't really see a real purpose for such effort. Modpacks, especially large ones like ATM really bring a server down, and making a modded server run faster would be so amazing, but vanilla already runs really smooth on simple hardware, even with 3-5 players.
@SNOUTxTOUT
@SNOUTxTOUT Ай бұрын
20x perf but there are no mobs, no world generation, no AI, no other players, and you can't use chat These projects have been around for a long while for mini-game servers (which most of these rust projects seem to be focused on) This is less of an showcase of how good rust may be as a tool and more a tell at how hype-driven the rust community is.
@pikazap6672
@pikazap6672 Ай бұрын
letsgo, minecraft in rust before gta6!
@Happ1ness
@Happ1ness 2 ай бұрын
11:03 yeah, "so far ahead" that I'm playing modded Minecraft java on mobile and still get more performance than bugrock
@tiranito3715
@tiranito3715 3 күн бұрын
6:18 the lighting that is rendered on your screen is calculated on a shader on the client side, obviously. The lighting they are talking about is the "light level" of each block, because minecraft has a mechanic where entities (mobs) can spawn on dark areas in the world. If this were not calculated on the server side, how would mob spawning be implemented then? this is like complaining about replicating through the network the position of a light fixed to a car, OMG SO WASTEFUL!!!! except you don't want your client to cheat, now do you? goes to show how much a JS dev truly knows about networking and backend LOL.
@LennoxDev
@LennoxDev 2 ай бұрын
There is no need in reverse-engineering minecraft since they provide their obfuscation mappings since years now. The only real challenging part in remaking the minecraft server software is the amount of game logic you have to reimplement that had been added over the years - without basing it on inefficient models. Minecraft itself just shares server and client code to almost 99% so there is no effort for them implementing the server-part.
@TheDuzx
@TheDuzx Ай бұрын
Considering the community effort I think it's insane that Microsoft/Mojang hasn't just done it by now.
@309electronics5
@309electronics5 Ай бұрын
It would take them a long time just like updates /s
@realmodpotato
@realmodpotato 2 ай бұрын
theres been a ton over the years, namely valence and cuberite
@artrix909
@artrix909 2 ай бұрын
you forgot to link pumpkin in the description!
@bonk1463
@bonk1463 2 ай бұрын
Minecraft is so reverse engineered that I've actually built a few servers in completely raw NodeJS and Typescript. The Minecraft community is incredible in terms of coding.
@NerdGlasses256
@NerdGlasses256 9 күн бұрын
12:50 That's not redstone, that's command blocks. It's a very inportant difference.
@SkylerLinux
@SkylerLinux 2 ай бұрын
I remember when modded MC went from SP and MP to just mods
@Pocketkid2
@Pocketkid2 2 ай бұрын
I used to care about custom clients and servers, but then I started playing massive modpacks which can't easily be ported to these custom clients and servers...
@tux_the_astronaut
@tux_the_astronaut 2 ай бұрын
Yeah id be nice tho if they would ever support mods cuz modded servers desperately need this
@griffinmartin6356
@griffinmartin6356 2 ай бұрын
hyperion actually looks amazing as well. pumpkin is very very nice for just random vanilla servers but hyperion is focused on actual servers and pure performance. it literally is as threaded as it possibly can be. This means that you can simply increase your performance by having a threadripper or something similar. It does not have world gen and some other key features but it can support wayy too many players. I believe it might be 100k or more
@dan2800
@dan2800 2 ай бұрын
100k is way too much at that point you will have bottlenecks elsewhere like in networking or clients themselves
@griffinmartin6356
@griffinmartin6356 2 ай бұрын
​ @dan2800 it is designed for large server events. You can easily buy a server that has even a 10 gigabit connection to support all that. one player usually uses about less than one megabit of connection. say they use one megabit that times 100k is 100k megabits or 100 gigabit. That certainly is a problem however its still possible. On top of that its assuming that every single player is constantly using that connection..
@Rubberduckerino
@Rubberduckerino 2 ай бұрын
at this point minecraft should make their server code open source
@Sekwah
@Sekwah 2 ай бұрын
While I tend to respect and enjoy your videos usually, I personally think this was a bad video. This would be like comparing two cars where one has the wheels missing and comparing them solely how fast the spedomiter says it gets to 60. Core components are missing so it is not a fair comparison in the slightest. Im glad you covered this project as its incredibly impressive though you talk about a lot of items with confidence but clearly do not know the first thing about which makes me personally question what I've trusted listening to your other videos. (Granted its been on projects I wouldn't touch vs were just interested in) While you are using sources a lot of the info you seem to personally add or interpretations are flawed or just seem unfair. This isn't to downplay the efforts of what these guys are doing as there is a LOT of work however here just a few of the issues for example with your video: * You explain how people have been reverse engineering the game like java decompilers haven't been a thing for almost the entirety of modding. Its possibly why one of the reasons modding exploded so drastically in the first place in mc as well as mojang even provide mappings nowadays to help tools decompile the game to near original source code. * You bashed minecraft's stability where the launcher. The issue it had was downloading a file which likely was a network issue, here you are comparing cargo to the launcher rather than the rust implementation of the server. * You bash minecrafts lighting being server side but don't seem to realise why it has to be done that way. Realistically for a project like this the best way to compare these would be to stress test and like for like for each feature that is fully implemented, though I understand you are not the one who ran or made the benchmarks.
@lorenzo42p
@lorenzo42p Ай бұрын
you've never seen a minecraft server idle with 1% cpu usage? eco tick plugin is very simple, server idles at 1% cpu when no players are on. this is a plugin I made, but there are others similar to this.
@sn0wgleb
@sn0wgleb 2 ай бұрын
great so what we have is rendering some blocks. not even properly. Why should we be impressed with performance here? nothing is ticking, no game here is hapenning. I wonder what the performance would be if we try and re-write this in java? Would the performance really be much worse than ~200mb usage?
@acenio654
@acenio654 26 күн бұрын
The benchmarks mean nothing. Pumpkin isn't a minecraft server, it's a husk of a minecraft server.
@nevork7578
@nevork7578 2 ай бұрын
If Minecraft is written not in the goat language Java, then it is not a Minecraft
@greenstonegecko
@greenstonegecko 3 күн бұрын
The sad part is, if it's not compatible with Spigot, it basically has no anti-cheat. There are 10 years of scripts that can obliterate Minecraft servers. Spigot fixes those. If Spigot doesn't work, it's not viable.
@sebastianramirez5781
@sebastianramirez5781 2 ай бұрын
what about bedrock do you think isn't as good as java for performance? tbh to me it runs A LOT better on my machine than java, I love the java version more because I grew up with it andI just prefer the java implementation on everything that works differently for the two versions, but you get so much higher render distance and FPS in bedrock in my experience.
@nnnik3595
@nnnik3595 Ай бұрын
There is a few things which are poorly implement on bedrock - e.g. a lot of redstone actually performas worse once you run a decent amount of redstone. Also fps isn't remotely relevant - we are talking about the server
Minecraft's Forgotten Mechanics
25:28
Legitimoose
Рет қаралды 153 М.
I Made an AI with just Redstone!
17:23
mattbatwings
Рет қаралды 1,2 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
PirateSoftware is right, this needs to stop
15:14
Theo - t3․gg
Рет қаралды 875 М.
I made my own Text Editor (in Rust)
8:16
FaceDev
Рет қаралды 142 М.
How To Avoid Big Serverless Bills
26:54
Theo - t3․gg
Рет қаралды 84 М.
The New "Hardest" HOI4 Achievement Is FUN - Götterdämmerung
18:23
iSorrowproductions
Рет қаралды 188 М.
Minecraft's Spawner Exploit is DEVASTATING 2b2t
8:19
FitMC
Рет қаралды 671 М.
My game is 262,000 times faster than Minecraft. I'll show you how.
12:20
IGoByLotsOfNames
Рет қаралды 1,4 МЛН
Making a Game About Weak Points
21:27
Emis
Рет қаралды 796 М.
Gemini 2 0 AI Features & Intelligence Realistic Showcase
27:19
Dracon Dev & AI
Рет қаралды 23
The Minecraft Mods Exposed for MALICIOUS Code...
14:58
TheMisterEpic
Рет қаралды 489 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН