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.
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.
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.
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 ^.^
@@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.
@@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.
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.
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.
@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.
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.
@@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
@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.
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
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.
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.
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
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
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?
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.
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.
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 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 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
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..
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).
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
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 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
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.
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.
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
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.
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.
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
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
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
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.
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).
@@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).
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.
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.
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
When you launch minecraft and play as a single player, the session is loaded up as a standalone game, mechanics that are replicated can still work on singleplay worlds. However, when you initiate the LAN settings in the pause menu. It reloads the world into a listen server. Making the main player the host and all other players a client. With the multiplayer instance of minecraft. It stands up a dedicated server. Making a session beacon for people to join. Making all players a client.
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.
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.
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.
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
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.
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.
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.
@@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.
@@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.
@@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.
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.
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!
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).
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.
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!
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.
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
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.
For minecraft, I just wish a single unified type of plugins/mods type (Paper's plugins, Forge's mods, etc) so plugin/mod devs could focus on their feature and optimization rather than implementing it in various ways.
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!
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.
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.
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.
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 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..
Using Java is what makes modded Minecraft possible. And the mod space is *HUGE*! So any server that is programmed in such a way that it runs much faster will almost inherently be incompatible with all those mods. Hell, it's most likely the reason Mojang are so slow with updates in general, because they want to keep the mod space alive and not hinder them by constantly changing the entire codebase.
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
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.
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...
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.
This is not feasible from a development perspective. This can be useful for things like lobby servers, however those are already lightweight and not exactly worth optimizing. Having to trust one person (or, maybe a small team) to rewrite (more like remake) the entirety of the Minecraft Server isn't exactly a good idea considering the fact that there are so many things that play into just vanilla minecraft by itself. There aren't many use cases for these rewritten server software, let alone anything that *isn't* based off of Mojang's Minecraft server.
A lot of comments are talking about how the server doesn't implement saving, lighting, or chunkgen, but the memory usage alone is a great indicator of progress. Minecraft has been regularly beaten by community mods also written in Java, so I don't doubt this project can be significantky faster once those features are added.
i am sorry to say but this server is less then bare bones. this server does not even implement stuff thats written on the page it does. like other games minecraft client calculates and shows results to the player, sends the event and results to the server. server calculates events and says noooo. you can see that sometimes you break a block and it pops back into its place. because server says nooooooooooooo. pumpkin does not have block events, tile entities, entities, redstone, ..... you are comparing an child to an adult, not seeing the fact that the sperm didn't even reach the egg. comparing the memory usage of doing nothing against a giant piece of software...?
@@BellCube sad to say this, but it happens really often. there are a lot of "mincraft clones" out there and a lot of "servers" that do less then the bare minimum. for example just rendeing the world static and proudly anounce how much fps they get. but if you start scraping just the surface you see the void. all functional servers are written in java... because they only extend the original server. and yes minecraft server is single thread because it gets stupid complex to interact with the world state in multithreadding. pumpkin does not even have simple block events. as far as i could see no logic server side for battle - therefore cheating. i did not test that thing but the amount of code is a sad excuse, and as far as i could see no magic happening there. i have not read every single line but yeah no... no logic serverside what when to do.
@@SteffenF Doesn't shock me that it's common. Especially since the official MC server _is_ quite inefficient and has a lot of room to go. BTW-you may be interested in Purpur, a multithreaded Paper server that splits the load based on region files. Stable enough that 2b2t uses (or at least used) it in prod since they broke out of 1.12.
@@BellCube this might work relatively well for vanilla only. i would want to stresstest this thing before saying something about that but if redstone is between regions.. how good is the handling of that? i personally only play heavy modded stuff. most of the time skyblock. therefore i guess i'm stuck with java 😁. i hate the bedrock edition with passion. redstone is so wired down there 😤 and noooo real mods 💀
I refuse to play minecraft again until I can see the horizon. You need to be able to see the worlds people make. Loading more chunks is not the answer.
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.
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
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).
Imagine these juicy good performance was with clean code implementation that proved to make your program X times slower and the rewrite is to get rid of it.
Lithium (an optimization mod) gets rid of a ton of clean code (Streams) in favour of more classical iterators for 20% of it's performance improvements.
@@chadjaaxpartially. When I was the server admin of a larger tmc server we build a tree farm. It was really laggy. A tree farm creates mans moving blocks or so called b36s (Block 36). These blocks are placed by the engine to handle the animation of the movement. After the movement is done the movement is done they place down the actual block that moved. In order to handle blocks that do stuff Minecraft maintains a list of "ticking blocks" that do things every ingame tick. So in our tree farm we would add a ton of these b36s to a list and then iterate over them and during iteration remove them one by one. In our profiler this single ArrayList.remove took up 90% of the performance. When removing entries from an ArrayList all entries added after the entry you added needs to be shifted forward. And that happened for every b36 after it finished moving - simply put the big O of the list types remove operation messed everything up. LinkedLists made the game overall 20% slower but would fix this extreme case. A HashSet would mess up all of Minecraft's redstone since things aren't ordered anymore. The devs of Lithium (a performance mod) took 2 weeks to write a custom ordered collection for this specific problem. Mojang itself also added a different (but a slightly slower one than this) in their next update. Issues like this is where a lot of the servers performance goes bad.
It's pretty cool, but also not new. I've seen Minecraft server implementation running on a Arduino. It was limited but it worked. Once it has (accurate) world gen I'll call it a breakthrough
Not extremly ddifficult - Just unlikely for example I think it's more likely that our planet gets swallowed up by a black ghole tomorrow than there ever being mod support in those rewrites.
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?
I don't want to bring it down, but truth be told: If it doesn't do much, nor allows for easy extension itself, what is it even worth? I mean, its resource utilisation is nice, but it's still unplayable in the grand scheme of things.
Yes the benchmarks shows a 20x perf gap, but if the 3 most demanding tasks are not currently available this benchmark means nothing
i agree with you, but even if server isnt doing anything and there is single afk player (on java edition; clean
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.
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.
I still take the same time to build a square mud house...
Who cares? You have to be dumb to not understand that Minecraft would be more efficient and performant in Rust.
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.
I was going to say this, but you beat me to it lol
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.
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 ^.^
@@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.
@@StephanieHallberg for versions a couple years old we have a pretty good understanding of what is going on
You know someone is a true minecraft player when he says "Bedrock is a completely different game". Couldn't be better phrased.
I guess my 2.5 year long covid world wasn't actually Minecraft then
@@rooodis456 i guess so too
Lights are server side because it decides whether mobs can spawn there are not, so actually not that crazy.
exactly! and it's not like it's fancy raytracing or anything that would be very expensive to run
@zperk13
I mean, its not raytracing .. but it still rather expensive iirc
@@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.
and plant growth
@@DotNetGuy-k9u yeah exactly this! Forgot what exactly they used, tho I have seen some pretty impressive mods that cut down on this
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.
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.
@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.
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.
@@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
@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.
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
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.
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.
One can only hope all community efforts consolidate into one project, and at some point Microsoft starts contributing to it.
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
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.
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
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?
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.
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.
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
if its so hard why does papermc exists?
@@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
@@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
@@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
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..
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).
I am the developer of Hyperion. Thank you for showing my hard work :)
Minecraft isn't just slow because of Java, it's legitimately badly coded, IMO.
true, it isnt the fault of java
Java was the bottleneck preventing me from building stylish designs... right?
Why not both.
In future I think they might switch
@@NetherFortress-vl5fo They did, it's called bedrock version lol
another buggy minecraft version on the way
It's like standards? The greatest thing is how many there are?
if Bemis - > Benis
then
then Pemis - > ???
Considering its Rust, likely its another slightly less buggy minecraft version.
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
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
11:29 ??? Even if the server code wasn't well understood, redstone and command blocks are very well understood
why obfuscate the code at all if you're going to release deobfuscation maps anyways?
@@Kitulous It's standard practice, and reduces the file size.
@Testvvjnb-ci3zl I would think that Mojang tries to optimize their code the best they can
@@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
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.
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.
Hi. Nice idea. I thought about something like this. Is it hosted "somewhere"?
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.
Gotta make your redstone computer faster. Can't speed up the Redstone? Rewrite the universe!!
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
5:43 - not sure what you are sigh-ing about . This makes perfect sense given how the game works.
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
@@Varadiio They do raycasts for most of the physics now but other than that it's a flood fill algorythm.
A+ for content, i pray to the gaming gods we never have to deal with rusty games
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.
>9:58 I'm impressed, it's running and it's running well
>% CPU: 105
>???
100 = 1 core
@@belliel42 okay, didn't know that, looks weird to me.
@@andrewk2756 yeah macOS is weird
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.
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
I have 200+ fps vs 100ish, Bedrock vs Java Edition on my 7yr old laptop. The difference is very noticeable indeed
Yeah but that is because those are 2 different games. Redstone isnt even remotely similar
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
@WolfiiDog13 RenderDragon is a engine that's multiple times better than Blaze3d according to modders
@@nnnik3595 all I know is that the game feels a lot worse after the update that brought it
The Minecraft in Minecraft thing is even more impressive when you realize they didn’t use a single command block to accomplish it
>Making Minecraft 100x faster
nobody cares if you don't port all mod packs to rust
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
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.
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).
@@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).
@@SammyForReal Vanilla macht im Vergleich zu Fabric sogar eigentlich gar keinen Sinn(jetzt so aus meiner Erfahrung mit diversen SMPs).
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.
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.
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
Specially when lightning determines what mobs spawn
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
When you launch minecraft and play as a single player, the session is loaded up as a standalone game, mechanics that are replicated can still work on singleplay worlds. However, when you initiate the LAN settings in the pause menu. It reloads the world into a listen server. Making the main player the host and all other players a client. With the multiplayer instance of minecraft. It stands up a dedicated server. Making a session beacon for people to join. Making all players a client.
Since 2012 singleplayer has also been hosted on a listen server
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.
Only Theo can shove us a tutorial voxel game under the " killer written in Rust" sauce. Come on brother
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.
This is not comparable to real minecraft. Yours is missing critical features which would affect your comparison
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.
I've seen much faster versions written in Java. The second that you implement all the features required, rust isn't actually faster.
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
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.
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.
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.
@@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.
@@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.
@@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.
@@jonnyso1 and the server needs to know where the mob spawned. so it has to have the lighting data.
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.
World border has been added in the time it took to release this video
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
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.
Rust devs rewriting something for worse and claiming its faster volume 199....
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!
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).
I certainly hope this pumpkin becomes a wagon and we can go to the ball.
You are so smart! I could not even imagine how to host it :)
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.
This video was so interesting, please release more nerdy technical minecraft stuff :)
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!
rewrite jvm in rust
@@Kitulous You know what, I wonder just how viable an idea that might be.
@@Kitulouswhat do you mean by that lol. Java and the JVM is already written in C????
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.
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
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.
For minecraft, I just wish a single unified type of plugins/mods type (Paper's plugins, Forge's mods, etc) so plugin/mod devs could focus on their feature and optimization rather than implementing it in various ways.
Now i can host a minecraft server on a cloudflare worker
the only thing missing now is someone needs to rewrite the client
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
the BIGGEST DOWNSIDE is lack of modding. i wont move over to any-other-language-rewrite unless mods/modloaders will work
TBH when you don’t implement even a half of the features, it would be a shame to be on par or slower 😂
Finally minecraft videos on Theo's channel!
I'm looking forward to someone making a minecraft server implementation in assembler
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!
Lighting has to be server side because it affects gameplay, not only cosmetics.
this is great, thanks for covering it theo
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.
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.
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.
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.
I work with ferrumC, but I also know the pumpkin Devs, they have a branch working on live terrain generation atm
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
100k is way too much at that point you will have bottlenecks elsewhere like in networking or clients themselves
@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..
Considering the community effort I think it's insane that Microsoft/Mojang hasn't just done it by now.
It would take them a long time just like updates /s
Minecraft Java has deofiscation maps since around 1.14, so you have the entire source code but without comments or other stuff.
Using Java is what makes modded Minecraft possible. And the mod space is *HUGE*! So any server that is programmed in such a way that it runs much faster will almost inherently be incompatible with all those mods. Hell, it's most likely the reason Mojang are so slow with updates in general, because they want to keep the mod space alive and not hinder them by constantly changing the entire codebase.
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
100x performance but I got immediately turned off after no mod
No Rust server will ever allow java mods.
Minecraft is my favorite open source project
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.
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...
Yeah id be nice tho if they would ever support mods cuz modded servers desperately need this
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.
Now they need to run Minecraft inside Minecraft inside Minecraft.
This is not feasible from a development perspective. This can be useful for things like lobby servers, however those are already lightweight and not exactly worth optimizing. Having to trust one person (or, maybe a small team) to rewrite (more like remake) the entirety of the Minecraft Server isn't exactly a good idea considering the fact that there are so many things that play into just vanilla minecraft by itself. There aren't many use cases for these rewritten server software, let alone anything that *isn't* based off of Mojang's Minecraft server.
A lot of comments are talking about how the server doesn't implement saving, lighting, or chunkgen, but the memory usage alone is a great indicator of progress. Minecraft has been regularly beaten by community mods also written in Java, so I don't doubt this project can be significantky faster once those features are added.
i am sorry to say but this server is less then bare bones. this server does not even implement stuff thats written on the page it does. like other games minecraft client calculates and shows results to the player, sends the event and results to the server. server calculates events and says noooo. you can see that sometimes you break a block and it pops back into its place. because server says nooooooooooooo. pumpkin does not have block events, tile entities, entities, redstone, .....
you are comparing an child to an adult, not seeing the fact that the sperm didn't even reach the egg.
comparing the memory usage of doing nothing against a giant piece of software...?
@SteffenF Oh? Dang, video misrepresented this massively then.
@@BellCube sad to say this, but it happens really often. there are a lot of "mincraft clones" out there and a lot of "servers" that do less then the bare minimum. for example just rendeing the world static and proudly anounce how much fps they get. but if you start scraping just the surface you see the void.
all functional servers are written in java... because they only extend the original server.
and yes minecraft server is single thread because it gets stupid complex to interact with the world state in multithreadding.
pumpkin does not even have simple block events. as far as i could see no logic server side for battle - therefore cheating.
i did not test that thing but the amount of code is a sad excuse, and as far as i could see no magic happening there. i have not read every single line but yeah no... no logic serverside what when to do.
@@SteffenF Doesn't shock me that it's common. Especially since the official MC server _is_ quite inefficient and has a lot of room to go.
BTW-you may be interested in Purpur, a multithreaded Paper server that splits the load based on region files. Stable enough that 2b2t uses (or at least used) it in prod since they broke out of 1.12.
@@BellCube this might work relatively well for vanilla only. i would want to stresstest this thing before saying something about that but if redstone is between regions.. how good is the handling of that? i personally only play heavy modded stuff. most of the time skyblock. therefore i guess i'm stuck with java 😁. i hate the bedrock edition with passion. redstone is so wired down there 😤 and noooo real mods 💀
16:50 THATS OOMF 🔥🔥🔥🔥
oh wait their site shows up earlier too 3:15 THATS OOMF 🔥🔥🔥🔥
theres been a ton over the years, namely valence and cuberite
just more minecraft tech stuff please
at this point minecraft should make their server code open source
I refuse to play minecraft again until I can see the horizon. You need to be able to see the worlds people make. Loading more chunks is not the answer.
Use a fabric client with sodium mod along with bobby or distant horizons for greater view distances?
letsgo, minecraft in rust before gta6!
"isint better performance wise"
I love it when java can do 96 chunks min 30fps and 64 chunks min 60 fps on a 4070...
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.
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
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).
Also Mojang releases official deobfuscation maps now.
Imagine these juicy good performance was with clean code implementation that proved to make your program X times slower and the rewrite is to get rid of it.
Lithium (an optimization mod) gets rid of a ton of clean code (Streams) in favour of more classical iterators for 20% of it's performance improvements.
@@nnnik3595 Cool, so what I guessed is true.
@@chadjaaxpartially.
When I was the server admin of a larger tmc server we build a tree farm. It was really laggy.
A tree farm creates mans moving blocks or so called b36s (Block 36).
These blocks are placed by the engine to handle the animation of the movement. After the movement is done the movement is done they place down the actual block that moved.
In order to handle blocks that do stuff Minecraft maintains a list of "ticking blocks" that do things every ingame tick.
So in our tree farm we would add a ton of these b36s to a list and then iterate over them and during iteration remove them one by one.
In our profiler this single ArrayList.remove took up 90% of the performance.
When removing entries from an ArrayList all entries added after the entry you added needs to be shifted forward. And that happened for every b36 after it finished moving - simply put the big O of the list types remove operation messed everything up.
LinkedLists made the game overall 20% slower but would fix this extreme case. A HashSet would mess up all of Minecraft's redstone since things aren't ordered anymore.
The devs of Lithium (a performance mod) took 2 weeks to write a custom ordered collection for this specific problem.
Mojang itself also added a different (but a slightly slower one than this) in their next update.
Issues like this is where a lot of the servers performance goes bad.
@@chadjaax It never shared my other reply but no - the remaining other 80% are from adjustments in the chosen datatypes or stuff like that.
I remember when modded MC went from SP and MP to just mods
Microsoft:
wow thats a lotta code
too bad im not readin em
It's pretty cool, but also not new. I've seen Minecraft server implementation running on a Arduino. It was limited but it worked. Once it has (accurate) world gen I'll call it a breakthrough
i have a ram usage OCD, i think ,
i have found my language
i have found my people
here i come rust
If Minecraft is written not in the goat language Java, then it is not a Minecraft
The answer is not more Minecraft, but Minetest
I'd love to see mod compatibility though, even though it would be extremely difficult...
Not extremly ddifficult - Just unlikely for example I think it's more likely that our planet gets swallowed up by a black ghole tomorrow than there ever being mod support in those rewrites.
you forgot to link pumpkin in the description!
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?
I don't want to bring it down, but truth be told:
If it doesn't do much, nor allows for easy extension itself, what is it even worth? I mean, its resource utilisation is nice, but it's still unplayable in the grand scheme of things.