Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement World storage format #1

Open
1 task
ExE-Boss opened this issue Apr 21, 2017 · 0 comments
Open
1 task

Implement World storage format #1

ExE-Boss opened this issue Apr 21, 2017 · 0 comments
Milestone

Comments

@ExE-Boss
Copy link
Member

ExE-Boss commented Apr 21, 2017

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
@ExE-Boss ExE-Boss added this to the 0.1.0 milestone Apr 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant