Skip to content

Have .tscn and similar files be standard TOML? #10069

Closed

Description

@nicholatian
  • Platform: All platforms
  • Godot version: 3.0 stable (intended)

At the moment, Godot seems to use its own derivative of TOML for nice, human-readable configuration files... but this is not standard. IMO, it would be healthy for Godot to use standards-compliant TOML to allow for easier automation and external reach. I think these are the things still left after you take out readability (both have it) and semantics (also irrelevant).

Also, another thought I had: perhaps schemas could have their extensions prepended to the .toml file extension, a la .tar.gz or .pkg.tar.xz or similar. This would mean the scene schema would become .scn.toml rather than .tscn (short for "text scene", right?), and .scn alone would still unambiguously mean the binary format in use.

I know Godot already supports XML, but as KidsCanCode pointed out earlier on the Discord server it's not exactly VCS-friendly (nor as easy to read)... but right now it seems to be the only option for a "standard" format for project metadata. Moving to standard TOML therefore kills two birds with one stone, making XML less relevant.

Activity

  1. reduz commented on Aug 3, 2017

    @reduz
    Member
  2. nicholatian commented on Aug 3, 2017

    @nicholatian
    Author

    I was unaware that the format wasn't intended for any sort of intercompatibility, so I guess my suggestion is moot. Thanks for the insight 🙂

  3. rawsp33d commented on Aug 4, 2017

    @rawsp33d
    Contributor

    @reduz Out of curiosity, what about TOML is not vcs friendly? There are many applications that a lot of use to read/write the data files, such as vim, emacs, atom, etc. Also I am currently making a Godot data format parser, and I wouldn't have to if it used standard TOML because there are many tools to parse and write that.

    I guess put another way, even if there is no benefit to adhering to an existing standard in your mind, what is the benefit to using your own? So far one major difference I have seen in the formats is comments being ; instead of #, which is just a stylistic change.

    Update: I found that using an INI parser works almost enough, so that's a good enough starting point for me to just make the few changes I need to for godot's format.

  4. punto- commented on Aug 4, 2017

    @punto-
    Contributor
  5. reduz commented on Aug 4, 2017

    @reduz
    Member

    @rosshadden Never implied TOML is not VCS friendly. The benefit of using our own is that we have a strict format for the data saved to it. If incorrect, our parser will explain exactly what is wrong and on which line of code.

    A TOML parser is more general purpose and the format is more broad, almost anything is allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions