5 ms·
Given its execution model, I'm not sure I'd agree that multiplayer is terribly hard in MineCraft. What is challenging about it?
by cbsmith 11y ago
Given its execution model, I'm not sure I'd agree that multiplayer is terribly hard in MineCraft. What is challenging about it?
- Terr_ 11y agoIn most arena-shooter-type games, you don't need 32x memory for 32x players, because the per-player state is fairly constrained and known. (Often limited to how many projectiles they can keep in the air at once.) I suspect Minecraft has a much harsher profile, since it's possible for every player to be loading a different piece of the world with minimal overlap, and world-pieces involve a lot more state that needs to be preserved/calculated/saved.
- talldan 11y agoMuch of the persistent world-state in Minecraft consists of blocks laid out on a 3D grid, which are probably fairly easy to optimise. Compare this to other 3D games where there are lots of entities with dynamic physics that can move to just about any world position, and I think Minecraft would be the easier of the two.
- lucaspiller 11y agoAlso I'm not sure how Minecraft handles it (I assume it pretty much ignores it, or does something very naive), but in FPS games you need to take into account latency and do predictions on the client side to minimise it. Think of two players running towards each other, and shooting at each other. By the time the player (or even the server) receives the data saying the other player has fired their gun, they've both moved to completely different positions. (There is a good set of articles on this by a game developer, I can't find them now)
- Terr_ 11y agoThere was a bunch of Source-engine stuff Valve published, which is usually my go-to citation when arguing with players who don't understand "netcode" for a game but criticize it for not giving them perfect instantaneous communication anyway. :p https://developer.valvesoftware.com/wiki/Latency_Compensating_Methods_in_Client/Server_In-game_Protocol_Design_and_Optimization https://developer.valvesoftware.com/wiki/Latency_Compensatin... https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking https://developer.valvesoftware.com/wiki/Source_Multiplayer_...
- SahAssar 11y agoAlso there is this pretty interesting talk from bungie back when they did halo games: http://www.gdcvault.com/play/1014345/I-Shot-You-First-Networking http://www.gdcvault.com/play/1014345/I-Shot-You-First-Networ...
- amagumori 11y ago@lucaspiller: http://gafferongames.com/networked-physics/introduction-to-networked-physics/ http://gafferongames.com/networked-physics/introduction-to-n...
- cbsmith 11y agoMost of that state only has to exist on the server, which in turn doesn't really have to figure out visibility and doesn't necessarily even need textures. The world pieces are a very specific set of permutations, which could easily be loaded in to a graphics card's memory at the start of the game. All you are really tracking are which pieces are where, and by the game's nature, there aren't that many pieces or positions they can be in...
- Sir_Cmpwn 11y agoI'll offer my open source codebase up for this discussion: https://github.com/SirCmpwn/TrueCraft https://github.com/SirCmpwn/TrueCraft May give you some insight into how Minecraft multiplayer (or any other detail of Minecraft) works. The server code is in the TrueCraft directory.