Skip to content

New save format #17

@Wieku

Description

@Wieku

As the current format is not backwards and future compatible, adding new properties to objects needs a new save version, there is a proposition of a new format of it. It will use a new extension, because .ldmap is a little too long. Before, header was packed together with map data in GZip stream which may be too CPU expensive to read just it. So header will be unpacked in the new format. Instead of beeing just values that are read sequentially, it will be read as a JSON String, new content will be added to help map sharing.

Header contents:

  • raw int as save version
  • JSON saved as raw UTF-8 string:
    • name: string
    • description: string
    • authors: string
    • width: int
    • height: int
    • creationDate: long
    • modificationDate: long
    • objects: long
    • entities: long
    • states: long
    • tickrate: int
    • thumbnail: BASE64 string

Right after the header there will be a map stored in GZipped Data(Input/Output)Stream.

  • Two integers describing map size

  • State data:

    • Total number of states (including free ones): int
    • Number of free states: int
    • Sequentially saved free state numbers: int
    • Sequentially saved state data: int
  • Object mapping:

    • "UTF-8 String and int pair saved sequentially"
  • Objects:

    • Number of objects: long
    • Sequentially saved objects:
      • object type: int
      • x: int
      • y: int
      • properties: string (or byte) to object map

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions