Skip to content

Implement World storage format #1

@ExE-Boss

Description

@ExE-Boss

SuperNOVA's World size would be 18446744073709551616 × 18446744073709551616 × 18446744073709551616 blocks, with indexes going from -9223372036854775808 to +9223372036854775807. The surface level would be at y=0.

Each World would be divided into segments of 512×512×512 blocks, which would be further subdivided into sections of 16×16×16 blocks.

Each segment would be it's own file and will contain it's own int key to String ID mapping and all the generated sections for this segment.

Each section would contain a short array with a size of 4096 used as the least significant portion of the int key, and optionally contain a byte array with a size of 6144 which would be interpreted as a 12-bit number array with a size of 4096 used as the most significant portion of the int key.

Mapping: 0000 xxxx xxxx xxxx yyyy yyyy yyyy yyyy, where x comes from the 12-bit number array,
and y comes from the short array.


- Folder structure:

save game folder root/
+--- game.sav      : basic save game information (global random seed, etc.)
+--- game.sav.bak  : backup of the previous game.sav
+--- players/      : folder containing player inventories, positions and other information
|    \--- <player_uuid>.plr : file containing specific player information
\--- subworlds/    : folder containing world specific files
     \--- <world_id>/ : the folder containing a specific subworld
          +--- world.wld : basic subworld information (random seed derived from the
          |                                            global seed and world ID, etc.)
          \--- segments/ : the folder containing the segments
               \--- <x>.<y>.<z>.seg : the file containing the segment information at (x,y,z)

- game.sav structure:

//TODO

- <player>.plr structure:

//TODO

- world.wld structure:

//TODO

- <segment_coords>.seg structure:

//TODO

To do list:

  • Finish specification

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions