FabricMC / yarn

Libre Minecraft mappings, free to use for everyone. No exceptions.
Creative Commons Zero v1.0 Universal
908 stars 376 forks source link

"World" vs "Dimension" vs "Level" and where to use them? #89

Open copygirl opened 8 years ago

copygirl commented 8 years ago

Currently, World is meant for anything regarding single instances of the World class, which is unlikely to change. Level is being adopted as the term used for a single save - confusingly also called "World" in the game (such as "Create New World"), though sometimes "Level" in the code (like "preparing level ...").

Previously some of our classes were using "Dimension" to describe an instance of a world (usually which ID - dimensionId) or its type (Overworld / Nether / End - DimensionType), though I've done some changes to get rid of the mention of "dimension" completely.

I'm not sure this is the correct way to go about it. We should retain the name "Dimension" for something, though I'm not entirely sure what to use it for.

unascribed commented 8 years ago

The impression I've gotten is "Level" was the name used in earlier versions, before multiple dimensions got implemented. The main place I recall seeing it was the flashing "Saving level..." text that was removed at some point in Beta, and that was a remnant of some early Alpha version, and it appeared despite doing nothing in SMP. (IIRC, Classic also used the .mclevel extension for save games.)

The default name for a save game on a server is world (and it has been for a long time), which seems to imply a World is a top-level container. The sub-directories are called DIM, implying Dimension is the next level in. Those would seem like the most "correct" names as such, and are closer to the names people are most used to.

WorldDimension, LevelWorld, would follow that, but that's kind of strange.

asiekierka commented 8 years ago

net.minecraft.world.Dimension would be awkward, though, on the other hand.

sfPlayer1 commented 8 years ago

My preference is WorldSave + World with WorldSave being the collection of Worlds.

"Dimension" afaik is just wrong from an English language POV, describing possibly some original intention instead of the actual meaning/implementation these days. The different worlds don't have a particular dimensional meaning in the mathematical sense and with mods adding more "dimensions" that's even closer to just adding more Worlds.

Level is commonly used to describe a contiguous region/map, which is the equivalent of a world in Minecraft. The proposed use is orthogonal to that.

I didn't go for just save since that's rather ambiguous, so WorldSave seems like a good option. Mojang's own choices are poor, not very feasible to copy.

copygirl commented 8 years ago

WorldSave

Only problem with that is it clashes with WorldSaveHandler.

unascribed commented 8 years ago

being the collection of Worlds

WorldCollection? :P

Alternatively, rename WorldSaveHandlerWorldSerializer? WorldPersistenceManagerEngineFactory

sfPlayer1 commented 8 years ago

Other options for the collection of worlds: Universe, WorldStore

copygirl commented 8 years ago

I don't dislike Universe but the name only weakly implies that it's a collection of worlds, though not its functionality as a storage handler, dealing with saving and loading relative to a world directory.

darkevilmac commented 8 years ago

I think the simplest thing would be having saves related to a specific world be labeled Dimension, and use GameSave for saves involving multiple worlds.

EDIT: formatting

copygirl commented 7 years ago

We have a few more people in the project now and the old ones may have had some time to think. What is your (current) opinion?

Darkhax commented 7 years ago

I don't have a problem with using Dimension. While the word has multiple meanings, it is correct in this context as well. Probably a bit more correct than Universe.

copygirl commented 7 years ago

I guess it's also worth mentioning that "Dimension" is the name the community is using for the different world/dimension types in Vanilla: Minecraft Wiki - Dimensions

I feel very weird changing everything World to Dimension though. It doesn't seem right. I think this might be a case where what I'm used to weighs more than what ... might be a better idea? And what are we basing this on? The fact that Minecraft refers to a save folder as "world" in its GUI, and the community decided to pick up "dimension" as a way to differenciate?

unascribed commented 7 years ago

The community picked "dimension" because dimension 0 goes in "world/region" and dimension 1 goes in "world/DIM1/region".

I'm personally for WorldSave, World, and a rename of WorldSaveHandler, to something like WorldSerializer.

liach commented 3 years ago

Now I think this is fairly clear: Level - a savegame (may include multiple worlds, like an overworld, a nether, an end, a few custom dimensions) World - a world (the basic unit a client is observing). Each world is mutually bound to one and only one dimension type. Dimension - dimension type. It is defined by the data pack with some properties, like ultrawarm, height, etc. At least this is how they appear in yarn now.