Yarn: "World" vs "Dimension" vs "Level" and where to use them?

Created on 21 Sep 2016  ·  13Comments  ·  Source: FabricMC/yarn

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.

discussion

Most helpful comment

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.

All 13 comments

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.

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

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.

WorldSave

Only problem with that is it clashes with WorldSaveHandler.

being the collection of Worlds

WorldCollection? :P

Alternatively, rename WorldSaveHandlerWorldSerializer? WorldPersistenceManagerEngineFactory

Other options for the collection of worlds: Universe, WorldStore

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.

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

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?

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.

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?

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.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asiekierka picture asiekierka  ·  3Comments

Boundarybreaker picture Boundarybreaker  ·  3Comments

haykam821 picture haykam821  ·  4Comments

ChloeDawn picture ChloeDawn  ·  6Comments

Bixilon picture Bixilon  ·  5Comments